cPanel is a commercial web-based control panel for server systems. It can help ease the burden of common system administration tasks such as website creation, database deployment and management, and more. This guide will help you get up and running with the VPS Optimized cPanel product on your CentOS 5 Linode. Please note that Linode does not sell cPanel licenses; you'll need to obtain one directly from cPanel or an authorized distributor. Additionally, Linode does not provide cPanel support, although you may contact cPanel support directly once you've purchased a license. This product must be installed on a freshly deployed CentOS 5 VPS. These instructions should be performed as the "root" user via SSH.
cPanel includes facilities for hosting your own DNS services. We generally recommend using Linode DNS services, as it provides a stable, redundant, and easily managed DNS platform. If you elect to run your own DNS services on a single Linode using cPanel, please be aware that such a setup provides no redundancy.
Should you wish to provide DNS services, you'll need to add A records for your nameservers in your WHM as described in the DNS on cPanel guide.
If you're planning to use a domain name for your nameservers that you will also be hosting DNS service for, you'll need to ask your domain name registrar to create DNS glue records based on your Linode's IP addresses before proceeding.
Edit your /etc/hosts file to resemble the following example. Replace "hostname" with a unique name for your server, "example.com" with your domain name, and "184.108.40.206" with your Linode's public IP address. If your Linode has two IPs assigned to it, use the first IP in the list displayed on the "Remote Access" tab of the Linode Manager.
127.0.0.1 localhost.localdomain localhost 220.127.116.11 hostname.example.com hostname
Set your system's hostname by issuing the following commands, replacing quoted "hostname" entries with your system's short hostname:
echo "HOSTNAME=hostname" >> /etc/sysconfig/network hostname "hostname"
Edit the /etc/sysconfig/network-scripts/ifcfg-eth0 file to resemble the following, replacing 18.104.22.168 with your Linode's IP address and 22.214.171.124 with its default gateway. If your Linode has two IPs assigned to it, use the first IP in the list displayed on the "Remote Access" tab of the Linode Manager.
DEVICE=eth0 BOOTPROTO=none ONBOOT=yes IPADDR=126.96.36.199 NETMASK=255.255.255.0 GATEWAY=188.8.131.52
If your Linode has a second IP address, edit the /etc/sysconfig/network-scripts/ifcfg-eth0:0 file to resemble the following. Replace 184.108.40.206 with the second IP address. No gateway should be specified for this IP address, as all traffic will be properly routed through the primary IP's gateway.
DEVICE=eth0:0 BOOTPROTO=none ONBOOT=yes IPADDR=220.127.116.11 NETMASK=255.255.255.0
Restart networking by issuing the following command:
service network restart
Edit the /etc/resolv.conf to resemble the following, replacing 18.104.22.168 and 22.214.171.124 with the DNS servers listed on the "Remote Access" tab in the Linode Manager.
nameserver 126.96.36.199 nameserver 188.8.131.52 options rotate
Make sure your package repositories and installed packages are up to date by issuing the following command:
Your system is now ready for cPanel installation.
Before proceeding, make sure you've purchased a cPanel license. You may obtain a license from the cPanel Store. Next, log into your Linode as the "root" user via SSH to its IP address (found on the "Remote Access" tab in the Linode Manager). Issue the following commands to download and install cPanel.
cd /home wget -N http://httpupdate.cpanel.net/latest sh latest /usr/local/cpanel/cpkeyclt
Please note that the installation process may take a long time to complete. Once it's done, you may access cPanel at https://184.108.40.206:2087 (replace 220.127.116.11 with your Linode's IP address). Log in with the username "root" and your root password.
Once you're logged into the cPanel control panel, you must read and accept the license agreement to continue.
Provide an appropriate contact email address. Optionally, you may enter an SMS address, AIM name, or ICQ number as well.
Enter the fully qualified domain name (FQDN) for your server.
Appropriate DNS resolvers should be automatically filled in for you, but you may wish to check the values listed against the "Remote Access" tab in the Linode Manager.
Make sure the main network device is set to eth0.
When presented with the "Setup IP Addresses" section, click "Skip This Step and Use Default Settings" to continue.
If you intend to use Linode's nameservers (or those provided by a third party) for authoritative DNS services, make sure you select "Disabled" in the "Name Server" column. You must list your desired nameservers in the fields provided.
If you wish to operate your own DNS servers on your Linode, you may select either "BIND" or "NSD" under the "Name Server" column. You must list the nameservers you set up in the "DNS Prerequisites" section of this document. We have a guide on setting up your own nameservers in WHM using a single IP address available Here.
We recommend against installing an FTP server on your Linode, as FTP is an outdated and insecure protocol. Instead, we recommend using SFTP to upload and download files. However, you may install an FTP server if you wish. SFTP is available by default for any main cPanel username. If you need to add file access for multiple users, you may want to install Pure-FTPd during the configuration phase.
Select a mail server for your Linode. Dovecot is the recommended option.
You may choose to enable or disable support for filesystem quotas. Unless you actually need to track disk usage on a per-user basis, it's best to leave this disabled.
That's it! cPanel should now be properly configured on your Linode. For product support, please be sure to contact cPanel support with any further questions you may have.
You may wish to consult the following resources for additional information on this topic. While these are provided in the hope that they will be useful, please note that we cannot vouch for the accuracy or timeliness of externally hosted materials.
This guide is licensed under a Creative Commons Attribution-NoDerivs 3.0 United States License.
Last edited by Brian O'Keefe on Friday, February 3rd, 2012 (r2725).