IT猫扑网文章教程

分类分类

Redhat/CentOS下apahce编译安装后的自动启动

2015-06-28 00:00作者:网管联盟

apache安装路径:/usr/local/apache

方法1
编辑/etc/rc.d/rc.local,增加一行:
/usr/local/apache/bin/apachectl start

方法2
#cp /usr/local/apache/bin/apachectl /etc/rc.d/init.d/
编辑/etc/init.d/apachectl,在第一行#!/bin/sh下增加两行:
# chkconfig: 2345 80 60
# description: Apache Start&Stop Scripts
添加到系统服务
#chkconfig --add apachectl

手动启动/停止服务
#/etc/init.d/apachectl start/stop
或:
#service apachectl start/stop

展开全部

相关文章

说两句网友评论
    我要跟贴
    取消