zoukankan      html  css  js  c++  java
  • Linux常用服务类相关命令

    centos6

    • 有方便统一的管理方式(常用的方法)
      • service 服务名 start
      • service 服务名 stop
      • service 服务名 restart
      • service 服务名 reload
      • service 服务名 status
    • 查看服务的方法 /etc/init.d/服务名
    • 通过chkconfig 命令设置自启动
      • 查看服务 chkconfig --list|grep xxx
      • chkconfig --level 5 服务名 on
      • (on 是启动,off是关闭)

    centos7

    • 有方便统一的管理方式(常用的方法)
      • systemctl start 服务名(xxxx.service)
      • systemctl restart 服务名(xxxx.service)
      • systemctl stop 服务名(xxxx.service)
      • systemctl reload 服务名(xxxx.service)
      • systemctl status 服务名(xxxx.service)
    • 查看服务的方法 /usr/lib/systemd/system
    • 查看服务的命令
      • systemctl list-unit-files
      • systemctl --type service
    • 通过systemctl命令设置自启动
      • 自启动systemctl enable service_name
      • 不自启动systemctl disable serivice_name
  • 相关阅读:
    第九章:switch语句
    第八章:if-else语句
    第七章:运算符及运用
    第六章:名命规范
    事务
    jdbc
    Object
    容器
    Java exception
    Java OO1
  • 原文地址:https://www.cnblogs.com/shaoyu/p/12484374.html
Copyright © 2011-2022 走看看