CentOS6.7设置程序开机自启动

来源:互联网 发布:制造业软件 编辑:程序博客网 时间:2024/06/06 09:18

把启动程序的命令添加到/etc/rc.d/rc.local文件中,比如下面的是设置开机启动mongodb

#!/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/mongodb/bin/mongod  -f /usr/local/mongodb/bin/mongodb.conf


0 0
原创粉丝点击