zoukankan      html  css  js  c++  java
  • Linux常用命令 —— 进程类

    service (CentOs6)

    1、service   服务名   start         --------------   启动

    2、service   服务名   stop         --------------   停止

    3、serviec   服务名   restart      --------------   重启

    4、service   服务名   reload       --------------   重新加载

    5、service   服务名   status       --------------   查看服务状态

    6、chkconfig --list                     --------------   查看服务状态

    [lk@localhost ~]$ chkconfig   --list
    
    注:该输出结果只显示 SysV 服务,并不包含
    原生 systemd 服务。SysV 配置数据
    可能被原生 systemd 配置覆盖。 
    
          要列出 systemd 服务,请执行 'systemctl list-unit-files'。
          查看在具体 target 启用的服务请执行
          'systemctl list-dependencies [target]'。
    
    netconsole         0:关    1:关    2:关    3:关    4:关    5:关    6:关
    network            0:关    1:关    2:开    3:开    4:开    5:开    6:关

    7、查看服务的方法  /etc/init.d/服务名

    8、通过chkconfig  命令设置自启动

      查看服务 chkconfig   --list |  grep  XXX

      修改服务级别  chkconfid   --level   5   服务名  on/off

    systemctl(CentOs7)

    1、有方便统一的管理方式(常用方法)

      1.1、systemctl    start   服务名(xxx.service)

      1.2、systemctl    restart   服务名(xxx.service)

      1.3、systemctl    stop     服务名(xxx.service)

      1.4、systemctl    reload   服务名(xxx.service)

      1.5、systemctl    status    服务名(xxx.service)

    2、查看服务的方法  /usr/lib/stsyemd/system

    3、查看服务的命令

      3.1、systemctl   list-unit-files

      3.2、systemclt    --type  service

    4、通过systemctl命令设置自启动

      4.1、自启动systemclt  enable   service_name

      4.2、不自启动systemctl  disable  service_name

  • 相关阅读:
    恰瓜恰到自己家
    在 D 天内送达包裹的能力
    火车编组
    排列小球
    为什么这段时间一直在做算法题呢
    leetcode 221 ,3,480,6,54,46,209,495
    leetcode 684.354,133,207,121,63,64,jz46,120,357
    leetcode 130,200,207,329,491,494,416,547,51
    flink单机搭建以及快速编写一个简单的java job demo运行
    leetcode 437,450,508,513,538,623,652,654,662
  • 原文地址:https://www.cnblogs.com/karrya/p/11288938.html
Copyright © 2011-2022 走看看