cPanel is the most popular Linux based web hosting control panel. It provides a graphical user interface to easily manage and host multiple websites on a single VPS or dedicated server. With the help of its powerful GUI, we can easily perform most of the tasks we perform on a website’s server using the command line, for example, uploading files, creating emails, setting cron jobs, handling databases, etc. WHM (Web Host Manager) provides a root and reseller level access interface where users can manage settings related to server administration and account management. cPanel provides a user-level access interface where user can manage their web hostings.
Features of cPanel/WHM
cPanel/WHM comes with a lot of notable features, some of which are listed below.
- Multilingual GUI interface to manage server and client websites.
- Built-in file manager and phpMyAdmin to easily manage files and databases.
- DNS support and management for both server and client websites.
- Email management with DKIM and SPF support for authentication and encryption.
- Easy SSL/TLS management for multiple domains using SNI.
- Easy Backup and Migration of client accounts within different servers.
- Can be easily integrated with almost all client management and billing software like WHMCS, Blesta, etc.
Prerequisites
- A Fresh VPS, Cloud Server, or Dedicated Server running CentOS 7 or CentOS 7.2. You can also choose from a wide range of Cloud VPS Servers directly from us if you don’t have one already.
- A Static/Real IP address, cPanel can not work on a dynamic IP address which is allocated dynamically if you have DHCP enabled on your ethernet interface.
- Minimum 1 GB RAM but it is recommended that you have 2 GB of RAM.
- Minimum 20 GB Disk Space but it is recommended that you have at least 40 GB Disk Space.
- Root access to your server.
Notes
- cPanel, once installed can not be removed from your server as it does not have any uninstaller. To remove cPanel you will have to reinstall your Operating System.
- cPanel is commercial software and requires a license to work but cPanel offers a 15-day trial, you can install your software using the trial and you can purchase the software later. The trial is automatically activated once cPanel is installed on your server.
Point your CentOS server to XeonBD’s CentOS mirror server:
Edit the CentOS-Base.repo file by following the following steps:
vi /etc/yum.repos.d/CentOS-Base.repo or nano /etc/yum.repos.d/CentOS-Base.repo and make the following changes on this file.
# CentOS-Base.repo
#
# The mirror system uses the connecting IP address of the client and the
# update status of each mirror to pick mirrors that are updated to and
# geographically close to the client. You should use this for CentOS updates
# unless you are manually picking other mirrors.
#
# If the mirrorlist= does not work for you, as a fall back you can try the
# remarked out baseurl= line instead.
#
#
[base]
name=CentOS-$releasever – Base
#mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=os&infra=$infra
baseurl=http://mirror.xeonbd.com/centos/$releasever/os/$basearch/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7
#released updates
[updates]
name=CentOS-$releasever – Updates
#mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=updates&infra=$infra
baseurl=http://mirror.xeonbd.com/centos/$releasever/updates/$basearch/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7
#additional packages that may be useful
[extras]
name=CentOS-$releasever – Extras
#mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=extras&infra=$infra
baseurl=http://mirror.xeonbd.com/centos/$releasever/extras/$basearch/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7
#additional packages that extend functionality of existing packages
[centosplus]
name=CentOS-$releasever – Plus
#mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=centosplus&infra=$infra
baseurl=http://mirror.xeonbd.com/centos/$releasever/centosplus/$basearch/
gpgcheck=1
enabled=0
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7
#contrib – packages by Centos Users
[contrib]
name=CentOS-$releasever – Contrib
#mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=contrib&infra=$infra
baseurl=http://mirror.xeonbd.com/centos/$releasever/contrib/$basearch/
gpgcheck=1
enabled=0
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7
Point your server to XeonBD’s cPanel mirror server:
To point your server to XeonBD’s cPanel mirror server create a file /etc/cpsources.conf file and add HTTPUPDATE=cpanel-mirror.xeonbd.com
So, using your favorite editor create the file eg. vi /etc/cpsources.conf or nano /etc/cpsources.conf which will have the following value
HTTPUPDATE=cpanel-mirror.xeonbd.com
Repo files are now updated. Let’s clean up our local yum cache, and make sure everything is working.
yum clean all
yum repolist
As long as yum repolist runs and you get no errors, that means everything is working as expected! But if you are facing any problems don’t forget to contact our support team by clicking here.
Installation of cPanel/WHM
Before installing cPanel you must have Perl installed on your server as cPanel is written in Perl. To install Perl on your system, log in as a root user and run the following command.
yum -y install perl
Now you will need to set the hostname for your server. A hostname is a FQDN or Fully Qualified Domain Name which will be used to identify your server. For example, consider vps.mydomain.com – this is a FQDN that you can use as your hostname. To change your hostname run the following command
hostname vps.mydomain.com
You can replace vps.mydomain.com with your hostname. You must own the domain of which you are setting up the hostname.
Next, you will need to change your current directory to /home directory, and run the following command to do this.
cd /home
Download the installation script from the cPanel website and run the installation script by executing the following command –
curl -o latest -L https://securedownloads.cpanel.net/latest && sh latest
This will start your cPanel installation, you can now sit back and relax as the installation takes around half an hour to complete. Once the installation script is finished you will be able to open your browser and go to https://your-server-ip:2087 to access WHM. Login with username root and your root account’s password. Make sure that you use https to access WHM in the browser. For example, if your IP is 192.168.0.119 then you will have to go to https://192.168.0.119:2087
That’s it you are done!