• 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  
  • 相关阅读:
    CF460 A. Vasya and Socks
    HDU-2159FATE(二维完全背包)
    HDU-2844 Coins(多重背包)
    POJ 1014 Dividing(多重背包)
    HDU2191(多重背包)
    数据结构课程设计:稀疏矩阵(加、减、乘、求逆矩阵)
    (转载)线段树模板(来自胡浩大牛)
    poj2386(简单dfs)
    Poj1852
    poj2109
  • 原文地址:https://www.cnblogs.com/fadewalk/p/10819191.html
Copyright © 2020-2023  润新知