linux ubuntu chkconfig 无效利用sysv-rc-conf 设置自启

chkconfig 命令无效

root@iZ2ze9dhxbd6xwizhjqbloZ:/usr/java# chkconfig
chkconfig: command not found
root@iZ2ze9dhxbd6xwizhjqbloZ:/usr/java# 

安装 sysv-rc-conf

root@iZ2ze9dhxbd6xwizhjqbloZ:/usr/java#  rpm -aq |grep chkconfig
root@iZ2ze9dhxbd6xwizhjqbloZ:/usr/java# apt-get install sysv-rc-conf
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following additional packages will be installed:
  libcurses-perl libcurses-ui-perl libterm-readkey-perl
The following NEW packages will be installed:
  libcurses-perl libcurses-ui-perl libterm-readkey-perl sysv-rc-conf
0 upgraded, 4 newly installed, 0 to remove and 181 not upgraded.
Need to get 367 kB of archives.
After this operation, 1,263 kB of additional disk space will be used.
Do you want to continue? [Y/n] y
Get:1 http://mirrors.cloud.aliyuncs.com/ubuntu xenial/universe i386 libcurses-perl i386 1.33-1build1 [86.6 kB]
Get:2 http://mirrors.cloud.aliyuncs.com/ubuntu xenial/universe i386 libterm-readkey-perl i386 2.33-1build1 [28.2 kB]
Get:3 http://mirrors.cloud.aliyuncs.com/ubuntu xenial/universe i386 libcurses-ui-perl all 0.9609-1 [229 kB]
Get:4 http://mirrors.cloud.aliyuncs.com/ubuntu xenial/universe i386 sysv-rc-conf all 0.99-7 [22.7 kB]
Fetched 367 kB in 0s (1,348 kB/s)  
Selecting previously unselected package libcurses-perl.
(Reading database ... 102296 files and directories currently installed.)
Preparing to unpack .../libcurses-perl_1.33-1build1_i386.deb ...
Unpacking libcurses-perl (1.33-1build1) ...
Selecting previously unselected package libterm-readkey-perl.
Preparing to unpack .../libterm-readkey-perl_2.33-1build1_i386.deb ...
Unpacking libterm-readkey-perl (2.33-1build1) ...
Selecting previously unselected package libcurses-ui-perl.
Preparing to unpack .../libcurses-ui-perl_0.9609-1_all.deb ...
Unpacking libcurses-ui-perl (0.9609-1) ...
Selecting previously unselected package sysv-rc-conf.
Preparing to unpack .../sysv-rc-conf_0.99-7_all.deb ...
Unpacking sysv-rc-conf (0.99-7) ...
Processing triggers for man-db (2.7.5-1) ...
Setting up libcurses-perl (1.33-1build1) ...
Setting up libterm-readkey-perl (2.33-1build1) ...
Setting up libcurses-ui-perl (0.9609-1) ...
Setting up sysv-rc-conf (0.99-7) ...

直接加入启动程序,例如把 /etc/init.d/tomcat加入到系统自动 启动列表中:

  sysv-rc-conf tomcat on   //开启
  sysv-rc-conf tomcat off  //关闭

centos 跟ubuntu 还是有区别的!

sysv-rc-conf 命令执行效果
这里写图片描述

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

Java小技巧

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值