1. Install Apache Server
Step 1: Update Your System
On RHEL-based systems:

Updating system (fedora)
Step 2: Install Apache Web Server
On RHEL-based systems:

Installing Apache web server
Step 3: Enable the Services
On RHEL-based systems:

Starting services for the Apache Web Server
Step 4: Test the Server by Hosting a Simple Website
First, we will create a directory for our test website using the following command.
Now we will add index.html for our test website along with some testing code using the following command.
Now we will add the configuration file using the following command
Once we create the required config file and test the website, we will need to own the Apache website directory for permissions.
We will use the chown and chmod commands as follows
Now you can see the locally hosted website on your localhost.

Testing the website on the local server
If the above-mentioned steps are performed correctly, Apache Web Server will run successfully! However, If it doesn't work, then you can uninstall Apache Web Server and start the installation again.
Step 5: Add firewall rules
To make our pages available to public, we will have to edit our firewall rules to allow HTTP requests on our web server using the following commands.
How to Uninstall Apache Web Server?
On RHEL-based systems
Hence, we have successfully uninstalled Apache Web Server in Linux!