Linux installation apache detailed

  
The following is the complete code to install apache under linux, the system is redhat5.5 download httpd-2.2.6.tar.bz2 put httpd-2.2.6.tar.bz2 under /soft [root@localhost ~]#cd /soft[root@localhost soft]#tar jxvf httpd-2.2.6.tar.bz2 //Unzip the Apache archive [root@localhost soft]#cd httpd-2.2.6 //Target to httpd- 2.2.6 Under the folder [root@localhost httpd-2.2.6]#ls //View the contents of the httpd-2.2.6 folder [root@localhost httpd-2.2.6]#./configure --help |  More //View the installation apache configuration parameters [root@localhost httpd-2.2.6] #./configure --prefix=/usr/local/apache --enable-so //Configure the apache path [root@localhost httpd-2.2. 6]#make //Compile apache[root@localhost httpd-2.2.6]#make install //Install apache[root@localhost httpd-2.2.6]#cd /usr/local/apache //Enter apache directory [ ,null,null,3],Root@localhost apache]# cd conf/[root@localhost conf]#cp -a httpd.conf httpd.conf- //Backup apache configuration file [root@localhost conf]#chkconfig --list httpd //Check if the httpd service is Already exist [root@localhost conf]#chkconfig httpd off //Close the system with httpd service, if there is httpd service [root@localhost conf]#service httpd status //View the status of httpd service [root@localhost conf ]#/usr/local/apache/bin/apachectl -k start //linux launch apache command [root@localhost conf]#netstat -an |  Grep :80 //Check if linux80 port is open [root@localhost conf]#ps -aux |  Grep httpd //View apache process under linux[root@localhost conf]#cd ../..[root@localhost local]#cp /usr/local/apache/bin/apachectl /etc/rc.d/init.d /apache //Copy apache startup script [root@localhost local]#vi /etc/rc.d/init.d/apache //Here is the editing apache startup script at the beginning of #! /bin/sh Add #chkconfig: 2345 85 15[root@localhost local]#chkconfig --add apache //Add apache service[root@localhost local]#chkconfig --list apache //list apache service[root @localhost local]#service apache stop //stop apache service [root@localhost local]#netstat -an |  Grep :80 //Check if port 80 of linux is closed [root@localhost local]#ps -aux |  Grep httpd //Check whether there is httpd service, if the original httpd service started will cause the newly added apache service to start fail [root@localhost local]#service apache start //Start the apache service to open your server ip address, See if the default home page of tomcat appears, if it appears, then congratulations on the installation of apache under linux has been successful
Copyright © Windows knowledge All Rights Reserved