- 论坛徽章:
- 0
|
10可用积分
我想开机自动启动IDS数据库、APACHE服务器,我在/etc/rc.d/rc.local文件中增加以下命令
==================================
su - informix -c oninit
sleep 30
ps -eo user,pid,cmd,lstart|grep oninit|grep informix>>/home/informix/test/oninit_log
su - informix -c 'onstat - >>/home/informix/test/oninit_log'
#/WWW/bin/apachectl start
/WWW/bin/httpd -k start
===================================
IDS数据库起来了、APACHE服务器也起来了。
但是APACHE服务器无法访问IDS数据库,其他正常。
如果在系统启动完毕,执行/WWW/bin/apachectl stop再执行/WWW/bin/apachectl start,那么APACHE服务器可以正常访问IDS数据库。
请问是什么原因?如何才能实现开机自动启动IDS数据库、APACHE服务器? |
最佳答案
查看完整内容
呵呵,来挣几分。我估计原因主要apache启动时,未获取到如INFORMIXDIR,INFORMIXSERVER等环境变量。解决的办法当然是在启动httpd前,设置好环境变量了。
|