Rackspace Support Network: Install Apache and PHP On Centos 6
Rackspace Support Network: Install Apache and PHP On Centos 6
Feedback
Log In
Sign Up
System Status
Our comprehensive Knowledge Center has been redesigned. We're calling it "How-To." Take a look!
How–To Home
Cloud Servers
Introduction
FAQ
All Articles
Have Feedback?
We love customer feedback. Help us improve our products and service by leaving your comments.
This article demonstrates how to install Apache and PHP on CentOS 6. CentOS 6 comes with Apache 2.2.3 and PHP
5.1.6, and you can install them by using the default CentOS Package Manager, yum. The advantages of using yum (as
opposed to installing by using source code) are that you get any security updates (when they are distributed) and
dependencies are automatically handled.
Install Apache
Starting httpd: httpd: Could not reliably determine the server's fully qualified domain
name, using 127.0.0.1 for ServerName
The IP address (shown in this example as 127.0.0.1) is used as the server name by default. In the following
steps, set the server name for the next time the server is started.
Apache runs on port 80. In some versions of CentOS, a firewall, which is installed by default, blocks access to port
80. Perform the following steps to open the port.
If the default CentOS Apache “welcome” screen is displayed, the installation was successful. Contact Rackspace
support if you have any problems.
Now that Apache is installed and working, set to start automatically when the server is rebooted.
Install PHP
The preceding command does not install all the modules available, just a few common ones.
3. Reload Apache.
4. sudo /usr/sbin/apachectl restart
Sign Up Now
Except where otherwise noted, content on this site is licensed under a Creative Commons Attribution-
NonCommercial-NoDerivs 3.0 Unported License
Support
Support Home
Rackspace How-To
Rackspace Community
API Documentation
Developer Center
About Rackspace
Our Story
Case Studies
Events
Programs
Newsroom
Blogs
Privacy Statement
Website Terms
Trademarks
Sitemap
Feedback