How to install Apache Server

What is Apache HTTP?

The Apache HTTP Server Project is a collaborative software development effort aimed at creating a robust, commercial, functional, and freely accessible source code implementation of an HTTP (Web) server. The project is jointly managed by a group of volunteers located around the world, who use the Internet and the Web to communicate, plan and develop the server and related documentation.

Apache installation on CentOS 7/RHEL 7

For the Apache installation we access our server and take the session of the root user to execute the following command list.

1. We execute the following command for the apache installation

yum install httpd

2. We execute the following command to start the apache services.

systemctl start httpd

3. We execute the following command to enable apache services.

systemctl enable httpd.service

Note: In opening ports for our apache server it is necessary that our firewall is installed and enabled on our server for the following command to work, please consult the firewall settings.

4. We enable the ports for our apache server with the following command.

firewall-cmd --add-service=http –permanent

5. We restart our firewall for the changes to take effect.

firewall-cmd --reload

How to check Apache status

Once the installation of our apache server is finished, we can start the services of our apache server, check the status, restart it, we can also edit our host and add a domain with which we want our apache server to respond.

1. we are going to enable the service of our apache server with the following command:

systemctl enable httpd

2. We start the services of our apache server with the following command:

systemctl start httpd

3. We check the status of our apache server with the following command:

systemctl status httpd

Redirecting to /bin/systemctl status httpd.service
httpd.service - The Apache HTTP Server
Loaded: loaded (/usr/lib/systemd/system/httpd.service; enabled; vendor preset: disabled)
Active: active (running) since Wed 2019-02-20 01:29:08 UTC; 5s ago
Docs: man:httpd(8)
man:apachectl(8)
Main PID: 1290 (httpd)
Status: "Processing requests..."
CGroup: /system.slice/httpd.service
├─1290 /usr/sbin/httpd -DFOREGROUND
├─1291 /usr/sbin/httpd -DFOREGROUND

If you have any questions, please feel free to contact Picaraza Domains Ltd support team 24/7/365.
Was this answer helpful?

Related Articles

CentOS & RHEL Repositories

The Linux repositories are a fundamental part in the stability and smooth operation of systems...

Remove packages in Linux

To eliminate packages in Linux we could do them in several ways: through the YUM or RPM command,...

Minimal installation of CentOS 7

CentOS 7, minimal installation To start with the installation of CentOS 7.3, we will need the...

How to create a network (Bridge) in CentOS 7/RHEL 7

Network (Bridge) on CentOS 7 / RHEL 7 The creation or configuration of a network bridge or...

GUI Gnome on CentOS 7/RHEL 7

Installing GUI Gnome on CentOS 7/RHEL 7 By default, the Linux installation is done with a...