在 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
#
#
#
# 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 \
阅读(4488) | 评论(0) | 转发(0) |