面试:如何把xxx.sh使用/etc/init.d/xxx.sh start启动,并且可以用chkconfig配置开机自启动

chkconfig原理:

1.脚本放到/etc/init.d下面,并且可执行(/etc/init.d/sshd)

   需要被chkconfig管理,需要添加进去chkconfig  --add  sshd

2.chkconfig  --level  3  sshd  on   实质就是  rm  -f  /etc/rc,d/rc3.d/K25sshd

posted @ 2018-08-23 10:51  axzq  阅读(479)  评论(0编辑  收藏  举报