一、安装
1.安装APR apr-1.5.1.tar.gz
#tar -zxvf apr-1.5.1.tar.gz
#./configure --prefix=/usr/local/services/apr
#make
#make install
2.安装APR-util apr-util-1.5.3.tar.gz
#tar -zxvf apr-util-1.5.3.tar.gz
#./configure --prefix=/usr/local/services/apr-util --with-apr=/usr/local/services/apr/bin/apr-1-config
#make
#make install
#tar -zxvf pcre-8.35.tar.gz
#./configure --prefix=/usr/local/services/pcre
#make
#make install
4.安装Apache2 apache-httpd-2.4.9.tar.gz
#tar -zvxf apache-httpd-2.4.9.tar.gz
# ./configure --prefix=/usr/local/services/apache2 --with-apr=/usr/local/services/apr/ --with-apr-util=/usr/local/services/apr-util/ --with-cre=/usr/local/services/pcre/
#make
#make install
路径为当前Apache安装目录/conf/httpd.conf
vi /usr/local/services/apache2/conf/httpd.conf
访问端口
Listen 80
主机名
ServerName localhost:80
cd /usr/local/services/apache2/bin
./apachectl start
重启restart 停止stop
四、检查端口是否成功开启
#netstat –an | grep 80