Centos Apache安装

前端之家收集整理的这篇文章主要介绍了Centos Apache安装前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。

Apache安装:下载地址:http://httpd.apache.org/download.cgi


apache需要先安装依赖包apr、apr-util、pcre


apr、apr-util下载地址:https://apr.apache.org/download.cgi

pcre下载地址:http://blog.csdn.net/wangjunjun2008/article/details/38314387


tar -zxvf apr-1.5.2.tar.gz
cd apr-.2
./configure --prefix=/usr/local/apr
make && make install
tar -zxvf apr-util-.4.tar.gz
cd apr-util-.4
./configure --prefix=/usr/local/apr-util --with-apr=/usr/local/apr/bin/apr-1-config
make && make install
tar-zxvf pcre-8.40.tar.gz
cd pcre-8.40
./configure --prefix=/usr/local/pcre
make && make install

完成依赖包安装后,安装apache:

tar-zxvf httpd-2.4.10.tar.gz
cd httpd.10
./configure --prefix=/usr/local/apache --with-apr=/usr/local/apr --with-apr-util=/usr/local/apr-util/ --with-pcre=/usr/local/pcre/
make && make install

安装完成后

./usr/local/apache/bin/httpd -k start

访问机器所在IP,出现It works的界面,即表示Apache安装成功

httpd: Could not reliably determine the server's fully qualified domain name,using ::1 for ServerName 的原因参考下面链接的解答:

http://stackoverflow.com/questions/5856205/starting-httpd-httpd-could-not-reliably-determine-the-servers-fully-qualified

猜你在找的CentOS相关文章