ENTOS6 Compile and install httpd-2.4 method one

Source: Internet
Author: User

**CENTOS6 Compile and install httpd-2.4 method one
1. Download the source package:
Download the Development Pack Group:
Development tools
Openssl-devel
Pcre-devel
Expat-devel
APR-1.6.3.TAR.BZ2 httpd-dependent cross-platform packages
APR-UTIL-1.6.1.TAR.BZ2 Kit Group
HTTPD-2.4.29.TAR.BZ2 httpd Source Package 2. Add Compression:
Tar xvf
[Email protected]/app #tar XVF httpd-2.4.29.tar.bz2
[Email protected]/app #tar XVF apr-util-1.6.1.tar.bz2
[Email protected]/app #tar XVF apr-1.6.3.tar.bz2 3. Install apr-1.6.3.tar.bz2 (do not install the APR in the local directory to avoid conflicts)
CD apr-1.6.3.tar.bz2
. /configure--PREFIX=/APP/APR4. Installation apr-util-1.6.1.tar.bz2 Note: An APR installation directory must be established
CD apr-util-1.6.1.tar.bz2
. /configure--prefix=/app/apr-util--with-apr=/app/apr/

5. Compile and install httpd-2.4
Cd.. /httpd-2.4.29
[Email protected]/app/httpd-2.4.29 67]#./configure--prefix=/app/httpd24 \

--ENABLE-SO \
--ENABLE-SSL \
--ENABLE-CGI \
--enable-rewrite \
--with-zlib \
--with-pcre \
--with-apr=/app/apr/\
--with-apr-util=/app/apr-util/\
--enable-modules=most \
--enable-mpms-shared=all \
--with-mpm=prefork \
Make-j 4 && make instal6. Export Environment variables:
Echo ' path=/app/httpd24/bin/: $PATH ' >/etc/profile.d/httpd24.sh
. /etc/profile.d/httpd24.sh8.ps aux view because it is a compiled installation default Apache is running as a daemon user;
Create an account:
Useradd-r-s/sbin/nologin Apache
To modify a configuration file:
Vim/app/httpd24/conf/httpd.conf
The User Apache
171 Group Apache
Wq
Restart Service

9. Set Boot up:
Determine if the machine has httpd boot service has the need to stop otherwise conflict;
Chkconfig--list httpd
Chkconfig httpd on/off
echo "/app/httpd24/bin/apachectl start" >>/etc/rc.d/rc.local (write-free script)
Test:
VIM/ETC/INIT.D/HTTPD (Modify startup script: suggest to write yourself)
Apachectl=/app/httpd24/bin/apachectl
HTTPD=${HTTPD-/APP/HTTPD24/BIN/HTTPD}
Prog=httpd
Pidfile=${pidfile-/app/httpd24/logs/httpd.pid}
LOCKFILE=${LOCKFILE-/VAR/LOCK/SUBSYS/HTTPD24}
Compile and install different renaming:
MV HTTPd HTTPD24
Add Service:

Chkconfig--add httpd24

View:
Chkconfig--list
Set boot up:
Chkconfig httpd24 on**

ENTOS6 Compile and install httpd-2.4 method one

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.