Step 1: Install Apache
First, clean-up yum:
sudo yum clean all
As a matter of best practice we’ll update our packages:
The Apache web server is one of the most popular and powerful web servers in the world, due to its ease of administration and flexibility. In this tutorial we will install Apache on a server that doesn’t have a web server or database server already installed.
First, clean-up yum:
sudo yum clean allAs a matter of best practice we’ll update our packages:
sudo yum -y updateInstalling Apache is as simple as running just one command:
sudo yum -y install httpdAllow the default HTTP and HTTPS port, ports 80 and 443, through firewalld:
sudo firewall-cmd --permanent --add-port=80/tcpsudo firewall-cmd --permanent --add-port=443/tcpAnd reload the firewall:
sudo firewall-cmd --reloadAnd then start Apache:
sudo systemctl start httpdBe sure that Apache starts at boot:
sudo systemctl enable httpdTo check the status of Apache:
sudo systemctl status httpdTo stop Apache:
sudo systemctl stop httpd