客户需要开机即可执行启动服务的脚本,系统为redhat-5.4 , 配置了 oracle, resin , tomcat
oracle 已经使用 inittab 启动,以下是 启动resin tomcat 的脚本,稍加改造,可以按顺序启动一系列服务。
[root@xnhtsgserver01 glis90web]#
在程序路径下编辑 rstart.sh 文件, 使用 chmod 755 ./rstart.sh
#延迟1分钟
sleep 60
#改变路径, 执行命令
cd /home/oracle/glis90web
./start.sh
./starttomcat.sh
编辑 /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
# 使用 oracle 用户及 用户环境 后台执行 rstart.sh
su - oracle -c "/home/oracle/glis90web/rstart.sh &"
保存 后退出重启机器,检测服务是否正常
1260




被折叠的 条评论
为什么被折叠?



