首页 > 代码库 > 源码安装apache

源码安装apache

同事安装apache报错error: APR not found.  Please read the documentation

apache版本 httpd-2.4.10.tar.gz


解决方法如下:

wget http://archive.apache.org/dist/apr/apr-1.4.5.tar.gz

tar fxz apr-1.4.5.tar.gz 

cd apr-1.4.5

./configure --prefix=/usr/local/apr

make && make install


wget http://archive.apache.org/dist/apr/apr-util-1.3.12.tar.gz

tar fxz apr-util-1.3.12.tar.gz

cd apr-util-1.3.12

./configure --prefix=/usr/local/apr-util --with-apr=/usr/local/apr

make && make install


wget http://jaist.dl.sourceforge.net/project/pcre/pcre/8.10/pcre-8.10.zip

unzip pcre-8.10.zip

cd pcre-8.10

./configure --prefix=/usr/local/pcre

make && make install


tar fxz httpd-2.4.10.tar.gz

cd httpd-2.4.10

./configure --prefix=/usr/local/apache --enable-rewrite --enable-so --with-apr=/usr/local/apr --with-apr-util=/usr/local/apr-util --with-pcre=/usr/local/pcre

make && make install

/usr/local/apache/bin/apachectl start   启动apche

查看80端口是否打开

在地址栏输入地址,看是否显示 it works!


本文出自 “青春邓勇” 博客,请务必保留此出处http://dengyong.blog.51cto.com/8409869/1576531

源码安装apache