2019-04-30 14:16:14 1492浏览
今天扣丁学堂Linux培训老师给大家分享一篇关于Centos7.4服务器安装apache及安装过程出现的问题解决方法,结合实例形式分析了Centos7.4服务器安装apache相关命令、配置操作及端口占用等常见问题解决方法,分享给大家供大家参考,具体如下:
#rpm -qa | grep httpd
#yum -y install httpd
#find / -name "httpd.conf"
#cp /etc/httpd/conf/httpd.conf /etc/httpd/conf/httpd.conf.bak
#systemctl start httpd.service
#systemctl enable httpd.service 开机自启httpd #systemctl disable httpd.service 开机不启动httpd
#systemctl status httpd.service
#systemctl status httpd.service
[root@cloud1 bin]# systemctl status httpd.service httpd.service - The Apache HTTP Server Loaded: loaded (/usr/lib/systemd/system/httpd.service; disabled; vendor preset: disabled) Active: failed (Result: exit-code) since 五 2018-11-26 11:13:09 CST; 6min ago Docs: man:httpd(8) man:apachectl(8) Process: 9915 ExecStop=/bin/kill -WINCH ${MAINPID} (code=exited, status=1/FAILURE) Process: 9913 ExecStart=/usr/sbin/httpd $OPTIONS -DFOREGROUND (code=exited, status=1/FAILURE) Main PID: 9913 (code=exited, status=1/FAILURE) 11月 26 11:13:09 cloud1.localdomain httpd[9913]: (98)Address already in use: AH00072: make_sock: could not bind to address [::]:80 11月 26 11:13:09 cloud1.localdomain httpd[9913]: (98)Address already in use: AH00072: make_sock: could not bind to address 0.0.0.0:80 11月 26 11:13:09 cloud1.localdomain httpd[9913]: no listening sockets available, shutting down 11月 26 11:13:09 cloud1.localdomain httpd[9913]: AH00015: Unable to open logs 11月 26 11:13:09 cloud1.localdomain systemd[1]: httpd.service: main process exited, code=exited, status=1/FAILURE 11月 26 11:13:09 cloud1.localdomain kill[9915]: kill: cannot find process "" 11月 26 11:13:09 cloud1.localdomain systemd[1]: httpd.service: control process exited, code=exited status=1 11月 26 11:13:09 cloud1.localdomain systemd[1]: Failed to start The Apache HTTP Server. 11月 26 11:13:09 cloud1.localdomain systemd[1]: Unit httpd.service entered failed state. 11月 26 11:13:09 cloud1.localdomain systemd[1]: httpd.service failed.
tcp 0 0 192.168.180.68:61027 0.0.0.0:* LISTEN 6289/oproxyd tcp 0 0 :::80 :::* LISTEN 846/httpd tcp 0 0 ::ffff:192.168.180.68:7001 :::* LISTEN 32015/java
vi /etc/httpd/conf/httpd.conf
#ServerName www.example.com:80
systemctl restart httpd.service
【关注微信公众号获取更多学习资料】 【扫码进入HTML5前端开发VIP免费公开课】