十年匠心定制 · 商业建站与技术教学双线并行 咨询热线:400-886-1026 service@lmnt.cn
ARTICLE DETAIL

资讯详情

深耕网站建设与运营推广的一线实战洞察。

linux 使用rc.local 开机延迟执行 命令, 启动resin ,tomcat

linux 使用rc.local 开机延迟执行 命令, 启动resin ,tomcat 客户需要开机即可执行启动服务的脚本系统为redhat-5.4 配置了 oracle, resin , tomcatoracle 已经使用 inittab 启动以下是 启动resin tomcat 的脚本稍加改造可以按顺序启动一系列服务。[rootxnhtsgserver01 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 dont # 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 保存 后退出重启机器检测服务是否正常
返回列表