How to Install cPanel or Web Hosting Control Panel on Your VPS

Installing a web hosting control panel like cPanel on your VPS allows you to manage websites, domains, email accounts, and more efficiently. This guide will take you through the process of setting up cPanel or a similar control panel on your VPS.


Step 1: Verify Your VPS Specifications

Before installing a web hosting control panel, ensure your VPS meets the system requirements.

  • Minimum RAM: At least 2 GB is recommended for cPanel.
  • Disk Space: At least 20 GB of available storage.
  • Operating System: Ensure your VPS is running a supported OS like CentOS, AlmaLinux, or Ubuntu.

Step 2: Update the System

Updating your VPS ensures all dependencies and packages are up to date. Run the following commands:

sudo apt update && sudo apt upgrade -y    # For Debian-based systems  
sudo yum update -y                        # For RHEL-based systems  
  • Reboot the server if required.
  • Confirm the updates are applied successfully.

Step 3: Set a Hostname

cPanel requires a fully qualified domain name (FQDN) as the hostname. Set it using the command:

sudo hostnamectl set-hostname yourdomain.com  
  • Replace yourdomain.com with your desired hostname.
  • Verify the hostname using hostnamectl.

Step 4: Install Perl

cPanel requires Perl to run. Install it using:

sudo yum install perl -y                   # For RHEL-based systems  
sudo apt install perl -y                   # For Debian-based systems  
  • Confirm the installation by running perl -v.

Step 5: Download the cPanel Installation Script

Download the cPanel installation script using the following command:

cd /home  
curl -o latest -L https://securedownloads.cpanel.net/latest  
  • Ensure the script is downloaded without errors.

Step 6: Run the cPanel Installation Script

Run the downloaded script to start the installation process:

sh latest  
  • The installation process may take 30-60 minutes to complete.
  • Monitor the output for any errors.

Step 7: Access the cPanel Interface

Once the installation is complete, access the cPanel web interface:

  1. Open a web browser and navigate to:
    https://your-server-ip:2087  
    
  2. Log in using the root credentials of your VPS.
  3. Follow the setup wizard to configure cPanel for your server.

Step 8: Configure Basic Settings

After logging in, configure basic settings in cPanel:

  • Add your primary domain.
  • Set up nameservers.
  • Create user accounts for hosting websites.

Step 9: Test Your cPanel Setup

Ensure everything is working correctly:

  • Create a test website or upload a sample HTML file.
  • Test email functionality and database setup.

Step 10: Keep cPanel Updated

Regular updates are essential for security and performance. Enable automatic updates or run updates manually using:

/ scripts/upcp  

By following these steps, you can successfully install and configure cPanel or a similar web hosting control panel on your VPS, enabling efficient server and website management.

Was this answer helpful? 0 Users Found This Useful (0 Votes)