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
-
Tweets that mention Install Apache on CentOS 5.4 | TXLANS.com -- Topsy.com
April 21st, 2010 on 11:34 pm[...] This post was mentioned on Twitter by Amp @ TXLANS. Amp @ TXLANS said: I like this page: http://soc.li/yrZSSPN [...]











March 10th, 2011 on 9:36 pm
This is great!!! thanks