(Linux7 需要下载支持7版本的apache)
教程: https://www.cnblogs.com/keerya/p/7705195.html#_label2(按照此教程中的【方法二 一次编译法】进行操作,方法一我没试过)
这个教程非常完整,但是在安装的过程中也遇到过错误,我将解决错误的方法记录下来。
教程中需要的文件在【\10.21.142.50\Users-Temp\zhouxin\Linux\web\Apache】
在执行apachectl start后出现错误:
解决:vim /etc/httpd/conf/httpd.conf
将servername修改成local host:80
再次执行 apachectl start ,程序是起来了,但还是有点问题:
vim /app/httpd24/conf/httpd.conf
加上这一句 :ServerName localhost:80
再次执行:apachectl start
没问题了:
可以访问到apache的index页面: