apachect开机启动
时间:2009-06-01 来源:gamester88
apache开机启动方法
注:apache为自己编译安装
第一种方法:
[root@tomcat ~]# vi /etc/rc.local 加入如下一句: /usr/local/httpd/bin/apachectl start
第二种方法: [root@tomcat ~]# cp /usr/local/httpd/bin/apachectl /etc/rc.d/init.d/apache [root@tomcat ~]# vi test ln -s /etc/init.d/apache /etc/rc1.d/K90apache ln -s /etc/init.d/apache /etc/rc2.d/S90apache ln -s /etc/init.d/apache /etc/rc3.d/S90apache ln -s /etc/init.d/apache /etc/rc4.d/S90apache ln -s /etc/init.d/apache /etc/rc5.d/S90apache ln -s /etc/init.d/apache /etc/rc6.d/K95apache [root@tomcat ~]# vi /etc/rc.d/init.d/apache 在#!/bin/sh后面加入下面两行:
#chkconfig: 2345 85 15
#description: 后面是任意内容 [root@tomcat ~]# chkconfig --level 345 apache on 然后从新启动计算机可以看到apache服务已经自动运行了
[root@tomcat ~]# vi /etc/rc.local 加入如下一句: /usr/local/httpd/bin/apachectl start
第二种方法: [root@tomcat ~]# cp /usr/local/httpd/bin/apachectl /etc/rc.d/init.d/apache [root@tomcat ~]# vi test ln -s /etc/init.d/apache /etc/rc1.d/K90apache ln -s /etc/init.d/apache /etc/rc2.d/S90apache ln -s /etc/init.d/apache /etc/rc3.d/S90apache ln -s /etc/init.d/apache /etc/rc4.d/S90apache ln -s /etc/init.d/apache /etc/rc5.d/S90apache ln -s /etc/init.d/apache /etc/rc6.d/K95apache [root@tomcat ~]# vi /etc/rc.d/init.d/apache 在#!/bin/sh后面加入下面两行:
#chkconfig: 2345 85 15
#description: 后面是任意内容 [root@tomcat ~]# chkconfig --level 345 apache on 然后从新启动计算机可以看到apache服务已经自动运行了
相关阅读 更多 +