Bootstrap FreeKB - Apache (Web Server) - Install HTTPD in Linux
Apache (Web Server) - Install HTTPD in Linux

Updated:   |  Apache (Web Server) articles

Use yum to install httpd.

yum install httpd

 

The ps command can be used to determine if your system is using init or systemd. If PID 1 is init, then you will use the service command. If PID 1 is systemd, then you will use the systemctl command.

If your system is using systemd, use the systemctl command to start and enable httpd.

systemctl enable httpd
systemctl start httpd
systemctl status httpd

 

If your system is using init, use the chkconfig and service commands to start and enable httpd.

chkconfig httpd on
service httpd start
service httpd status

 

On a PC in the same subnet as the web server, navigate to http://x.x.x.x (replace x.x.x.x with the IP address of the web server). The default page should be displayed.

 

There are many configurations that can be made to the /etc/httpd/conf/httpd.conf file. For now, the only setting is to remove the comment from ServerName and to enter the hostname and port of your server.

ServerName www.example.com:80

 




Did you find this article helpful?

If so, consider buying me a coffee over at Buy Me A Coffee



Comments


Add a Comment


Please enter b3b377 in the box below so that we can be sure you are a human.