1、下載
一、登陸http://httpd.apache.org。
二、下載2.4.7版本。 apache
#cd /opt #wget http://mirror.esocc.com/apache//httpd/httpd-2.4.7.tar.gz
2、安裝
一、安裝apr、apr-util、pcre 瀏覽器
登陸http://www.apache.org,下載apr-1.5.0、apr-util-1.5.3 #tar zxvfv apr-1.5.0 #cd apr-1.5.0 #./configure --prefix=/usr/local/apr #make #mkae install #tar apr-util-1.5.3 #cd apr-util-1.5.3 #./configure --prefix=/usr/local/apr-util --with-apr=/usr/local/apr/bin/apr-1-config #make #make install 登陸http://www.pcre.org/,下載pcre-8.34 #tar zxvf pcre-8.34.tar.gz #cd prec-8.34 #./configure --prefix=/usr/local/pcre #make #make install
二、安裝httpd 測試
#tar zxvf httpd-2.4.7.tar.gz #cd httpd-2.4.7 #./configure --prefix=/usr/local/apache2 --enable-so= --with-apr=/usr/local/apr \ --with-apr-util=/usr/local/apr-util/ \ --with-pcre=/usr/local/pcre \ --enable-so #make #make install
三、測試 code
#cd /usr/local/apache/bin #apachectl start 打開瀏覽器,訪問http://127.0.0.1。若是出現apache test page,OK #netstat -anp | grep httpd 出現80口被監聽。
完成。 get