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  
  • 相关阅读:
    查看kafka在zookeeper中节点信息和查看方式
    安装单机版redis
    一 Redis 简介 和存储
    Spark消费kafka的直连方式
    Streaming 累加器和广播变量 和sql
    sparkStreaming转换算子02
    DStreams输入 从kafka消费数据 直连
    关于上下文图
    2018年春季个人阅读计划
    问题账户需求分析
  • 原文地址:https://www.cnblogs.com/fadewalk/p/10819191.html
Copyright © 2011-2022 走看看