It’s pretty straightforward to install apache 2.2 on centos. download the source file and compile it, then make install.
cd /tmp wget http://download.nextag.com/apache//httpd/httpd-2.2.17.tar.gz tar zxvf httpd-2.2.17.tar.gz then switch to the decompressed folder ./configure --prefix=/opt/apache make make install #Done |
After that, start the httpd, there is one apachectl utility to control the start/stop operation of httpd
/opt/apache/bin/apachectl start #start the httpd daemon |
then browse to localhost:80, you will get the It works page. (httpd is working and listens on port 80)
you can change the index.html located in the /opt/apache/htdocs/ to something else like hello world.
run “ps -aux|grep httpd”, you will see the processes.
To add the httpd to service.
ln -s /opt/apache/bin/apachectl /etc/init.d/apache2 add it to the chkconfig |
No comments:
Post a Comment