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.gzcd apr-1.5.2./configure --prefix=/usr/local/aprmake && make installtar -zxvf apr-util-1.5.4.tar.gzcd apr-util-1.5.4./configure --prefix=/usr/local/apr-util --with-apr=/usr/local/apr/bin/apr-1-config make && make installtar-zxvf pcre-8.40.tar.gzcd pcre-8.40./configure --prefix=/usr/local/pcremake && make install 完成依赖包安装后,安装apache:
tar-zxvf httpd-2.4.10.tar.gzcd httpd-2.4.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 startUsage: ./httpd [-D name] [-d directory] [-f file] [-C "directive"] [-c "directive"] [-k start|restart|graceful|graceful-stop|stop] [-v] [-V] [-h] [-l] [-L] [-t] [-T] [-S] [-X]
访问机器所在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
新闻热点
疑难解答