IT博客汇
  • 首页
  • 精华
  • 技术
  • 设计
  • 资讯
  • 扯淡
  • 权利声明
  • 登录 注册

    CentOS7上systemctl的用法总结

    admin发表于 2016-06-08 02:57:00
    love 0

    CentOS7上systemctl的用法总结,CentOS7上systemctl的用法

    最近开始大换血,生产环境逐步由centos老版本升级到了centos7,特总结一下systemctl命令的用法,备查!systemctl 是管制服务的主要工具,替代了老版本的service和chkconfig命令。

    使用示例:*代表某个服务的名字,如http的服务名为httpd等等

    • systemctl is-enabled iptables.service
    • systemctl is-enabled servicename.service #查询服务是否开机启动
    • systemctl enable *.service #开机运行服务
    • systemctl disable *.service #取消开机运行
    • systemctl start *.service #启动服务
    • systemctl stop *.service #停止服务
    • systemctl restart *.service #重启服务
    • systemctl reload *.service #重新加载服务配置文件
    • systemctl status *.service #查询服务运行状态
    • systemctl --failed #显示启动失败的服务

    Copyright:www.cplusplus.me | Share、Open- C/C++程序员之家



沪ICP备19023445号-2号
友情链接