TXLANS.com

Basic Apache Install on CentOS 5.4

by amp on Apr.10, 2010, under Linux, Tutorials, Web Resources

Apache is probably the number 1 web service hosting software ever created.  With that said I get a lot of people always asking how to install it or some variation of.  Here’s an easy tutorial on it using CentOS 5.4 Linux using a Rackspace Cloud Server

1.    SSH into your Server

2.    Make sure you are root user.

3.    Update Yum with command : # yum update

4.    Download and install Apache with command : #  yum install httpd

5.    Set chkconfig run levels to ensure that apache starts up even if the system is rebooted with command : # chkconfig –levels 2345 httpd on

6.    Start Apache or httpd service with command : #  service httpd start.

7.    Flush your IP Tables and add port 22 for SSH (unless you changed it’s port) and also allow port 80 for apache/http connections.  I have also deleted the “RH-Firewall-1-INPUT” chain and set the default INPUT policy to “DROP”.

#  iptables -X RH-Firewall-1-INPUT

#  iptables -F

#  iptables -I INPUT -p tcp –dport 22 -j ACCEPT

#  iptables -I INPUT -p tcp –dport 80 -j ACCEPT

#  iptables -P INPUT DROP

#  service iptables save

8.  Congrats, you now have a basic apache install.

Notes : Apache’s configuration file is /etc/httpd/conf/httpd.conf and the default place to put all of your websites files are in /var/www/html/

:, , , , , , ,

Comments Closed

1 Comment for this entry

1 Trackback or Pingback for this entry

Looking for something?

Use the form below to search the site:

Still not finding what you're looking for? Drop a comment on a post or contact us so we can take care of it!

Visit our friends!

A few highly recommended friends...

Archives