--apache installation of server Building
: http://httpd.apache.org/download.cgi
In the event of an accident:
Download httpd-2.2.6.tar.bz2 put the httpd-2.2.6.tar.bz2 under the/soft.
[[Email protected] ~] #cd/soft
[[email protected] soft] #tar JXVF httpd-2.2.6.tar.bz2//Unzip the Apache package
[[email protected] soft] #cd httpd-2.2.6//Navigate to the httpd-2.2.6 folder
[[email protected] httpd-2.2.6] #ls//View the contents of the Display httpd-2.2.6 folder
[Email protected] httpd-2.2.6]#./configure--help | More//View install Apache configuration parameters
[[email protected] httpd-2.2.6]#./configure--prefix=/usr/local/apache--enable-so//Configure Apache Path
[[email protected] httpd-2.2.6] #make//Compile Apache
[[email protected] httpd-2.2.6] #make Install//installation Apache
[[email protected] httpd-2.2.6] #cd/usr/local/apache//Enter Apache directory
[Email protected] apache]# CD conf/
[[email protected] conf] #cp-a httpd.conf httpd.conf-//backup Apache configuration file
[[email protected] conf] #chkconfig--list httpd//See if the HTTPD service already exists
[[email protected] conf] #chkconfig httpd off//Shut down system comes with httpd service if there is httpd service
[[email protected] conf] #service httpd status//view your own httpd service status
[[email protected] conf]#/usr/local/apache/bin/apachectl-k start//linux launch Apache command
[[email protected] conf] #netstat-an | GREP:80//See if the linux80 port is turned on
[[email protected] conf] #ps-aux | grep httpd//linux under View Apache process
[[email protected] conf] #cd. /..
[[email protected] local] #cp/usr/local/apache/bin/apachectl/etc/rc.d/init.d/apache//copy Apache boot script
[[email protected] local] #vi/etc/rc.d/init.d/apache//This is the edit Apache startup script
At the beginning of the #! /bin/sh below add
#chkconfig: 2345 85 15
[[email protected] local] #chkconfig--add Apache//Add Apache Service
[[email protected] local] #chkconfig--list Apache//list Apache Service
[[email protected] local] #service Apache stop//Stop Apache Service
[[email protected] local] #netstat-an | GREP:80//Check whether the 80 port of Linux is off
[[email protected] local] #ps-aux | grep httpd//To see if a httpd service exists, and if the previous httpd service starts, the newly added Apache service fails to start
[[email protected] local] #service Apache start//Start Apache Service
Open your server IP address to see if there's a Tomcat default home page, and if so, congratulations.
Installing Apache under Linux has been successful.
If the error message when compiling:
Checking for APR ... no
Configure:error:APR not found. Please read the documentation
Workaround:
1. Download the required packages:
- wget http://archive.apache.org/dist/apr/apr-1.4.5.tar.gz
- wget http://archive.apache.org/dist/apr/apr-util-1.3.12.tar.gz
- wget Http://jaist.dl.sourceforge.net/project/pcre/pcre/8.10/pcre-8.10.zip
The steps are as follows:
A: Solve Apr not found problem >>>>>>
- [Email protected] test]# TAR-ZXF apr-1.4.5.tar.gz
- [Email protected] test]# CD apr-1.4.5
- --prefix =/usr/local/apr
- [[email protected] apr-1.4.5]# make && make install
B: Solve apr-util not found problem >>>>
- [Email protected] test]# TAR-ZXF apr-util-1.3.12.tar.gz
- [Email protected] test]# CD apr-util-1.3.12
- --prefix --with- Apr =/usr/local/apr/bin/apr-1-config
C: Solve pcre problem >>>>>>>>>
- [[email protected] test] #unzip-o pcre-8.10.zip
- [[email protected] test] #cd pcre-8.10
- --prefix =/usr/local/pcre
4. When you finally compile Apache, add:
--with-apr=/usr/local/apr
--with-apr-util=/usr/local/apr-util
--with-pcre=/usr/local/pcre
Successful compilation completed ~
--apache installation of server Building