Apache Httpd install/set up on Centos/RedHat 6

For starters, make sure your repository is set up
And ofcourse the server should be able to ping the gateway
Then proceed to run the commands below.

  1. yum install httpd                  ==>  to install httpd
  2. service httpd start                ==> to start apache
  3. chkconfig httpd on               ==>  makes sure httpd starts on reboot
  4. vi /etc/sysconfig/iptables     ==> to open port for http which is 80
  5. service restart iptables        ==>  this restarts iptables (NB any change to the file needs a restart)
  6. cd  /var/www/html
  7. create a file called index.html in here with random content
  8. service httpd restart             ==>  restarts apache
  9. Now in your browser, type in the ip address of your server

Leave a Reply

Your email address will not be published. Required fields are marked *