How to install Apache on a CentOS 7 VPS

How to install Apache on a CentOS7 VPS

In this tutorial we will explain how to install Apache a CentOS 7 VPS.


The Apache HTTP Server is one of the most popular, free and powerful web server in the world. It is easy to use and you can administer it with ease and flexibility.

Installing Apache on a CentOS VPS is pretty easy and straight forward procedure.


First, you will need to log in to your VPS as ROOT via SSH. Once you are in you can clean-up yum (this is not a necessary step but it won’t hurt). To do that just type:

yum clean all

Another step that you can take and it is always a good practice is to update your packages. To do that just type:

yum -y update

Now, we can install Apache. To do that just type:

yum -y install httpd

And’t that’s it. To start the Apache service type:

systemctl start httpd

Next, we will need to configure Apache to start at the system boot automatically. To do that type the following command:

systemctl enable httpd

Here are couple of commands that you can find useful:

To check the Apache status type:

sudo systemctl status httpd

To stop Apache type:

systemctl stop httpd

To restart Apache type:

systemctl restart httpd

If you’re one of our Linux VPS Hosting customers we can help you install Apache on your virtual server for you free of charge. Just contact us and some of our experts will complete your request immediately.