红联Linux门户
Linux帮助

源码安装Apache,在配置其为系统服务时出错

发布时间:2008-12-11 19:34:30来源:红联作者:kingbanner
OS是RHEL5.1,源码安装Apache,在配置其为系统服务时出错:
[root@localhost httpd-2.2.10]# chkconfig --add httpd
httpd 服务不支持 chkconfig
[root@localhost httpd-2.2.10]# chkconfig httpd on
httpd 服务不支持 chkconfig


启动脚本我已拷入/etc/rc.d/init.d目录中并更名为httpd了:
cp /usr/local/apache/bin/apachectl /etc/rc.d/init.d/httpd




请问上面的问题是什么原因造成的?
文章评论

共有 7 条评论

  1. kafan160 于 2009-07-20 06:17:56发表:

    学习中.....

  2. 51love 于 2009-06-26 13:25:46发表:

    是啊,操作系统仅仅是个平台而已,没有应用软件Linux也是个摆设。
    你的命令输的再快再多也没用。

  3. lijingen 于 2009-06-25 19:09:20发表:

    [code][code]垃圾的要死---不是说楼主哈
    安装好后请cp /安装目录/bin/apachectl /etc/rc.d/init.d/httpd
    vi /etc/rc.d/init.d/httpd
    加入这么两段
    # chkconfig: 35 70 30
    # description: Apache
    chkconfig --add httpd
    chkconfig --level 345 httpd on
    真他妈狗屎,1年的帖子今天才解决贴出来,他妈的zhuangb的人/code][/code]

  4. lijingen 于 2009-06-25 19:09:03发表:

    [code]垃圾的要死---不是说楼主哈
    安装好后请cp /安装目录/bin/apachectl /etc/rc.d/init.d/httpd
    vi /etc/rc.d/init.d/httpd
    加入这么两段
    # chkconfig: 35 70 30
    # description: Apache
    chkconfig --add httpd
    chkconfig --level 345 httpd on
    真他妈狗屎,1年的帖子今天才解决贴出来,他妈的zhuangb的人/code]

  5. coolzyx 于 2008-12-26 11:14:52发表:

    你想要实现chkconfig --add ,services httpd start stop restart,是吗?
    找到你安装的那个源码包。然后复制 apachectl 到 /etc/rc.d/init.d/ ,更改权限 755 ,就可以了!
    我的就是这么做。

  6. fengmx 于 2008-12-11 21:56:12发表:

    我记得好像要在apachectl里的头部加入一句代码。我也不记得了。嘻嘻~~`

  7. rtl 于 2008-12-11 20:41:45发表:

    apachectl 是 apache 的控制脚本 而不是 系统启动时用的 SysV init 的?本,?然不支持 chkconfig

    Apache源码 根本不?系统启动??用的那??本(因?不同的?行版不通用),lz 想 用 系统启动??用的那??本 就必?自己?。