1、涉及文件
etc/rc.local
2、在该文件添加你所需要的启动任务即可。注意,任务执行顺序未作测试
3、样本如下, 以以为启动ngnix与tomcat样例
!/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
启动ngnix
/mnt/tengine/tengine-2.1.2/sbin/nginx
启动tomcat
/mnt/tomcat7/bin/startup.sh &> /dev/null
启动redis
/usr/local/redis/bin/redis-server /usr/local/redis/redis.conf
启动 mongodb
/mnt/mongodb/mongodb-3.2.10/bin/mongod -f /etc/mongodb.conf