個人linux系統沒有chkconfig命令怎麼辦?

chkconfig命令屬於readhat第linux系統的命令。linux

若是系統屬debina系如ubuntu是沒有這個命令的。ubuntu

若是系統屬於readhat系(如centos)但尚未這個命令centos

多是chkconfig包沒有被安裝。網絡

可先執行安裝命令ssh

有網絡的狀況下可直接執行yum安裝命令ci

命令以下rem

yum install chkconfigit

沒有網絡的狀況下可從安裝光盤下複製chkconfig的rpm包date

執行rpm命令安裝yum

假設復到了/tmp/chkconfig-1.3.30.2-2.el5.x86_64.rpm

命令以下

rpm -ivh /tmp/chkconfig-1.3.30.2-2.el5.x86_64.rpm

而後chkconfig命令就能夠用了。

在Ubuntu中是沒有chkconfig命令的,能夠用update-rc.d 來代替。

update-rc.d sshd defaults # Activate sshd with the default runlevels #使用默認運行級別激活sshd

update-rc.d sshd start 20 2 3 4 5 . stop 20 0 1 6 . # With explicit arguments #使用顯式參數

update-rc.d -f sshd remove # Disable sshd for all runlevels #禁用全部運行級別的sshd

shutdown -h now (or # poweroff) # Shutdown and halt the system #關閉和中止系統

相關文章
相關標籤/搜索