VPS & Dedicated Servers (Hosting Control Center) Help

How to install Apache server on CentOS

Apache Server is an HTTP server that's available for many modern operating systems, including CentOS. It has an open source that's developed and maintained by the Apache Software Foundation, an open community of developers. Apache Server was originally based on HTTPd, which was developed by the National Center for Supercomputing Applications. Development on HTTPd stalled in 1995, and Apache Server quickly overtook HTTPd as the most popular HTTP server in the world. The procedure for installing Apache Server generally includes starting the server and testing the installation.

DIFFICULTY Basic - 1 | Medium - 2 | Advanced - 3
RELATED PRODUCTS CentOS-based VPS or dedicated servers

Here is a quick tutorial on how to install Apache server on CentOS. You must be logged in as root to complete these steps.

Install the server

Apache Server is typically installed on CentOS by default. Install it manually with the following command:

# yum install httpd

Configure the apache service to start each time your machine boots with this command:

# chkconfig --levels 235 httpd on

Your screen should like the following screenshot at this point:

Start the server

Start Apache Server with the following command:

# apachectl start

Test the server

Go to http://localhost in your web browser. You should see an Apache test page if you have installed Apache Server correctly. The Apache test page for CentOS appears as follows:

Was This Article Helpful?
Thanks for your feedback. To speak with a customer service representative, please use the support phone number or chat option above.
Glad we helped! Anything more we can do for you?
Sorry about that. Tell us what was confusing or why the solution didn’t solve your problem.