Step Step Cara Install Apache on Centos

Step Step Cara Install Apache on CentosHasil gambar untuk install apache centos 7
Step 1:Install Apache

First, clean-up yum:
#sudo yum clean all

As a matter of best practice we’ll update our packages:
#sudo yum -y update

Installing Apache is as simple as running just one command:
#sudo yum -y install httpd


Step 2: Allow Apache Through the Firewall

Allow the default HTTP and HTTPS port, ports 80 and 443, through firewalld:
#sudo firewall-cmd --permanent --add-port=80/tcp
#sudo firewall-cmd --permanent --add-port=443/tcp

And reload the firewall:
#sudo firewall-cmd --reload

Step 3: Configure Apache to Start on Boot

And then start Apache:
#sudo systemctl start httpd

Be sure that Apache starts at boot:
#sudo systemctl enable httpd

To check the status of Apache:
#sudo systemctl status httpd

To stop Apache:
#sudo systemctl stop httpd

Sumber : https://www.liquidweb.com/kb/how-to-install-apache-on-centos-7/

0 Response to "Step Step Cara Install Apache on Centos"

Post a Comment