1.安裝apache httpd依賴庫(kù)pcre
wget ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/pcre-8.38.tar.gz
tar zxvf pcre-8.38.tar.gz
cd pcre-8.38
./configure -prefix=/usr/local/pcre
make && make install
2.安裝httpd
apt-get install libexpat1-dev
wget http://apache.website-solution.net//apr/apr-1.6.3.tar.gz
tar -xzvf apr-1.6.3.tar.gz
wget http://apache.website-solution.net//apr/apr-util-1.6.1.tar.gz
tar -xzvf apr-util-1.6.1.tar.gz
wget http://apache.website-solution.net//httpd/httpd-2.4.29.tar.gz
tar -xzvf httpd-2.4.29.tar.gz
#移動(dòng)apr和apr-util到httpd下的srclib目錄并去掉版本號(hào)
mv apr-1.6.3 httpd-2.4.29/srclib/apr
mv apr-util-1.6.1 httpd-2.4.29/srclib/apr-util
cd httpd-2.4.29
./configure -prefix=/usr/local/httpd -with-pcre=/usr/local/pcre
make && make install
也許會(huì)碰到的問(wèn)題
httpd-2.4.1/support/ab.c:2227: undefined reference to `SSLv2_client_method'
參考連接:
https://stackoverflow.com/questions/9856812/apache-2-4-1-undefined-reference-to-sslv2-client-method