个人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 #关闭和中止系统

相关文章
相关标签/搜索