当前位置:首页 > 服务器类 > Linux服务器 > > Linux系统中加入自定义Shell为系统服务

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

点击次数:42 次 发布日期:2008-11-21 23:05:15 作者:源代码网
源代码网推荐

 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

源代码网供稿.
网友评论 (0)
会员中心
服务器类
本站推荐
服务器类之精华