加载中…
个人资料
  • 博客等级:
  • 博客积分:
  • 博客访问:
  • 关注人气:
  • 获赠金笔:0支
  • 赠出金笔:0支
  • 荣誉徽章:
正文 字体大小:

httpd服务无法启动 /bin/systemctl start httpd.service

(2016-04-29 13:37:53)

httpd服务无法启动 /bin/systemctl start httpd.service

  • austgl 发布于 3年前 (2013-07-31)
  • 分类:Web开发
  • 阅读(15739)
  • 评论(8)

[root@austgl gl]# service httpd start
Redirecting to /bin/systemctl start httpd.service
Job for httpd.service failed. See ‘systemctl status httpd.service’ and ‘journalctl -xn’ for details.
[root@austgl gl]# systemctl status httpd.service
httpd.service – The Apache HTTP Server
Loaded: loaded (/usr/lib/systemd/system/httpd.service; disabled)
Active: failed (Result: exit-code) since 六 2013-07-27 02:53:04 CST; 20s ago
Process: 5466 ExecStop=/usr/sbin/httpd $OPTIONS -k graceful-stop (code=exited, status=0/SUCCESS)
Process: 5463 ExecStart=/usr/sbin/httpd $OPTIONS -DFOREGROUND (code=exited, status=1/FAILURE)

7月 27 02:53:04 austgl.com systemd[1]: Starting The Apache HTTP Server…
7月 27 02:53:04 austgl.com httpd[5463]: AH00557: httpd: apr_sockaddr_info_get() failed for austgl.com
7月 27 02:53:04 austgl.com httpd[5463]: AH00558: httpd: Could not reliably determine the server’s fully qualified do…essage
7月 27 02:53:04 austgl.com systemd[1]: httpd.service: main process exited, code=exited, status=1/FAILURE
7月 27 02:53:04 austgl.com httpd[5466]: AH00557: httpd: apr_sockaddr_info_get() failed for austgl.com
7月 27 02:53:04 austgl.com httpd[5466]: AH00558: httpd: Could not reliably determine the server’s fully qualified do…essage
7月 27 02:53:04 austgl.com httpd[5466]: httpd (no pid file) not running
7月 27 02:53:04 austgl.com systemd[1]: Failed to start The Apache HTTP Server.
7月 27 02:53:04 austgl.com systemd[1]: Unit httpd.service entered failed state.
[root@austgl gl]#
[root@austgl gl]# /usr/sbin/httpd $OPTIONS -DFOREGROUND
AH00557: httpd: apr_sockaddr_info_get() failed for austgl.com
AH00558: httpd: Could not reliably determine the server’s fully qualified domain name, using 127.0.0.1. Set the ‘ServerName’ directive globally to suppress this message
[root@austgl gl]#

解决方法
先查看hostname
[root@austgl sysconfig]# hostname
austgl.com

将hostname加入host文件即可

[root@austgl sysconfig]# vi /etc/host

127.0.0.1 austgl.com localhost localhost.localdomain localhost4 localhost4.localdomain4
::1 localhost localhost.localdomain localhost6 localhost6.localdomain6
~
[root@austgl sysconfig]# /usr/sbin/httpd $OPTIONS -DFOREGROUND

在打开localhost

OK了
上述命令开启的服务在Ctrl+C或关闭终端后就停止了服务 请用

[root@austgl sysconfig]# /usr/sbin/httpd $OPTIONS -DFOREGROUND
^C^C[root@austgl sysconfiservice httpd start
Redirecting to /bin/systemctl start httpd.service
[root@austgl sysconfig]#

0

阅读 收藏 喜欢 打印举报/Report
  

新浪BLOG意见反馈留言板 欢迎批评指正

新浪简介 | About Sina | 广告服务 | 联系我们 | 招聘信息 | 网站律师 | SINA English | 产品答疑

新浪公司 版权所有