1.安装httpd
从http://httpd.apache.org/下载:httpd-2.4.10.tar.gz
tar zxvf httpd-2.4.10.tar.gz
cd xx/httpd-2.4.10
./configure --prefix=/home/soft/httpd-2.4.10
检查编辑环境时出现:
2.安装apr
从http://apr.apache.org/download.cgi下载:apr-1.5.1.tar.gz
tar zxvf apr-1.5.1.tar.gz
cd xx/apr-1.5.1
./configure --prefix=/home/soft/apr-1.5.1
make
make install
可选:
make clean
make distclean
cd ..
rm -rf apr-1.5.1
3.再次安装httpd
./configure --prefix=/home/soft/httpd-2.4.10 --with-apr=/home/soft/apr-1.5.1
再次检查编译环境出现
checking for APR-util... no
configure: error: APR-util not found . Please read the documentation.
用./configure –help | grep apr-util 查看帮助。
--with-apr-util=PATH prefix for installed APU or the full path to
4.安装apr-util
从http://apr.apache.org/download.cgi下载:apr-util-1.5.4.tar.gz
tar zxvf apr-util-1.5.4.tar.gz
cd xx/apr-util-1.5.4
./configure --prefix=/home/soft/apr-util-1.5.4 --with-apr=/home/soft/apr-1.5.1 (apr-util依赖apr)
make
make install
可选:
make clean
make distclean
cd ..
rm -rf apr-util-1.5.4
5.再次安装httpd
./configure --prefix=/home/soft/httpd-2.4.10 --with-apr=/home/soft/apr-1.5.1 --with-apr-util=/home/soft/apr-util-1.5.4
configure: error: pcre-config for libpcre not found. PCRE is required and available fromhttp://pcre.org/
用./configure –help | grep pcre 查看帮助。
--with-pcre=PATH Use external PCRE library
6.安装pcre
从http://pcre.org/下载:pcre-8.36.tar.gz
tar zxvf pcre-8.36.tar.gz
cd xx/pcre-8.36
./configure --prefix=/home/soft/pcre-8.36
make
make install
可选:
make clean
make distclean
cd ..
rm -rf pcre-8.36
注意:pcre安装过程出现了错误,提示需要安装:yum install gcc-c++
终于没有编译错误了,继续...
make
make install
可选:
make clean
make distclean
cd ..
rm -rf httpd-2.4.10
试用一下: