how to install cpanel to linux server Print

  • 0

Installing cPanel on a Linux server is a straightforward process if your server meets the necessary requirements. Here's a detailed guide for supported operating systems like CentOS, AlmaLinux, and CloudLinux.


Prerequisites

  1. Supported OS: Ensure your server runs a supported operating system:
    • CentOS 7 or 8 (deprecated but still functional)
    • AlmaLinux 8 or 9
    • CloudLinux 8 or 9
  2. Server Requirements:
    • Minimum 1 GB RAM (2 GB recommended).
    • At least 20 GB disk space (more for production use).
    • Root access to the server.
  3. Fresh Installation: cPanel requires a clean server without pre-installed software like Apache, MySQL, or PHP to avoid conflicts.

Step 1: Update the System

  1. Log in to your server as root or a user with sudo privileges.
  2. Update the system:
    yum update -y
    

Step 2: Set the Hostname

Set a fully qualified domain name (FQDN) as the hostname:

hostnamectl set-hostname server.example.com

Replace server.example.com with your desired hostname.


Step 3: Disable SELinux

Disable SELinux to avoid conflicts during installation:

  1. Check SELinux status:
    sestatus
    
  2. If it's enabled, disable it temporarily:
    setenforce 0
    
  3. To disable it permanently, edit the configuration file:
    nano /etc/selinux/config
    
    Change SELINUX=enforcing to SELINUX=disabled.

Step 4: Install cPanel

  1. Navigate to the home directory:
    cd /home
    
  2. Download the cPanel installation script:
    curl -o latest -L https://securedownloads.cpanel.net/latest
    
  3. Run the script to install cPanel:
    sh latest
    
  4. The installation process will take 30–60 minutes, depending on your server resources.

Step 5: Access WHM (Web Host Manager)

  1. After installation, WHM (the admin interface for cPanel) will be accessible via:

    https://your-server-ip:2087
    

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

  2. Log in using:

    • Username: root
    • Password: Your root password.

Step 6: Configure cPanel/WHM

  1. On your first login, you'll be prompted to activate your cPanel license. You can purchase a license or use a trial license.
  2. Follow the setup wizard to configure:
    • Networking
    • Nameservers
    • Security settings

Optional Step: Install Additional Features

  • Add DNS cluster configurations.
  • Set up email, FTP, and database services for hosting accounts.

Important Notes

  • cPanel is a paid product, so you'll need a valid license to use it beyond the trial period.
  • Always secure your server by enabling a firewall, setting up SSH key authentication, and using a strong root password.

Let me know if you encounter any issues during installation!


Was this answer helpful?

« Back