11.10 chkconfig:管理开机服务
生活随笔
收集整理的這篇文章主要介紹了
11.10 chkconfig:管理开机服务
小編覺得挺不錯(cuò)的,現(xiàn)在分享給大家,幫大家做個(gè)參考.
chkconfig 命令是Redhat系列的Linux系統(tǒng)中的系統(tǒng)服務(wù)管理工具,它可以用于查詢和更新不同的運(yùn)行等級(jí)下系統(tǒng)服務(wù)的啟動(dòng)狀態(tài)。 chkconfig命令的參數(shù)選項(xiàng)及說明--list? ??顯示不同運(yùn)行級(jí)別下服務(wù)的啟動(dòng)狀態(tài)--add ? ??添加一個(gè)系統(tǒng)服務(wù)--del ? ? 刪除一個(gè)系統(tǒng)服務(wù)--level ? 指定運(yùn)行級(jí)別以下是運(yùn)行級(jí)別說明。0:關(guān)機(jī)。1:單用戶模式。2:沒有網(wǎng)絡(luò)的多用戶模式。3:完全的多用戶模式。4:沒有使用的級(jí)別。5:圖形界面多用戶模式。6:重啟。了解chkconfig原理。chkconfig 的原理是在 runlevel級(jí)別的 /etc/rc.d/rc*.d目錄中將對(duì)應(yīng)服務(wù)做一個(gè)以S或K開頭的軟鏈接。[root@linuxprobe ~]# ll /etc/rc.d/rc3.d/ ? ? ? ? ? ??total 0lrwxrwxrwx. 1 root root 20 Jan 28 21:13 K50netconsole -> ../init.d/netconsolelrwxrwxrwx. 1 root root 17 Jan 28 21:13 S10network -> ../init.d/network下面只對(duì)rc3.d目錄做實(shí)驗(yàn),chkconfig的--level2345是同時(shí)對(duì)re2.d、rc3.d、re4.d、rc5.d這4個(gè)目錄進(jìn)行操作的。centos 7 下面使用systemctl list-unit-files 查看自啟任務(wù)[root@linuxprobe ~]# systemctl list-unit-filesUNIT 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 disabledvar-lib-nfs-rpc_pipefs.mount static ?brandbot.path disabledsystemd-ask-password-console.path static
總結(jié)
以上是生活随笔為你收集整理的11.10 chkconfig:管理开机服务的全部?jī)?nèi)容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 11.11 ntsysv:管理开机服务
- 下一篇: 11.8 iotop:动态显示磁盘I/O