WEB开发网      好站好分享!你的一份分享是我们的一份动力;请分享 ---﹥
开发学院操作系统Linux/Unix Linux系统中加入自定义Shell为系统服务 阅读

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

 2008-05-20 12:07:55 来源:WEB开发网 减小字体增大字体】  关注谷汶锴的微博
核心提示: 1. [root@localhost ~]# cp /usr/local/apache2/bin/apachectl /etc/init.d/httpd 2. [root@localhost ~]# vi /etc/init.d/httpd 3. 在第二行加入(必须,否则无法加入) # chkconfig: 2345
 

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

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

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

# chkconfig: 2345 85 15

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

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

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

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

Tags:Linux 加入

编辑录入:爽爽 [复制链接] [打 印]
赞助商链接