cleey
望着那一丝海线,若隐若现。落日下的海霞,数不尽的美,看不完的醉
使用service启动服务,并且设置开机启动

设置service启动服务,并且设置开机启动编写脚本jdmschmod 777 jdms

#! /bin/bash
#chkconfig: 35 85 15
#description: this is jdmsdeamon.
start
() {
echo
"start jdmsdeamon: "
/usr/local/jdms/bin/jdmsdeamon
echo
"start success"
}

stop
() {
echo
"stop jdmsdeamon: "
killall jdmsdeamon
echo
"stop jdms_umdeamon: "
killall jdms_umdeamon
echo
"stop jdms_imdeamon: "
killall jdms_imdeamon
echo
"stop success"
}

restart
() {
stop
start
echo
"restart success"
}

case "$1" in
start
)
start
;;
stop
)
stop
;;
restart
)
restart
;;
*)
echo $
"Usage: $0 {start|stop|restart}"
exit 2
esac

保存后:chmod 777 jdms然后:cp jdms /etc/init.d/现在你可以使用service jdms start然后: chkconfig --add jdms现在是开机启动了,可以重启看看是否运行了

<< 上一篇 centos 6用yum安装中文输入法 PHP读取文件,并显示 下一篇 >>
文章标签
随意 | Created At 2014 By William Clinton | 蜀ICP备14002619号-4 |