我目前正在尝试使用以下教程在Centos 7上安装Apache https://www.digitalocean.com/community/tutorials/how-to-install-linux-apache-mysql-php-lamp-stack-on-centos -7 。
当我input以下命令systemctl start httpd.service启动Apache,我得到以下错误: Job for httpd.service failed because the control process exited with error code. See "systemctl status httpd.service" and "journalctl -xe" for details. Job for httpd.service failed because the control process exited with error code. See "systemctl status httpd.service" and "journalctl -xe" for details.
任何人都可以帮我理解这里出了什么问题吗? 也考虑到我是一个完整的noob,当涉及到服务器和Linux,因为我从来没有用过他们之前。
另外我input了以下命令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 Thu 2016-08-04 10:39:59 IST; 3min 20s ago Docs: man:httpd(8) man:apachectl(8) Process: 6515 ExecStop=/bin/kill -WINCH ${MAINPID} (code=exited, status=1/FAILURE) Process: 6513 ExecStart=/usr/sbin/httpd $OPTIONS -DFOREGROUND (code=exited, status=1/FAILURE) Main PID: 6513 (code=exited, status=1/FAILURE) Aug 04 10:39:59 localhost.localdomain httpd[6513]: (98)Address already in use: AH00072: make_sock: could not bind to address [::]:80 Aug 04 10:39:59 localhost.localdomain httpd[6513]: (98)Address already in use: AH00072: make_sock: could not bind to address 0.0.0.0:80 Aug 04 10:39:59 localhost.localdomain httpd[6513]: no listening sockets available, shutting down Aug 04 10:39:59 localhost.localdomain httpd[6513]: AH00015: Unable to open logs Aug 04 10:39:59 localhost.localdomain systemd[1]: httpd.service: main process exited, code=exited, status=1/FAILURE Aug 04 10:39:59 localhost.localdomain kill[6515]: kill: cannot find process "" Aug 04 10:39:59 localhost.localdomain systemd[1]: httpd.service: control process exited, code=exited status=1 Aug 04 10:39:59 localhost.localdomain systemd[1]: Failed to start The Apache HTTP Server. Aug 04 10:39:59 localhost.localdomain systemd[1]: Unit httpd.service entered failed state. Aug 04 10:39:59 localhost.localdomain systemd[1]: httpd.service failed.
如果有任何帮助。
已经在使用的地址:AH00072:make_sock:无法绑定到地址[::]:80 / 0.0.0.0:80
另一个进程已经在侦听默认的HTTP端口80端口,所以它不能被Apache使用,并且无法启动。 要调查以下命令可能有用:
sudo netstat -tnlp | grep :80
要么
ss -tnlp | grep :80