service httpd does not support chkconfig

来源:互联网 发布:python 无穷大 编辑:程序博客网 时间:2024/06/08 14:59

cp /usr/local/apache2/bin/apachectl  /etc/rc.d/init.d/httpdchkconfig --add httpd
报 service httpd does not support chkconfig 错误

出错原因:apachectl 这个脚本文件缺乏 chkconfig 和 description 这两个标签说明。

解决方法:

vim /etc/rc.d/init.d/httpd

#!/bin/sh
#

下增加以下说明:

# Startup script for the Apache Web Server## chkconfig: 2345 85 15# description: Apache is a World Wide Web server.#

原创粉丝点击