Guide: How to install cPanel on AlmaLinux 8 and 9 VPS?

Helposoft Staff

Administrator
Staff member
Points
178
To install cPanel on your VPS, follow these steps. cPanel is a popular web hosting control panel that simplifies the management of web servers. The installation process assumes you have a fresh installation of a compatible Linux distribution (such as CentOS, AlmaLinux, or RHEL) and that you have root or sudo access to the VPS.

1. Prepare Your VPS

  1. Ensure a Fresh OS Installation:
    • It's best to start with a clean installation of a supported operating system. cPanel is compatible with CentOS 7/8, AlmaLinux 8, and RHEL 8.
  2. Update Your System:
    • Before installing cPanel, make sure your system is up to date:

      Code:
      yum update -y
  3. Set the Hostname (Optional):
    • Set a proper hostname for your server. For example:

      Code:
      hostnamectl set-hostname server.example.com

2. Install Required Dependencies

  1. Install Required Packages:
    • Ensure you have the required packages installed. For CentOS/AlmaLinux/RHEL, you may need wget and perl:

      Code:
      yum install -y wget perl

3. Download and Install cPanel

  1. Download the cPanel Installation Script:
    • Get the latest cPanel installation script using wget or curl:

      Code:
      cd /home
      wget -N https://securedownloads.cpanel.net/latest

      or

      Code:
      cd /home
      curl -o latest -L https://securedownloads.cpanel.net/latest
  2. Run the Installation Script:
    • Start the installation process by running the script:

      Code:
      sh latest
    • This script will handle the installation of cPanel & WHM. The installation process can take a significant amount of time, often between 30 minutes to an hour, depending on your server's resources and network speed.

4. Complete the Initial Setup

  1. Access the cPanel/WHM Setup Wizard:
    • Once the installation is complete, you can access the cPanel/WHM interface via your web browser. Use the IP address of your server or your domain name (if DNS is configured) and the port 2087:

      Code:
      https://your-server-ip:2087
  2. Log in to WHM:
    • Use root as the username and the root password for your VPS to log in to WHM (WebHost Manager).
  3. Follow the Setup Wizard:
    • The WHM setup wizard will guide you through the initial configuration steps, including:
      • License Agreement: Accept the cPanel license agreement.
      • Server Setup: Configure basic server settings like contact information and nameservers.
      • Networking Setup: Set up networking configurations, including IP addresses.
      • Services Setup: Configure various services such as Apache, MySQL, and Exim.
      • Create Initial Admin Account: Create the initial cPanel account.

5. Post-Installation Steps

  1. Secure Your Server:
    • Ensure that your server is secure by configuring firewall rules, disabling unused services, and regularly updating your software.
  2. Configure DNS:
    • If your server is going to be hosting websites, configure DNS settings to point your domain names to the server’s IP addresses.
  3. Install SSL Certificates:
    • You may want to install SSL certificates for your server to secure web traffic.
  4. Back Up Your Configuration:
    • Regularly back up your cPanel configurations and data to avoid data loss.

Additional Resources

  • cPanel Cheap License: LicenseDash - $4/mo VPS and $6/mo Dedicated Server

Summary

  1. Prepare the VPS: Update your system and set a hostname.
  2. Install Dependencies: Ensure required packages are installed.
  3. Download and Install: Use the cPanel installation script.
  4. Complete Setup: Access the WHM setup wizard and configure initial settings.
  5. Post-Installation: Secure your server and configure DNS and SSL.
Following these steps will set up cPanel on your VPS, allowing you to manage websites, domains, and server settings through the user-friendly cPanel interface. If you encounter issues or need further assistance, feel free to ask!
 
Top