Apache http server is a open-source http server available for modern operating systems like Linux and Windows. Apache http server is owned and managed by Apache Software Foundation. Today we will explore how to install Apache http server on CentOS | RHEL 8
Install Apache http server
We will use yum for installing the httpd server. Login to your server via ssh and run below command. Make sure you have root privileges or sudo privilege for installing apache.
# yum install httpd
Press Y to accept and install the httpd package
Once httpd is installed, start the httpd service with below command
# systemctl start httpd
Run below command to enable and start the httpd service across reboots.
# systemctl enable httpd
Created symlink /etc/systemd/system/multi-user.target.wants/httpd.service → /usr/lib/systemd/system/httpd.service.
Run below systemctl command to check the httpd service status
# systemctl status httpd
Now we will install curl cli utility to check the httpd webserver functioning.
# yum install curl
# curl http://localhost
Conclusion
We have successfully installed Apache http webserver and also accessed it using the curl utility. Stay tuned for more such tutorials.