How to install cpanel in ubuntu Print

  • 0

Installing cPanel on an Ubuntu server requires some specific configurations, as cPanel officially supports CentOS, CloudLinux, and AlmaLinux. However, you can use a workaround to install cPanel on Ubuntu by converting the OS to AlmaLinux first. Here's how to do it step by step:


Step 1: Update and Prepare the Server

  1. Update the system packages:

    sudo apt update && sudo apt upgrade -y
    
  2. Install necessary dependencies:

    sudo apt install curl wget -y
    
  3. Set a hostname (if not already set):

    sudo hostnamectl set-hostname your.hostname.com
    

    Replace your.hostname.com with your desired fully qualified domain name (FQDN).

  4. Ensure root access: Switch to the root user if you aren't already:

    sudo su
    

Step 2: Convert Ubuntu to AlmaLinux

Since cPanel doesn’t directly support Ubuntu, you’ll need to convert your server to AlmaLinux:

  1. Download the AlmaLinux conversion script:
    curl -o almalinux-deploy.sh https://raw.githubusercontent.com/AlmaLinux/almalinux-deploy/main/almalinux-deploy.sh
    
  2. Run the script to convert your OS:
    bash almalinux-deploy.sh
    
  3. Reboot the server:
    reboot
    

Step 3: Install cPanel on AlmaLinux

  1. Download the cPanel installation script:

    curl -o latest -L https://securedownloads.cpanel.net/latest
    
  2. Run the installation script:

    sh latest
    

    This process may take some time depending on your server's resources.

  3. During installation, follow the on-screen instructions. Once complete, cPanel and WHM (Web Host Manager) will be installed.


Step 4: Access WHM (Web Host Manager)

  1. After installation, WHM will be accessible via:

    https://your.server.ip:2087
    

    Replace your.server.ip with your server's IP address.

  2. Log in with the root username and password.


Step 5: Activate and Configure cPanel

  1. Once logged in, you’ll be prompted to activate your cPanel license. You can purchase a license or use a trial license for testing.
  2. Follow the WHM setup wizard to configure DNS, mail, and other server settings.

Important Notes:

  • Ensure that your server meets cPanel's minimum requirements.
  • For production environments, use a fresh server installation to avoid conflicts.
  • If you need assistance with licensing or additional configurations, you can contact cPanel support or consult their documentation.

Let me know if you encounter any issues during the process!


Was this answer helpful?

« Back