vim /etc/rc.local #添加tomcat ,zookeeper的自启动 #system init tomcat start export JAVA_HOME=/opt/jdk8 /opt/zookeeper/bin/zkServier.sh start /opt/tomcat8/bin/catalina.sh run