Lab environment:
Centos6.3
2.6.32-431.20.3.el6.i686
Packages used:
APR 1.5.1
Apr-util 1.5.3
Httpd-2.4.9
Procedure:
Step 1: Extract, compile, and install apr1.5.1 Based on the dependency
# Tar xf apr-1.5.1.tar.bz2-C/home
# D/home/apr-1.5.1
#./Configure -- prefix =/usr/local/APR
# Make & make install
Step 2: unzip, compile and install the apr-util-1.5.3
# Tar xf aprutil-1.5.3.tar.gz-C/home
# D/home/apr-util-1.5.3
#./Configure -- prefix =/usr/local/APR-util -- With-Apr =/usr/local/APR
# Make & make install
Step 3: unzip, compile and install the httpd-2.4.9
# Tar xf httpd-2.4.9.tar.bz2-C/home
# D/home/httpd-2.4.9
#. /Configure -- prefix =/usr/local/Apache -- sysconfdir =/etc/httpd24 -- enable-so -- enable-CGI -- enable-Rewrite -- With-zlib -- With-PCRE -- -Apr =/usr/local/APR -- With-Apr-util =/usr/local/APR-util -- enable-modules = most -- enable-MPMs-shared = all -- -MPM = event -- With-OpenSSL =/usr/local/OpenSSL
# Make & make install
Step 4: simple configuration and startup of httpd
CD/usr/local/Apache/
Ln-SV/usr/local/Apache/include/usr/include/httpd
Vim/etc/profile. d/httpd. sh \ declare path execution path
Exprot Path =/usr/local/Apache/bin: $ path
: WQ
/Etc/profile. d/httpd. sh \ execute the script
Apachectl start
CP/etc/rc. d/init. d/httpd/etc/rc. d/init. d/httpd24 \ modify the startup service file
Vim/etc/rc. d/init. d/httpd24
Apachectl =/usr/local/Apache/bin/apachectl
Httpd =$ {httpd-/usr/local/Apache/bin/httpd}
Pidfile =$ {pidfile-/usr/local/Apache/logs/httpd. PID}
: WQ
Service httpd stop
Service httpd24 start
Step 5: For more information about Apache configuration, see other documents.
this article from the "drop not Acacia tears throw red beans" blog, please be sure to keep this source http://beijgh.blog.51cto.com/8272564/1433395