zoukankan      html  css  js  c++  java
  • centos7 系统管理systemd学习记录

    在centos7之前,系统服务是service,chkconfig等命令来管理的。到了centos7,统一使用systemctl来管理系统服务

    其实就是把chkconfig和service结合在一起了,chkconfig主要用来控制开机自启动,service则是用来管理服务的开启关闭的

    service mysqld start    systemctl start mysqld  启动服务

    service mysqld stop    systemctl stop mysqld  关闭服务 

    service mysqld reload   systemctl reload mysqld  重新加载配置文件

    service mysqld restart    systemctl restart mysqld  重启服务

    service mysqld status    systemctl status mysqld  查看服务状态

    其实就是把service换成systemctl,并且把命令提前了,很好理解

    chkconfig mysqld on  systemctl enable mysqld  开机自动启动

    chkconfig mysqld off  systemctl disable mysqld  开机不自动启动

    chkconfig mysqld    systemctl is-enabled mysqld  查看特定服务是否开机启动

    chkconfig --list     systemctl list-unit-files --type=service  查看各个级别下服务的启动和禁用情况

    其实到了centos7之后service和chkconfig命令都还可以使用,但是推荐使用systemctl,使用之前的命令的时候系统会提示你改用systemctl对应的命令

  • 相关阅读:
    常用的dos命令
    java环境的配置
    javascript面向对象个人理解
    js如何获取样式?
    springboot新建项目遇到Whitelabel Error Page
    CSS 隐藏页面元素的 几 种方法总结
    优美动听的葫芦丝名曲
    大前端资料合集
    CSS实现背景透明,文字不透明(兼容所有浏览器)
    文字上下无缝滚动效果
  • 原文地址:https://www.cnblogs.com/lgh344902118/p/7168445.html
Copyright © 2011-2022 走看看