超级精简,两步走!哈哈,系统的环境变量都不用配置。
1、解压Tomcat压缩文件
tar -zxvf /home/dunhanson/upload/apache-tomcat-7.0.72.tar.gz -C /usr/local/cd /usr/local/
mv apache-tomcat-7.0.72/ tomcat
2、设置自启动并运行Tomcat
cp tomcat/bin/catalina.sh /etc/init.d/tomcatvi /etc/init.d/tomcat
#!/bin/sh # chkconfig: 2345 20 80 # description: tomcat service JAVA_HOME=/usr/local/jdk CATALINA_HOME=/usr/local/tomcat systemctl daemon-reload systemctl enable tomcat systemctl start tomcat