一、差別
在安裝httpd時可以指定apr和apr-util的安裝路徑,可以一次性把這三個軟體包都裝好
httpd
但是:
apr解壓後檔案和apr-util要放在httpd源碼解壓後的srclib目錄下的
并且改名為apr 和apr-util
二、安裝
1.解除安裝舊版本
yum remove httpd*
yum remove apr*
2.解壓軟體包
tar xf apr-.tar.gz
tar xf apr-util-.tar.gz
tar xf httpd-.tar.bz2
3.安裝需要的包或組
yum -y groupinstall Development\ tools
yum -y install expat-devel
yum -y install pcre-devel
yum -y install openssl-devel
4.轉移apr和apr-util源碼位置
mv apr- httpd-/srclib/apr
mv apr-util- httpd-/srclib/apr-util
5.編譯
cd httpd-/
./configure --prefix=/app/httpd24 --sysconfdir=/etc/httpd24 --enable-so --enable-ssl --enable-rewrite --with-zlib --with-pcre --with-included-apr --enable-modules=most --enable-mpms-shared=all --with-mpm=prefork
6.安裝
cd apr
make && make install
三、可能出現的錯誤
libtool: error: error: cannot install ‘libaprutil-1.la’ to a directory not ending in /usr/local/httpd-2.4/lib