Wednesday, 15 August 2018

How to install Apache web Server on CentOS 7/RHEL 7



The Apache web Server is an open source web server to serve the hosted web pages and contents. It runs on Unix-like operating systems including Linux and Windows OS.  It is available on CentOS 7/ RHEL 7 default repositories.

Installing Apache web server packages and its dependencies:

Run the below command to install the httpd package:

[root@linuxcnf ~]# yum install httpd

Run the below commands to start the httpd service and enable on startup:

[root@linuxcnf ~]# systemctl start httpd
[root@linuxcnf ~]# systemctl enable httpd
Created symlink from /etc/systemd/system/multi-user.target.wants/httpd.service to /usr/lib/systemd/system/httpd.service.
[root@linuxcnf ~]#

Configuration files Location:

The apache main configuration file is /etc/httpd/conf/httpd.conf and other configuration files are located under /etc/httpd/conf.d/.

Testing Apache web server:

Check the working status by browsing a URL http://<Server_IP/Server_Hostname> and see a default test page on browser.

No comments:

Post a comment