linux设置开机启动 服务不支持chkconfig解决方法脚本

 写了脚本,想用命令chkconfig加载自启动.提示"**服务不支持chkconfig",原来是自己写的脚本时,忘记写两行了.开头一般要这样写

  #!/bin/bash
  #chkconfig:345 61 61 //此行的345参数表示,在哪些运行级别启动,启动序号(S61);关闭序号(K61)
  #description:Apache //此行必写,描述服务.

  把脚本拷贝至/etc/init.d/目录下,执行命令:
  #ln -s /etc/init.d/
  #ln -s /etc/init.d/
  #ln -s /etc/init.d/

  再执行
  #chkconfig --levels httpd 345 on

 

相关文章

系ubuntu 下面打开终端输入:sudo apt-get install sendmail...
依家我有1个软件goagent目录(大家懂得) 放在/home/gateman/...
其实我想讲的是 cp -L关于-L参数的解释:-L, --dereferenc...
原地址:http://www.rjgc.net/control/content/content.php?...
chroot,即 change root directory (更改 root 目录)。在 li...
简单解析下, stdin就是标准输入, stdout就是标准。举个例子...