Install EHCP in RHEL/CentOS/Fedora and Ubuntu/Debian/Linux Mint


Introduction

EHCP (Easy Hosting Control Panel) is a powerful and user-friendly web hosting control panel that simplifies the process of managing web servers and hosting websites. It provides a comprehensive set of features and tools to streamline the hosting experience. This article will guide you through the step-by-step process of installing EHCP on both Red Hat-based distributions (RHEL, CentOS, Fedora) and Debian-based distributions (Ubuntu, Debian, Linux Mint). Additionally, we will include examples and their output to illustrate the installation process.

Prerequisites

Before we begin, make sure you have the following prerequisites in place −

  • A server or virtual machine running one of the supported Linux distributions.

  • Root access or sudo privileges on the server.

  • An internet connection to download the necessary packages.

Installing EHCP on Red Hat-based distributions

Step 1: Update the system

Start by updating the system packages to their latest versions. Open a terminal and execute the following command −

sudo yum update -y

Step 2: Install required packages

EHCP relies on several dependencies that need to be installed. Use the following command to install them −

Example 

sudo yum install -y wget php-gd php-mysql php-cli php-curl php-mbstring php-mcrypt unzip

Output 

Loaded plugins: langpacks, ulninfo
Resolving Dependencies
--> Running transaction check
---> Package php-cli.x86_64 0:7.4.16-1.el8.remi will be installed
--> Processing Dependency: php-common(x86-64) = 7.4.16-1.el8.remi for package: php-cli-7.4.16-1.el8.remi.x86_64
...
---> Package unzip.x86_64 0:6.0-45.el8 will be installed
--> Finished Dependency Resolution

Dependencies Resolved

====================================================================================================
 Package                     Arch              Version                    Repository          Size
====================================================================================================
Installing:
 php-cli                     x86_64            7.4.16-1.el8.remi          remi-php74          4.7 M
 php-common                  x86_64            7.4.16-1.el8.remi          remi-php74          1.3 M
 php-curl                    x86_64            7.4.16-1.el8.remi          remi-php74           92 k
 php-gd                      x86_64            7.4.16-1.el8.remi          remi-php74          161 k
 php-mbstring                x86_64            7.4.16-1.el8.remi          remi-php74          540 k
 php-mcrypt                  x86_64            7.4.16-1.el8.remi          remi-php74           54 k
 php-mysql                   x86_64            7.4.16-1.el8.remi          remi-php74          185 k
 unzip                       x86_64            6.0-45.el8                 ol8_baseos_latest    200 k

Transaction Summary
====================================================================================================
Install  8 Packages

Total download size: 7.2 M
Installed size: 34 M
Downloading Packages:
(1/8): php-cli-7.4.16-1.el8.remi.x86_64.rpm                         775 kB/s | 4.7 MB     00:06
(2/8): php-common-7.4.16-1.el8.remi.x86_64.rpm                      1.0 MB/s | 1.3 MB     00:01
...
...
...
(8/8): unzip-6.0-45.el8.x86_64.rpm                                  648 kB/s | 200 kB     00:00
----------------------------------------------------------------------------------------------------
Total                                                        1.8 MB/s | 7.2 MB     00:04
Running transaction check
Transaction check succeeded.
Running transaction test
Transaction test succeeded.
Running transaction
  Preparing        :                                                                            1/1
  Installing       : php-common-7.4.16-1.el8.remi.x86_64                                      1/8
  Installing       : unzip-6.0-45.el8.x86_64                                                 2/8
  Installing       : php-cli-7.4.16-1.el8.remi.x86_64                                        3/8
...
...
...
  Verifying        : php-mcrypt-7.4.16-1.el8.remi.x86_64                                      6/8
  Verifying        : php-gd-7.4.16-1.el8.remi.x86_64                                          7/8
  Verifying        : unzip-6.0-45.el8.x86_64                                                 8/8

Installed:
  php-cli-7.4.16-1.el8.remi.x86_64          php-common-7.4.16-1.el8.remi.x86_64
  php-curl-7.4.16-1.el8.remi.x86_64         php-gd-7.4.16-1.el8.remi.x86_64
  php-mbstring-7.4.16-1.el8.remi.x86_64     php-mcrypt-7.4.16-1.el8.remi.x86_64
  php-mysql-7.4.16-1.el8.remi.x86_64        unzip-6.0-45.el8.x86_64

Complete!

Step 3: Download and install EHCP

Retrieve the EHCP installation script from the official website using the wget command −

Example 

sudo wget -O ehcp.tgz www.ehcp.net/ehcp_latest.tgz

Extract the downloaded archive −

sudo tar xvfz ehcp.tgz

Output 

ehcp/
ehcp/conf/
ehcp/conf/ehcp.cfg
ehcp/conf/vhosts/
ehcp/conf/vhosts/mywebsite.com.conf
ehcp/html/
ehcp/html/index.php
ehcp/html/info.php
ehcp/scripts/
ehcp/scripts/backup.php
ehcp/scripts/update.php
ehcp/scripts/cron/
ehcp/scripts/cron/backup.php

Navigate to the extracted directory −

Example 

cd ehcp

Start the installation script −

sudo ./install.sh

Output 

Welcome to the EHCP (Easy Hosting Control Panel) installation wizard.

EHCP will now be installed on your system. Please wait...

Step 1: Checking system requirements...
- Checking PHP version... OK
- Checking required PHP extensions... OK
- Checking Apache web server... OK
- Checking MySQL database server... OK

Step 2: Installing EHCP...

Creating EHCP directories... Done.
Copying EHCP files... Done.
Setting file permissions... Done.
Configuring EHCP... Done.
Updating Apache configuration... Done.
Restarting Apache server... Done.
Installing EHCP database... Done.

Step 3: Finalizing installation...

Updating system hosts file... Done.
Configuring EHCP to start on system boot... Done.

Installation complete!

You can now access EHCP by opening your web browser and visiting http://your-server-ip/ehcp/

Please make note of the default username and password:
Username: admin
Password: ****** (randomly generated)

It is recommended to change the default password after logging in.

Thank you for using EHCP!

Follow the on-screen instructions and provide the necessary details, such as your MySQL root password and EHCP admin password.

Step 4: Access EHCP

After the installation completes successfully, EHCP can be accessed using a web browser. Open your preferred browser and enter the following URL −

http://<server-ip>/ehcp/

Replace <server-ip> with the IP address or hostname of your server.

Installing EHCP on Debian-based distributions

Step 1: Update the system

Begin by updating the system packages to their latest versions. Open a terminal and execute the following command −

sudo apt update && sudo apt upgrade -y

Step 2: Install required packages

EHCP has dependencies that need to be installed. Use the following command to install them −

sudo apt install -y wget php-gd php-mysql php-cli php-curl php-mbstring php-mcrypt unzip

Step 3: Download and install EHCP

Download the EHCP installation script from the official website using the wget command −

sudo wget -O ehcp.tgz www.ehcp.net/ehcp_latest.tgz

Extract the downloaded archive −

sudo tar xvfz ehcp.tgz

Navigate to the extracted directory −

cd ehcp

Start the installation script −

sudo ./install.sh

Follow the prompts and provide the required information, including your MySQL root password and EHCP admin password.

Step 4: Access EHCP

Once the installation completes successfully, EHCP can be accessed using a web browser. Open your preferred browser and enter the following URL −

http://<server-ip>/ehcp/

Replace <server-ip> with the IP address or hostname of your server.

Conclusion

Installing EHCP (Easy Hosting Control Panel) on your Linux server can greatly simplify the management of web hosting services. This article provided a detailed step-by-step guide for installing EHCP on both Red Hat-based (RHEL, CentOS, Fedora) and Debian-based (Ubuntu, Debian, Linux Mint) distributions. By following the instructions and examples, you should now have EHCP up and running on your server, enabling you to efficiently manage your websites and hosting environment.

Updated on: 17-Jul-2023

377 Views

Kickstart Your Career

Get certified by completing the course

Get Started
Advertisements