下载tomcat
http://tomcat.apache.org/download-70.cgi
1.解压tomcat
unzip apache-tomcat-7.0.37.zip //解压
mv apache-tomcat-7.0.37 tomcat //重命名
2.配置环境变量
export JRE_HOME=/usr/java/jdk1.7.0/jre
export CATALINA_HOME=tomcat路径
PATH=:$CATALINA_HOME/bin
source .bash_profile
3.配置防火墙
vi /etc/sysconfig/iptables
-A INPUT -m state --state NEW -m tcp -p tcp --dport 8080 -j ACCEPT
4.重启防火墙
service iptables restart
5. 启动tomcat
进入tomcat路径
/bin
./startup.sh
./catalina.sh