1. Download apache2.4 package, unzip the website
2. Since 2.4 requires an additional APR, it is necessary to compile and install Apr
Otherwise you will get an error checking for APR ... no
Configure:error:APR not found. Please read the documentation
3. 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
4. Compile and install:
- Yum Remove apr-util-devel Apr apr-util-mysql apr-docs apr-devel apr-util Apr-util-docs
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
- [Email protected] apr-1.4.5]#/configure --prefix=/usr/local/apr
- [[email protected] apr-1.4.5]# sudo make && sudo 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
- [Email protected] apr-util-1.3.12]#/configure --prefix=/usr/local/apr-util--with-apr=/usr/local/apr/bin /apr-1-config
- [[email protected] apr-util-1.3.12]# sudo make && sudo make install
C: Solve pcre problem >>>>>>>>>
- [Email protected] test]# Unzip-o pcre-8.10.zip
- [Email protected] test]# CD pcre-8.10
- [Email protected] pcre-8.10]#/configure --prefix=/usr/local/pcre
- [[email protected] pcre-8.10]# sudo make && sudo make install
4. When you finally compile Apache, add:
Go to Apache download directory
./configure--prefix=/usr/local/myapache--with-apr=/usr/local/apr--with-apr-util=/usr/local/apr-util--with-pcre =/usr/local/pcre
Successful compilation completed ~
5. Launch Apache
Sudo/usr/local/myapache/bin/apachectl-f/usr/local/myapache/conf/httpd.conf
Successful prompt httpd (PID 21768) already running
Stop Apache
Sudo/usr/local/myapache/bin/apachectl stop
6. If you start an error
AH00558:httpd:Could not reliably determine the server ' s fully qualified domain name, using 127.0.1.1. Set the ' ServerName ' directive globally to suppress this message
(13) Permission denied:AH00072:make_sock:could not bind to address [::]:80
(13) Permission denied:AH00072:make_sock:could not bind to address 0.0.0.0:80
No listening sockets available, shutting down
Ah00015:unable to open logs
You need to modify httpd.conf in Apache to conf directory to join ServerName localhost:80
Apache Application and Optimization chapter (i): Compile and install the latest Apache