1.下载httpd
2.直接安装
./configure --prefix=/usr/local/apache2
出现问题:configure: error: APR not found
说明缺少APR,因此,需要安装相应的库。
3.下载相应的库
wget http://archive.apache.org/dist/apr/apr-1.4.5.tar.gz
wget http://archive.apache.org/dist/apr/apr-util-1.3.12.tar.gz
wget http://jaist.dl.sourceforge.net/project/pcre/pcre/8.10/pcre-8.10.zip
tar -zxf apr-1.4.5.tar.gz
cd apr-1.4.5
./configure --prefix=/usr/local/apr
make && make install
5.安装apr util,解决APR-util not found问题
tar -zxf 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
unzip -o pcre-8.10.zip
cd pcre-8.10
./configure --prefix=/usr/local/pcre
make && make install
7.进入httpd解压后的文件夹,安装httpd
./configure --prefix=/usr/local/httpd --with-apr=/usr/local/apr --with-apr-util=/usr/local/apr-util --with-pcre=/usr/local/pcre --enable-ssl --with-ssl=/usr/local/openssl
make && make install
安装后的文件夹位置是:/usr/local/httpd
欢迎关注公众号: