CentOS 配置的开机自启动。
vim /etc/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 echo never > /sys/kernel/mm/redhat_transparent_hugepage/enabled
ip route add default via 192.168.1.1 dev eth0
/opt/product/zookeeper/node-/bin/zkServer.sh start
/opt/product/activemq/node-/bin/activemq start
redis-server /etc/redis.conf
/opt/product/mongodb/bin/mongod --port --dbpath /data/db/ &
/opt/product/dubbo-admin-tomcat/bin/startup.sh