service httpd does not support chkconfig

在 Redhat 上面使用源码的方式安裝 Apache 后,将 bin/apachectl 复制到 /etc/rc.d/init.d/ 目录, 并想用 chkconfig 将 Apache 设定成自动启动,但出现了 "service httpd does not support chkconfig" [root@oracle9i mysql]# chkconfig --add httpd service httpd does not support chkconfig 解决方法是打开/etc/rc.d/init.d/httpd (或 /etc/init.d/httpd),并再下面加入: # chkconfig: - 85 15      //#不能省略,注意空格 # description: Apache is a World Wide Web server.  It is used to serve \   //description:后可任意字符串

例子: #!/bin/bash # # Licensed to the Apache Software Foundation (ASF) under one or more # contributor license agreements.  See the NOTICE file distributed with # this work for additional information regarding copyright ownership. # The ASF licenses this file to You under the Apache License, Version 2.0 # (the "License"); you may not use this file except in compliance with # the License.  You may obtain a copy of the License at # #     http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. # # # Startup script for the Apache Web Server # # chkconfig: - 85 15 # description: Apache is a World Wide Web server.  It is used to serve \  原文链接:http://blog.chinaunix.net/uid-24250828-id-2621434.html

posted @ 2013-01-04 19:10  茗迹周  阅读(447)  评论(0编辑  收藏  举报