**CENTOS6 Compile and install httpd-2.4 method two
1. Install the first shutdown package group and the dependent package:
#yum-y groupinstall Development tools
#yum-y install Openssl-devle pcre-devel expat-devel 2. Download the source package: (Suggested consent format)
#ls
-rw-r--r--1 root root 854100 Jan 2018 apr-1.6.3.tar.bz2
-rw-r--r--1 root root 428595 Jan 2018 apr-util-1.6.1.tar.bz2
-rw-r--r--1 root root 6567926 Jan 2018 httpd-2.4.29.tar.bz2
----------------------
3. Unzip:
#tar XVF apr-util-1.6.1.tar.bz2
#tar XVF apr-util-1.6.1.tar.bz2
#tart xvf httpd-2.4.29.tar.bz24. Copy the APR and Arp-util directory to the Srclib directory under the httpd directory and rename it:
#cp-a apr-1.6.3 httpd-2.4.29/srclib/apr
#cp-A apr-util-1.6.1 httpd-2.4.29/srclib/apr-util5. Installation:
./configure \
--PREFIX=/USR/LOCAL/HTTPD24 \
--ENABLE-SO \
--ENABLE-SSL \
--ENABLE-CGI \
--enable-rewrite \
--with-zlib \
--with-pcre \
--WITH-INCLUDED-APR \
--enable-modules=most \
--enable-mpms-shared=all \
--with-mpm=prefork \
Make && make install6. Export Environment variables:
Echo '/usr/local/httpd24/bin/: $PATH ' >/etc/profile.d/httpd24.sh7. Export Help file:
Echo ' Manpath/usr/local/httpd24/man ' >>/etc/man.config8. Modify startup Start Service Name:
cp/etc/rc.d/init.d/httpd/etc/rc.d/init.d/httpd249. Custom startup Scripts (refer to httpd-2.2 service scripts)
Vim/etc/rc.d/init.d/httpd24
Format:
Apachectl=/usr/local/httpd24/bin/apachectl
HTTPD=${HTTPD-/USR/LOCAL/HTTPD24/BIN/HTTPD}
Pidfile=${pidfile-/usr/local/httpd24/logs/httpd.pid}
LOCKFILE=${LOCKFILE-/VAR/LOCK/SUBSYS/HTTPD24}
Chkconfig–add httpd24; chkconfig–list httpd2410. Add boot up:
Chkconfig--add httpd2411. Set boot up:
Chkconfig httpd24 on12. View:
Chkconfig--list
13. Test:
CENTOS6 Compile and install httpd-2.4 method two