zoukankan      html  css  js  c++  java
  • 11.10 chkconfig:管理开机服务

    chkconfig 命令是Redhat系列的Linux系统中的系统服务管理工具,它可以用于查询和更新不同的运行等级下系统服务的启动状态。

    chkconfig命令的参数选项及说明

    --list    显示不同运行级别下服务的启动状态
    --add     添加一个系统服务
    --del     删除一个系统服务
    --level   指定运行级别

    以下是运行级别说明。
    0:关机。
    1:单用户模式。
    2:没有网络的多用户模式。
    3:完全的多用户模式。
    4:没有使用的级别。
    5:图形界面多用户模式。
    6:重启。

    了解chkconfig原理。
    chkconfig 的原理是在 runlevel级别的 /etc/rc.d/rc*.d目录中将对应服务做一个以S或K开头的软链接。

    [root@linuxprobe ~]# ll /etc/rc.d/rc3.d/             
    total 0
    lrwxrwxrwx. 1 root root 20 Jan 28 21:13 K50netconsole -> ../init.d/netconsole
    lrwxrwxrwx. 1 root root 17 Jan 28 21:13 S10network -> ../init.d/network


    下面只对rc3.d目录做实验,chkconfig的--level2345是同时对re2.d、rc3.d、re4.d、rc5.d这4个目录进行操作的。







    centos 7 下面使用systemctl list-unit-files 查看自启任务
    [root@linuxprobe ~]# systemctl list-unit-files
    UNIT FILE STATE   
    proc-sys-fs-binfmt_misc.automount static  
    dev-hugepages.mount static  
    dev-mqueue.mount static  
    proc-fs-nfsd.mount static  
    proc-sys-fs-binfmt_misc.mount static  
    sys-fs-fuse-connections.mount static  
    sys-kernel-config.mount static  
    sys-kernel-debug.mount static  
    tmp.mount disabled
    var-lib-nfs-rpc_pipefs.mount static  
    brandbot.path disabled
    systemd-ask-password-console.path static  
  • 相关阅读:
    如何根据当前日期生成一张表
    如何使用Navicat 创建一个SqlServer定时任务
    python接口自动化-post请求2
    python接口自动化-post请求1
    python接口自动化-get请求
    测试通过与失败的标准
    需求规格说明书(SRS)特点
    测试用例设计方法
    系统测试知识
    jenkins之Job建立-运行 git 脚本
  • 原文地址:https://www.cnblogs.com/fadewalk/p/10819191.html
Copyright © 2011-2022 走看看