文章目录
1. Job for httpd.service failed because the control process exited with error code.see “systemctl statu
解决方法:这是一个很常见的错误,
1.杀掉这个进程就可以:
先ps –aux | grep http
第二行数字就是进程pid号
Kill -9 pid号 即可杀掉进程
杀完之后 重启reboot 再ps –aux | grep http 确保httpd进程被杀掉 若发现无法杀掉进程 .
2.、启动 httpd 服务时报错
- ystemctl status httpd 查看下状态
8月 14 16:57:26 10-255-0-230 httpd[28061]: (98)Address already in use: AH00072: make_sock: could not bind to address [::]:80
8月 14 16:57:26 10-255-0-230 httpd[28061]: (98)Address already in use: AH00072: make_sock: could not bind to address 0.0.0.0:80
8月 14 16:57:26 10-255-0-230 httpd[28061]: no listening sockets available, shutting down
8月 14 16:57:26 10-255-0-230 httpd[28061]: AH00015: Unable to open logs
8月 14 16:57:26 10-255-0-230 systemd[1]: httpd.service: main process exited, code=exited, status=1/FAILURE
8月 14 16:57:26 10-255-0-230 kill[28062]: kill: cannot find process ""
8月 14 16:57:26 10-255-0-230 systemd[1]: httpd.service: control process exited, code=exited status=1
8月 14 16:57:26 10-255-0-230 systemd[1]: Failed to start The Apache HTTP Server.
8月 14 16:57:26 10-255-0-230 systemd[1]: Unit httpd.service entered failed state.
8月 14 16:57:26 10-255-0-230 systemd[1]: httpd.service failed.
更具状态看出 80 端口被占用
netstat -antlp | grep 80
了解一下是那个服务占用
停止即可