httpd-2.4 relies on a higher version of Apr(over 1.5) and Apr-util
Apr:apache Portable Runtime (porting run) is an API, a bottom-level library that allows Apache to cross-platform tools.
Apache supports regular expressions dependent on Pcre (regular expression function library), install its development package pcre-devel can
Note : You can install HTTPD and its dependent packages on the system without uninstalling Yum, but be sure to turn off httpd and disable it from booting.
Other associated source packages that need to be used:
Apr-1.5.1.tar.gz
apr-util-1.5.2.tar.bz2
httpd-2.4.10.tar.bz2
Http://pan.baidu.com/s/1c0WTfTe
Yum installs RPM packages and package groups:
Yum-y Groupinstall "Server Platform Development" "Development tools"
Yum-y Install Pcre Pcre-devel
First, compile and install Apr (apr-1.5.1.tar.gz)
[Email protected] ~]# Tar XF apr-1.5.1.tar.gz
[Email protected] ~]# CD apr-1.5.1
[Email protected] apr-1.5.1]#/configure--PREFIX=/USR/LOCAL/APR
[[email protected] apr-1.5.1]# Make&&make Install
Second, compile and install Apr-util (APR-UTIL-1.5.2.TAR.BZ2)
[[Email protected] apr-1.5.1]# CD
[Email protected] ~]# Tar XF apr-util-1.5.2.tar.bz2
[Email protected] ~]# CD apr-util-1.5.2
[Email protected] apr-util-1.5.2]#/configure--prefix=/usr/local/apr-util--with-apr=/usr/local/apr/
[[email protected] apr-util-1.5.2]# Make&&make Install
[[Email protected] apr-util-1.5.2]# CD
Third, compile and install httpd (HTTPD-2.4.10.TAR.BZ2)
[Email protected] ~]# Tar XF httpd-2.4.10.tar.bz2
[Email protected] ~]# CD httpd-2.4.10
[Email protected] httpd-2.4.10]#/configure--prefix=/usr/local/apache--sysconfdir=/etc/httpd24--enable-so-- Enable-ssl--enable-cgi--enable-rewrite--with-zlib--with-pcre--with-apr=/usr/local/apr--with-apr-util=/usr/ local/apr-util/--enable-modules=most--enable-mpms-shared=all--with-mpm=event
[[email protected] httpd-2.4.10]# Make&&make Install
# #Apache编译参数详解:
--prefix=/usr/local/apache #指定安装目标路径
--sysconfdir=/etc/httpd24 #指定配置文件安装位置
--enable-so #支持动态共享模块
--enable-cgi #启用支持cgi
--enable-rewirte #支持URL重写
--with-zlib #网络上发送数据报文时通用压缩库的API
--enable-ssl #启用支持ssl
--WITH-APR=/USR/LOCAL/APR #指定依赖包apr路径
--with-apr-util=/usr/local/apr-util #指定依赖包apr-util Path
--enable-modules=all|most #安装全部模块或大多数模块
--enable-mpms-shared=all #以动态共享模块方式安装全部MPM
--with-mpm=event #指定默认使用event
Subsequent configuration:
[[email protected] httpd-2.4.10] #ln-sv/usr/local/apache/include/usr/include/httpd #导出头文件
[[email protected] httpd-2.4.10] #ldconfig-P #显示当前系统上的所有库文件
[[email protected] httpd-2.4.10] #vim/etc/ld.so.conf.d/httpd24.conf #导出库文件
Add the path to the library file
[Email protected] httpd-2.4.10]# Vim/etc/man.config #导出帮助文件
650) this.width=650; "src=" Http://s4.51cto.com/wyfs02/M01/79/13/wKiom1aHuYST9IvfAAAdKL8RMaU832.png "title=" Man.png "alt=" Wkiom1ahuyst9ivfaaadkl8rmau832.png "/>
[[email protected] httpd-2.4.10] #man-M/usr/local/apache/man httpd
Service startup script:
[[email protected] httpd-2.4.10] #cp/etc/init.d/httpd/etc/init.d/httpd24
[Email protected] httpd-2.4.10]# vim/etc/httpd24/httpd24.conf
650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M02/79/12/wKioL1aHucew0aWJAAAhWbt4CTg799.png "title=" Pid.png "alt=" Wkiol1ahucew0awjaaahwbt4ctg799.png "/>
[[email protected] httpd-2.4.10] #vim/etc/init.d/httpd24
650) this.width=650; "src=" Http://s5.51cto.com/wyfs02/M00/79/13/wKiom1aHoviiHX4HAABB5FfjXEo126.png "title=" Start the script. png "alt=" Wkiom1ahoviihx4haabb5ffjxeo126.png "/>
[Email protected] httpd-2.4.10]# service httpd24 restart
This article is from the "Linux operation and Maintenance" blog, reproduced please contact the author!
Compiling and installing httpd-2.4