linuxshell:Linux系统中加入自定义Shell为系统服务

1. [root@localhost ~]# cp /usr/local/apache2/bin/apachectl /etc/init.d/httpd

2. [root@localhost ~]# vi /etc/init.d/httpd

3. 在第 2行加入(必须否则无法加入)

# chkconfig: 2345 85 15

# description: httpd is web server(此处为描述)

介绍说明:2345表示在2345这 4种启动级别里面加载这个服务85表示启动(开机时)顺序号15表示关闭(关机时)顺序号

4. [root@localhost ~]# chkconfig -add httpd

5. [root@localhost ~]# chkconfig ——level 35 httpd on

Tags:  linuxshell命令 linuxshellif linuxshell编程 linuxshell

延伸阅读

最新评论

发表评论