INEWUP'S BLOG

CentOS设置开机自动启动某服务

CentOS设置开机自动启动某服务

这里以启动sshd服务为例:

查看sshd是否已经是系统服务:

chkconfig --list |grep sshd

会显示:

sshd    0:off 1:off 2:off 3:off 4:off 5:off 6:off

www.2cto.com

使用如下命令设置sshd服务自动启动:

chkconfig --level 5 sshd on

再次查看:

如图显示,证明设置成功了!

重启系统后,直接用SecureCRT工具访问成功了!