首先下载,解压缩httpd
配置:./configure --prefix=/usr/local/httpd //安装路径
编译:make && make install
启动:/usr/local/httpd/bin/httpd start //执行bin目录下httpd命令
问题:
运行httpd命令提示httpd: Could not reliably determine the server's fully qualifieddomain name, using localhost.localdomain for ServerName。大概意思是说httpd服务无法确定主机名,但此时服务已经开启
解决:
vim httpd.conf文件
打开 #ServerName www.example.com:80 选项,更改为ServerName localhost:80