CENTOS6 Compile and install httpd-2.4 method two

Source: Internet
Author: User
Tags install openssl

**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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.