zoukankan      html  css  js  c++  java
  • 对比centos7的systemctl和其他service+chkconfig

    syetemctl就是service和chkconfig这两个命令的整合,在CentOS 7就开始被使用了。
    systemctl 是系统服务管理器命令,它实际上将 service 和 chkconfig 这两个命令组合到一起。

    (一)对比

    任务 旧指令(centos6、5) 新指令(centos7)
    显示所有已启动的服务 chkconfig --list systemctl list-units --type=service
    --all查看所有服务:
    systemctl list-units --type=service --all
    使某服务自动启动 chkconfig --level 3 httpd on systemctl enable httpd.service
    使某服务不自动启动 chkconfig --level 3 httpd off systemctl disable httpd.service
         
    检查服务状态 service httpd status systemctl status httpd.service (服务详细信息) systemctl is-active httpd.service (仅显示是否 Active)
    启动某服务 service httpd start systemctl start httpd.service
    停止某服务 service httpd stop systemctl stop httpd.service
    重启某服务 service httpd restart systemctl restart httpd.service

    (二)扩展

    centos7中

    yum install -y A   #安装

    systemctl   status   A   # 管理

    systemctl   start   A 

    systemctl   stop  A 

    systemctl   restart  A 

    systemctl   enable  A 

    systemctl   disable  A 

    systemctl   list-units   --type=service   #  查看所有开机自动启动的服务

  • 相关阅读:
    2018 我要告诉你的 Vue 知识大全
    探究Javascript模板引擎mustache.js使用方法
    高性能JavaScript模板引擎实现原理详解
    junit报错
    http报文
    web应用和http协议
    eclipse首次使用基本设置
    利用亚马逊AWS搭建个人服务器
    图文详解 IntelliJ IDEA 15 创建普通 Java Web 项目
    MyEclipse 设置条件断点
  • 原文地址:https://www.cnblogs.com/andy9468/p/11236638.html
Copyright © 2011-2022 走看看