1. 程式人生 > >2014年10月16日

2014年10月16日

安裝包安裝apache,包含可能發生的錯誤解決方案 

安裝apache 提示APR not found 解決方法  推薦方法,注意版本號。 1.下載apr安裝包: http://labs.mop.com/apache-mirror//apr/apr-1.4.6.tar.gz tar zxvf  apr-1.4.6.tar.gz cd apr-1.4.6 ./configure --prefix=/usr/local/apr make && make install 2.下載apr-util安裝包: http://labs.mop.com/apache-mirror//apr/apr-util-1.4.1.tar.gz tar zxvf apr-util-1.4.1.tar.gz cd apr-util-1.4.1 ./configure --prefix=/usr/local/apr-util --with-apr=/usr/local/apr/bin/apr-1-config 3.下載pcre安裝包: http://cdnetworks-kr-2.dl.sourceforge.net/project/pcre/pcre/8.30/pcre-8.30.zip unzip pcre-8.30.zip cd pcre-8.30 ./configure --prefix=/usr/local/pcre  make && make install 安裝pcre-8.30時,make後可能會出現   libtool: unrecognized option `-DHAVE_CONFIG_H'
  try `libtool --help' for more information 這樣的錯誤,只要安裝g++,再重新configure就可以了 4.安裝httpd包: http://labs.mop.com/apache-mirror/httpd/httpd-2.4.2.tar.gz tar zxvf httpd-2.4.2.tar.gz cd httpd-2.4.2  ./configure --prefix=/usr/local/apache2 --enable-so --enable-rewrite --with-apr=/usr/local/apr --with-apr-util=/usr/local/apr-util --with-pcre=/usr/local/pcre/bin/pcre-config make && make install 安裝完成。 注: 下載最新版httpd包: http://httpd.apache.org/dev/dist/httpd-2.4.2-deps.tar.bz2 http://httpd.apache.org/dev/dist/httpd-2.4.2.tar.bz2 解壓安裝 已整合APR,需安裝pcre支援。 安裝pcre同上3, tar jxvf httpd-2.4.2.tar.bz2 tar jxvf httpd-2.4.2-deps.tar.bz2 cd httpd-2.4.2 ./configure --prefix=/usr/local/apache2 --enable-so --enable-rewrite  --with-pcre=/usr/local/pcre/bin/pcre-config  make && make install