2007年1月29日星期一

让apache,postgresql ,tomcat随机自启动




Linux [my OS is CentOS 4.2] 下 让apache,postgresql 随机自启动



在etc/rc.d/rc.local文件中加入如下
#apache2 auto start
/usr/local/apache2/bin/httpd -k start
#postgresql auto start
su - postgres -c "/usr/local/pgsql/bin/postmaster -D /usr/local/pgsql/data -S -i"
#tomcat5 auto start
su - tomcat -c /opt/tomcat5/bin/startup.sh


#notice:
#你可能需要执行chmod -R 777 /opt/tomcat5/logs/赋与tomcat用户在logs下的读写权限。










没有评论: