如何设置apache2为开机自动启动。

由 yooulin 在 09-22-2004 13:29 发表:

如何设置apache2为开机自动启动。

我的rehat linux 9.0下安装了apache2,重启系统的时候必须手动启动apache2。我在setup->system services里也找到不到apache 和httpd服务项目。请各位仁兄帮忙。


由 arts 在 09-22-2004 13:38 发表:


/etc/rc.d/rc.local

添加起动命令


喜欢蓝色的天........


由 yooulin 在 09-22-2004 13:43 发表:

如何添加。

详细点。小弟对linux不熟。


由 arts 在 09-22-2004 13:47 发表:


vi /etc/rc.d/rc.local

#!/bin/sh

This script will be executed after all the other init scripts.

You can put your own initialization stuff in here if you don't

want to do the full Sys V style init stuff.

touch /var/lock/subsys/local

/etc/init.d/httpd start (按i插入此行)

~

~

~

~

~

~

~

~

~

~

~

~

~

按esc

输入:wq回车


喜欢蓝色的天........


由 arts 在 09-22-2004 13:48 发表:


不应该啊,你确认安装成功了?


喜欢蓝色的天........


由 yooulin 在 09-22-2004 14:16 发表:


当然成功了呀。我手动可以呀。/usr/local/apache2/bin/apachectl start


由 yooulin 在 09-22-2004 14:52 发表:

谢谢了。

我搞好了。

我先将启动文件cp到/etc/rc.d/init.d/下。然后增加启动命令就

Published At
Categories with 服务器类
Tagged with
comments powered by Disqus