How to Install cPanel on VPS Server Linux

Hostmara cheap vps Malaysia

This article explains a simple guide step-by-step how to install cPanel on a VPS Linux using the Linux VPS server service provided by Hostmara. This tutorial guides you through the basic installation and configuration of the cPanel / WHM web-based control panel.

By following this tutorial, Your server is ready to host multiple website on the cPanel server.

cPanel is a most favorite Hosting Control Panel in the web hosting industry and you can easily install and use it to manage multiple websites on single server.

cPanel / WHM System requirements

Before you install cPanel & WHM or cPanel DNSOnly®, make certain that your system meets all of minimum requirements for new installations.

Operating System Requirements

cPanel & WHM supports the following operating systems as follow:

  • CentOS 6, 7, 8 64-bit
  • AlmaLinux 7, 8, 9 64-bit
  • Rocky Linux 8, 9 64-bit
  • Ubuntu 20.04 LTS 64-bit
  • CloudLinux 7, 8 64-bit (Commercial OS)

Hardware Minimum Requirements

RAM : 1 Gb (recommended 2Gb)

CPU : 1 core (recommended 2 Ghz)

Disk space : 20Gb (recommended 40Gb)

Servers that host a large number of websites with associated email addresses and databases require more processing power, disk space, and RAM.

Hostmara cheap vps Malaysia

How to install cPanel on VPS / Server Linux

1. Login to your VPS/Server via the SSH Client.
2. Disable SELinux

You must disable SELinux to make your system compatible with cPanel & WHM.

Edit the /etc/selinux/config file using your favorit linux editor to set the SELINUX parameter to disabled, and then reboot the server.

How to Install cPanel on VPS Server Linux - HostmaraSave and exit the editor.

2. Copy the following single line linux command and paste it in the SSH Console. Then press enter.

# cd /home && curl -o latest -L https://securedownloads.cpanel.net/latest && sh latest

3. The cPanel Installation has begun. It can take from 20 to 30 minutes to complete.

cPanel installation begin - Hostmara4. Once the installation is complete, the console will display a message like “the cPanel Installation has been completed“.

the cPanel Installation has been completed5. Open https://your-server-IP-here:2087 (WHM)
6. Enter the username “root” (without quota) in the username field.
7. Enter your root password in the password field.
8. Click the “Login” button.

cPanel whm login page by HostmaraCongratulations!

Install cPanel on VPS / Server Linux has been successfully by following this how to install cPanel on VPS / Server linux, continue by create a basic configuration of the cpanel server using WHM (Web Hosting Manager).

cPanel/WHM Setup Wizard

Step 1: Read and accept the agreement.

cPanel Read and accept the agreement - HostmaraStep 2: Setup Networking:
Server Contact Email Address: Enter your email address. You will receive cPanel related alert on your email.
Hostname: If the hostname is ok, leave it as it is.
Resolvers: Enter 8.8.8.8 in primary and also enter 8.8.4.4 in secondary (you can use your own default network resolvers)

Scroll down to the end of page and click the “Save & Go to Step 3” button.

cPanel setup - step 2 - Setup Networking - HostmaraStep 3: If you have a more than one IP and the IPs are not listed, add your new IP address and then click the “Go to Step 4” button. Alternatively, if you do not have any additional IPs, simply click on “Go to Step 4“.

cPanel setup step 3 - current IP address - HostmaraStep 4:
1. Under “Nameserver Configuration“, you can choose a Nameserver program like Bind, PowerDNS, etc or leave it as it is.

2. Under “Choose which nameservers domains on this server will use” enter your domain nameserver such as ns1.example.com and ns2.example.com (Replace example.com with your domain name).

Cpanel setup - step 4 - Nameserver Configuration - Hostmara3. Under “Configure Address Records for Nameservers & Hostname“, mark the option “Configure Address Records for Nameservers“, enter your IP address in IPv4 for NS1 and NS2, and should you have an IPv6, enter it into the IPv6 field as well.

Tick mark the option “Add “A Entries” for Hostname” and then click on “Save & Go to Step 5“.

cPanel install, step 5 - Configure Address Records for Nameservers - HostmaraStep 5: You can leave all the options as they are or change them should you want it. Then click on “Save & Go to Step 6“.

cPanel setup on vps - Install common set of Perl Modules, step 5 - HostmaraStep 6 – (Final Step): Tick mark “Use file system quotas” and click the “Finish Setup Wizard” button.

setup cpanel on linux - step 6 (final) Initial Quotas - HostmaraCongratulations, the cPanel Installation is complete and now you will need to compile Easy Apache 4, change settings, install a firewall, add a domain to host on this server, etc.

Host a Website on cPanel Server

Step-by-step guide on how to host a website on WHM.

Access WHM and Create a cPanel Account

Once cPanel is successfully installed on your server by following how to install cPanel on VPS guide above, log in to WHM using your credentials. In WHM, navigate to the “Account Functions” section and select “Create a New Account.” This is where you’ll create a cPanel account that will be used to host a website on WHM.

cPanel Create a New Account - HostmaraConfigure Domain Settings for Website Hosting on WHM

After creating the cPanel account, it’s essential to configure your domain’s DNS settings. Set the name servers and any required DNS records to ensure your domain correctly points to the server where you’ll host your website on WHM.

Upload Your Website Files

To publish your website online, you need to upload your website files to the server.

Login to cPanel on your server using account information that you has been created above. Utilize the file manager within the cPanel account or an FTP client to transfer your website files into the ‘public_html‘ directory.

Create a Database (if needed)

If your website requires a database, you can easily create one using cPanel’s MySQL Databases. Remember to note down the database name, username, and password for future use.

Configure Email Accounts (if needed)

If you want email services associated with your hosted website on WHM, set up email accounts through cPanel. Login to cPanel and click Email Accounts feature.

Test Your Website Hosted on WHM

To ensure your website is functioning correctly, access it using your domain name. Test the site to make sure everything is working as expected.

Enhance Security for Your Website

To safeguard your hosted website on WHM, consider enhancing its security features. Implement SSL certificates and access controls to protect your website and user data effectively.

You can use free SSL from cPanel or Lets Encrypt SSL (my personal recommendation)

By following these steps, you’ll not only learn how to install cPanel on a VPS but also how to host a website on WHM. This comprehensive guide covers both aspects and will set you on the path to successfully hosting a website on your VPS using WHM.

Conclusion

In conclusion, installing cPanel on your VPS is a key step towards taking control of your web hosting environment. With the guidance provided in this tutorial, you’ve gained the skills to effectively manage your website and hosting resources. Whether you’re a beginner or an experienced user, cPanel simplifies the process of website management, making it accessible to all. So, go ahead and enjoy the benefits of efficient web hosting with your newly installed cPanel on VPS.

Are you having trouble how to install cPanel on VPS or any linux server? You can ask for our help contact Hostmara.

Hostmara contact technical support 24/7