If your company is looking to offer web hosting, you need to look into cPanel. Here's how to install this powerhouse tool on CentOS 7.
cPanel is one of the most popular and trusted names in web hosting control panels. Chances are, if your business farms out your web hosting to a third-party, you manage those web sites through cPanel. Before we get too far into this, you must know that cPanel isn't free. Although the pricing isn't exorbitant, it could turn some people away. Check out the price/feature matrix, before continuing on here, to see if cPanel is within your budget.
What can cPanel do for you? How about this list of services and features that can be administered via this user-friendly interface:
And with the addition of WHM (which will install by default), you can also work with:
- User accounts
- Investment protection
- Server monitoring
- Transfer & backups
If you're still reading, the cPanel pricing didn't scare you off and the features intrigued you.
If you're hoping to install cPanel on your own server to make administration exponentially easier, let's get that done. I'll be demonstrating how to do this on CentOS 7. I will assume you already have CentOS 7 up and running and ready to host cPanel.
With that said, let's get to the installation.
What you'll need
Obviously, you need CentOS 7. Outside of that, you'll have to have the following:
- A public/static IP address (cPanel can not work with a dynamic IP address), so make sure you've configured CentOS 7 with a static address
- Minimum 1 GB RAM (2 GB recommended)
- Minimum 20 GB Disk Space (40 GB recommended)
- Root access to your server
- Your server hostname set in a fully qualified domain name (in the form localhost.localdomain.lan)
- A good amount of time
Don't let that last bit scare you off. Although the installation of cPanel does take considerable time, it is actually much easier than you might think.
With that said, it's time.
Log into your CentOS 7 server and open a terminal window. From that window, install Perl with the command:
yum install perl
Now download the official cPanel install script with the following command:
curl -o latest -L https://securedownloads.cpanel.net/latest
Next, issue the command su and type your root user password. Once you've changed to the root user, issue the command sh latest to run the installation script. This is where you should go about the business of the day, as this installation will take considerable time (between 30-90 minutes, depending upon your hardware and network connection).
When that script completes, you can then log into your cPanel server by pointing a browser to https://SERVER_IP:2087. Make sure to access cPanel with the user root and your root password set for the CentOS 7 server.
At this point, you will walk through a simple setup wizard. The steps include:
- License agreement
- Network setup
- IP Address(es) setup
- Nameserver setup
As you walk through the wizard (Figure A), make sure to pay close attention and fill out each completely and correctly.
There should be nothing in the Setup Wizard to trip you up (it's all fairly straight forward).
Verifying your license
Once installed, you should be good to go for the 15 day trial period. Once that expires, you have no choice but to purchase and verify a license. Once you've purchased your license, the license verification process isn't nearly as simple as it should be. Point your browser to verify.cpanel.net, enter your server's public IP address, and click Verify License. If the server is licensed, go back to the terminal window and issue the command (as root):
The above command will update the license on the server and you are good to start managing your server with cPanel.
Power at your fingertips
You'd be hard-pressed to find a more powerful (and user-friendly) web hosting control panel than cPanel. This tool is used by hosting providers across the globe with good reason. Give it a go today and see if you aren't purchasing a full license well before your trial is up.
- How to enable https on Apache CentOS (TechRepublic)
- How to install Config Server Firewall on CentOS 7 (TechRepublic)
- How to create a new domain account with CENTOS Webpanel (TechRepublic)
- The Build Your Web Business Bundle (TechRepublic Academy)
- Popular CentOS Linux server gets a major refresh (ZDNet)