免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 9279 | 回复: 5
打印 上一主题 下一主题

service httpd does not support chkconfig [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2003-06-30 18:30 |只看该作者 |倒序浏览
[root@firewall init.d]# chkconfig --level 35 httpd on
service httpd does not support chkconfig
一个服务如何才能做到支持chkconfig...?

论坛徽章:
0
2 [报告]
发表于 2003-07-01 09:03 |只看该作者

service httpd does not support chkconfig

检查/etc/init.d/httpd是否存在?

论坛徽章:
0
3 [报告]
发表于 2003-07-01 09:15 |只看该作者

service httpd does not support chkconfig

No...不存在...
在/etc/rc.d/init.d/下手工撰写一个httpd文件,然后chmod a+x httpd之后,执行:
root@firewall init.d]# chkconfig --level 35 httpd on
service httpd does not support chkconfig

论坛徽章:
0
4 [报告]
发表于 2003-07-01 09:20 |只看该作者

service httpd does not support chkconfig

自己写的缺东西,看看init.d其他的脚本,开头的几行里都会有给chkconfig用的注释。表明一些chkconfig用的信息,具体格式可以参照一下,或是man chkconfig

论坛徽章:
0
5 [报告]
发表于 2003-07-01 09:54 |只看该作者

service httpd does not support chkconfig

终于可以了....
[root@firewall init.d]# more httpd
#!/bin/sh
#
# Startup script for the Apache Web Server
#
# chkconfig: 345 85 15
# description: Apache is a World Wide Web server.  It is used to serve \
#              HTML files and CGI.
# processname: httpd
# pidfile: /var/run/httpd.pid
# config: /etc/httpd/conf/access.conf
# config: /etc/httpd/conf/httpd.conf
# config: /etc/httpd/conf/srm.conf


# Source function library.
. /etc/rc.d/init.d/functions

# See how we were called.
case "$1" in
  start)
        echo -n "Starting httpd: "
       ***********************
       # daemon httpd
        /usr/local/apache/bin/apachectl start
       ***********************
        echo
        touch /var/lock/subsys/httpd
        ;;
  stop)
        echo -n "Shutting down http: "
        killproc httpd
        echo
        rm -f /var/lock/subsys/httpd
        rm -f /var/run/httpd.pid
        ;;
  status)
        status httpd
        ;;
  restart)
        $0 stop
        $0 start
        ;;
  reload)
        echo -n "Reloading httpd: "
        killproc httpd -HUP
        echo
        ;;
  *)
        echo "Usage: $0 {start|stop|restart|reload|status}"
        exit 1
esac

exit 0
*************************
在末修改前,改变进程状态时提示信息如下:
[root@firewall init.d]# ./httpd stop
Shutting down http: [  OK  ]
[root@firewall init.d]# ./httpd start
Starting httpd: execvp: No such file or directory
[FAILED]
root@firewall init.d]# chkconfig --level 35 httpd on
service httpd does not support chkconfig
之后:
我参考了其它RH7.2系统上其它版本的apache的/etc/rc.d/init.d/httpd文件,
只将
    # daemon httpd             (将这行注销掉)
        /usr/local/apache/bin/apachectl start          (换成这行)
然后:
[root@firewall init.d]# chkconfig --level 35 httpd on
就可以了...
请问daemon httpd             中的daemon代表什么..,后台?

论坛徽章:
0
6 [报告]
发表于 2003-07-01 10:06 |只看该作者

service httpd does not support chkconfig

后台,作为守护进程。你可以看一下apachectl这个脚本,相信会有些收获。
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP