您的位置:首页 > 运维架构 > Linux

linux中将程序加入到开机自动启动

2013-09-24 16:00 183 查看
如果将在linux中将命令或者程序设置为开机自动启动,只需要进入到将对应命令加入到/etc/rc.d/rc.local文件里即可,如下

打开文件,vi /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

/usr/local/apache-tomcat-6.0.37/bin/startup.sh --设置tomcat为开机自动启动程序。
sh /rpc_start.sh ---设置rpc_start.sh脚本为开机自动启动程序。
~
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: