Recommended Article:

Step 1 – Prerequsities

First of all, you need to add some required rpm repositories on your system. Use one of the below commands as per your operating systems.

Step 2 – Install Apache/PHP

After enabling the required yum repositories on your system. Now install the Apache and PHP packages on your system. This will install the latest available packages on your system. For CentOS and RHEL 7/6 For Fedora 31/30/29/28/27/26

Step 3 – Install PHP Modules

You also required installing PHP modules required for your application. The below command will install some frequently used PHP modules on your system. You may install any other modules with the same command. For CentOS and RHEL 7/6 For Fedora 31/30/29/28/27/26

Step 4 – Manage Apache Service

At this point, your system has installed the Apache web server, PHP, and modules. Now start the Apache server and also enable them to autostart on system boot. For CentOS/RHEL 7 and Fedora For CentOS/RHEL 6 As a result of this tutorial, you have successfully configured a web hosting environment on your Red Hat-based system. Recommended Article: