SERVICES DAY04 (05):使用systemctl工具

5.1 问题
本例要求掌握systemctl控制工具的基本操作,完成下列任务:

  1. 重启 httpd、crond、bluetooth 服务,查看状态
  2. 禁止 bluetooth 服务开机自启,并停用此服务
  3. 设置默认级别为 multi-user.target 并确认
    5.2 方案
  4. [root@svr7 ~]# journalctl -u httpd
  5. – Logs begin at Thu 2017-01-05 15:50:08 CST, end at Fri 2017-01-06 18:01:01 CST.
  6. Jan 06 14:57:16 svr7 systemd[1]: Starting The Apache HTTP Server…
  7. Jan 06 14:57:16 svr7 httpd[23812]: AH00557: httpd: apr_sockaddr_info_get() failed for
  8. Jan 06 14:57:16 svr7 httpd[23812]: AH00558: httpd: Could not reliably determine the server
  9. Jan 06 14:57:16 svr7 systemd[1]: Started The Apache HTTP Server.
  10. Jan 06 17:53:44 svr7 systemd[1]: Stopping The Apache HTTP Server…
  11. Jan 06 17:53:46 svr7 systemd[1]: Starting The Apache HTTP Server…
  12. Jan 06 17:53:46 svr7 httpd[33741]: AH00557: httpd: apr_sockaddr_info_get() failed for svr7
  13. … …
  14. [root@svr7 ~]# journalctl --since “2017-01-06 14:11” --until “2017-01-0

猜你喜欢

转载自blog.csdn.net/weixin_45843450/article/details/104399401