• 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

  • 相关阅读:
    93.快速搭建Web环境 Angularjs + Express3 + Bootstrap3
    92.bower 需要git
    91.Bower : ENOGIT git is not installed or not in the PATH 解决方法
    5.Git使用详细教程
    4.git "Could not read from remote repository.Please make sure you have the correct access rights."解决方案
    2.windows下安装git
    Git常用命令
    每天一个linux命令(50):crontab命令
    crontab 不能执行git命令问题备忘
    Git PHP提交
  • 原文地址:https://www.cnblogs.com/karrya/p/11288938.html
Copyright © 2020-2023  润新知