在 centos 中,设置服务自启动 可以 用 chkconfig ;但是在 Ubuntu 中,却没有 chkconfig ;
我们应该使用的是: sysv-rc-conf ;用法基本与 chkconfig 一致 !
1、安装 sysv-rc-conf
sudo apt-get -y install sysv-rc-conf
2、设置某个服务为自启动服务:
sysv-rc-conf 服务名 on
3、查看自启动列表:
sysv-rc-conf --list
或 查看某个服务是否为自启动服务:
sysv-rc-conf --list 服务名