我使用以下命令启动Apache:service httpd start in centOS6
今天,我下载了centOS7-64bit-minimal,并希望在安装这个程序之后启动Apache。
当我使用service httpd start时,os会向我显示一条消息:
重定向到/bin/systemctl启动httpd.service
我应该使用[root@localhost#] /bin/systemctl start httpd.service吗??
我试过[root@localhost#] systemctl start httpd.service,它似乎还可以,但是在centOS6中,在启动httpd之后有一些类似[OK]或[FAILED]之类的开始状态,但是在这个版本中,没有报告.
我走的路对吗?
是否在此命令之后正确启动了httpd:
[root@localhost#] systemctl start httpd.service?
预先谢谢.
发布于 2015-08-15 05:11:41
欢迎来到Systemd!这已经取代了最近的红帽协会( right )的service,比如CentOS 7。你和systemctl走在了正确的轨道上。现在,您不用在/var/log/messages/中检查日志,而是使用journalctl查看日志。要查看特定于“httpd”的日志,可以查看“unit”和:
journalctl -u httpd与journalctl有关的其他有用的事情
alias jc='journalctl -xa' # make a friendly alias for ease of typing
jc -f # follow the current events发布于 2017-10-05 18:40:29
你做得很对。它将命令发送到httpd服务。可以使用此命令查看最后发送的命令的状态:
service httpd status发布于 2019-06-16 08:36:21
必须更改触发httpd服务启动的操作。建议的方法:
systemctl启动httpd.service
这将在Linux EC2实例中有所帮助。虽然帮了我
https://stackoverflow.com/questions/32021476
复制相似问题