How to Install Apache Server in CentOS 7

How to Install Apache Server in CentOS 7

How to install Apache in CentOS 7: Today many servers run on Linux systems for many reasons. Currently, Apache is the most popular web server on the Internet. Lots of active websites are based on Apache web servers. Here, I will show how to install Apache in CentOS 7 or RHEL 7.

 

The Apache Web Server

It is a server based on HTTP daemon (httpd) which provides simple and secure access to all types of content using either HTTP or HTTPS protocol.

The National Center for Supercomputing Applications (NCSA) developed Apache. Apache is under constant development by the Apache Software Foundation.

RHEL 7 includes Apache 2.4 while RHEL 6 included Apache 2.2. Apache 2.4 comes with the best possible security from the risks.

Apache can be integrated with easily with any software. The most popular stacks are WAMP, LAMP, and XAMPP. This software stacks come with basic integrated components like Apache, MySQL and any of the three scripting languages (PHP, Python, or Perl).

 

Installation

Like any other packages installation, install Apache using yum command. The RPM packages required by the Apache are found in the Web Server package group.

To install Apache, run the following command:

#yum install httpd

 

However, other additional packages are required as the above command would install only the httpd RPM package. So, to install Apache with other mandatory and packages associated with the Web Server package, use the following command:

#yum install web-server

Now the Apache is installed in your system.

Use the following command to make sure that Apache starts automatically when your system boots next time.

#systemctl enable httpd

Check whether the previous command was successful or not by using the following command:

#systemctl is-enabled httpd

Now start the Apache service with the following command:

#systemctl start httpd

Conclusion

To test whether your Apache server is running successfully or not, after completing the above steps, use your best web browser and enter the following URL.

http://localhost

If your installation is successful, the default testing page would get displayed.

You may also like to read:

  1. 15 Linux Command One Must Know
  2. Basic Bash Shell Command
  3. Some Shell Script Examples
  4. Phone-book Using Shell Scripting
  5. OpenCV with Python 3.x Installation