国产探花免费观看_亚洲丰满少妇自慰呻吟_97日韩有码在线_资源在线日韩欧美_一区二区精品毛片,辰东完美世界有声小说,欢乐颂第一季,yy玄幻小说排行榜完本

首頁 > 系統(tǒng) > Linux > 正文

Linux中chkconfig命令打開或關(guān)閉系統(tǒng)服務(wù)的使用教程

2020-07-10 11:07:54
字體:
供稿:網(wǎng)友

chkconfig提供了一個維護(hù)/etc/rc[0~6] d 文件夾的命令行工具,它減輕了系統(tǒng)直接管理這些文件夾中的符號連接的負(fù)擔(dān)。chkconfig主要包括5個原始功能:為系統(tǒng)管理增加新的服務(wù)、為系統(tǒng)管理移除服務(wù)、列出單簽服務(wù)的啟動信息、改變服務(wù)的啟動信息和檢查特殊服務(wù)的啟動狀態(tài)。當(dāng)單獨(dú)運(yùn)行chkconfig命令而不加任何參數(shù)時,他將顯示服務(wù)的使用信息。

必要參數(shù)
    --add 開啟指定的服務(wù)程序
    --del 關(guān)閉指定的服務(wù)程序
    --list 列出chkconfig所知道的所有服務(wù)

選擇參數(shù)
    --level<代號> 設(shè)置服務(wù)程序的等級代號,它是一串0~7的數(shù)字,如“-level35”代表指定運(yùn)行等級3和5
    --help 顯示幫助信息
    --version 顯示版本信息
   
用法1

復(fù)制代碼
代碼如下:

[root@localhost www]# chkconfig --list #查看系統(tǒng)程序列表
[root@localhost www]# chkconfig httpd on #將httpd加入開機(jī)啟動
[root@localhost www]# chkconfig httpd off #關(guān)閉httpd開機(jī)啟動

用法2

復(fù)制代碼
代碼如下:

[root@localhost tank]# chkconfig --add nginx #添加nginx啟動腳本為chkconfig管理的一個服務(wù)
[root@localhost tank]# chkconfig --del nginx #刪除chkconfig管理的的nginx啟動服務(wù)

實(shí)例:
安裝cent os 64位 后,默認(rèn)帶了很不多不必要的服務(wù),用以下命令列出:

復(fù)制代碼
代碼如下:

chkconfig --list | grep :on

cups 打印服務(wù) yum-updatesd 常在繁忙的時候占用大量CPU和內(nèi)存 pcscd 智能卡,比如SD讀卡器 hidd 和 bluetooth 藍(lán)牙 cpuspeed 智能調(diào)節(jié)CPU,筆記本用 firstboot 第一次安裝完成后的引導(dǎo)設(shè)置 gpm 鼠標(biāo)復(fù)制粘貼

復(fù)制代碼
代碼如下:

chkconfig cups off
chkconfig yum-updatesd off
chkconfig pcscd off
chkconfig hidd off
chkconfig bluetooth off
chkconfig cpuspeed off
chkconfig firstboot off
chkconfig gpm off

以下的內(nèi)容來源于網(wǎng)絡(luò),未考證功用

復(fù)制代碼
代碼如下:

chkconfig rhnsd off
chkconfig anacron off
chkconfig arptables_jf off
chkconfig autofs off
chkconfig openibd off
chkconfig messagebus off
chkconfig rawdevices off
chkconfig canna off
chkconfig atd off
chkconfig iiim off
chkconfig pcmcia off
chkconfig haldaemon off
chkconfig iptables off
chkconfig mdmonitor off
chkconfig hpoj off
#chkconfig nfslock off
chkconfig acpid off
chkconfig sendmail off
chkconfig cups off
chkconfig isdn off
chkconfig irqbalance off
chkconfig microcode_ctl off
chkconfig cups-config-daemon off
chkconfig ip6tables off

其他: 關(guān)閉nfs相關(guān)服務(wù) 關(guān)閉rpc相關(guān)服務(wù)
關(guān)閉
復(fù)制代碼
代碼如下:
SELinux vi /etc/selinux/config

發(fā)表評論 共有條評論
用戶名: 密碼:
驗(yàn)證碼: 匿名發(fā)表
主站蜘蛛池模板: 丰县| 华阴市| 青海省| 弋阳县| 土默特右旗| 南江县| 商南县| 龙门县| 枣强县| 北流市| 自治县| 屏边| 剑河县| 天气| 木里| 门源| 清苑县| 青冈县| 平湖市| 内黄县| 龙岩市| 临桂县| 宿迁市| 临漳县| 田东县| 中阳县| 遂溪县| 岳普湖县| 孝义市| 股票| 根河市| 正蓝旗| 贵溪市| 松滋市| 梁平县| 闵行区| 安多县| 建宁县| 会宁县| 河曲县| 龙岩市|