美文网首页
systemd.service操作

systemd.service操作

作者: 8813d76fee36 | 来源:发表于2017-12-23 08:56 被阅读6次

    启动服务

    $ sudo systemctl start nginx.service

    查看日志

    $ sudo journalctl -f -u nginx.service
    — Logs begin at 四 2015-06-25 17:32:20 CST. —
    6月 25 10:28:24 Leco.lan systemd[1]: Starting nginx – high performance web server…
    6月 25 10:28:24 Leco.lan nginx[7976]: nginx: the configuration file /etc/nginx/nginx.conf syntax is ok
    6月 25 10:28:24 Leco.lan nginx[7976]: nginx: configuration file /etc/nginx/nginx.conf test is successful
    6月 25 10:28:24 Leco.lan systemd[1]: Started nginx – high performance web server.

    重启

    $ sudo systemctl restart nginx.service

    重载

    $ sudo systemctl reload nginx.service

    停止

    $ sudo systemctl stop nginx.service

    相关文章

      网友评论

          本文标题:systemd.service操作

          本文链接:https://www.haomeiwen.com/subject/vbufgxtx.html