道者编程


linux下apr和apr-util和pcre的安装

1: 编译和安装 apr 1.4

# cd /usrlocal/apr 1.4
# ./configure
# make
# make test
# make install

2: 编译和安装 apr-util 1.5

# cd /usr/local/apr-util 1.5
# ./configure –prefix=/usr/local/apr-util/ –with-apr=/usr/local/apr/
# make
# make test
# make install
 注意这是apr的安装目录,要加上,不然安装apr-util的时候会检测不到apr的存在


3:安装pcre

# unzip -o pcre-8.32.zip
# cd pcre-8.32
# ./configure --prefix=/usr/local/pcre
# make
# make install
如果提示:You need a c++ compiler for c++ support

则:

# yum install -y gcc gcc-c++

这样后续安装apache的时候,加上./configure 时加上参数 --with-apr=/usr/local/apr/ --with-apr-util=/usr/local/apr-util/ --with-pcre=/usr/local/pcre 就可以了


如果在安装apache的时候入到 error: mod_deflate has been requested but can not be built due to prerequisite failures的错误,那是没有安装zlib包。centos下可以采用yum install zlib-devel,


最新评论:
我要评论:

看不清楚


链接