添加启动项 sudo vim /etc/rc.local 在exit 0 之前添加: export JAVA_HOME=jdk路径 /usr/local/tomcat/bin/startup.sh (tomcat start.sh路径)