Monthly Archives: December 2019

How to install apache (httpd) on CentOS 8

This tutorial will show you how to install the Apache web server on CentOS 8.

You will need to log into your CentOS 8 server and run the following commands:

  • sudo yum install httpd
    • When prompted press y to confirm the installation.
  • sudo service httpd start
    • This starts the apache service
  • sudo service httpd status
    • This insures that the service is running, your output should look similar to the output below.

  • sudo chkconfig httpd on
    • This insures that the apache service is powered on when the server boots.
  • Next create a file called index.html in the apache root directory by running the following command
    • sudo vi /var/www/html/index.html
  • Press i to go into insert mode and add the following text
    • <html> this is my web serer </html>
  • press esc and then type wq! to quit and save the file.
  • You can now navigate to your servers ip address or dns name, you should now see a screen similar to the one below.

 

A full video can be seen here: