CentOS6.5 安装 tomcat

1、首先下载tomcat.tar.gz包

http://tomcat.apache.org/download-70.cgi

2、移动到目标文件夹 

mv tomcat.tar.gz /usr/tomcat

3、解压tomcat安装包

# mkdir /usr/tomcat
# cd /usr/tomcat

#tar xf tomcat.tar.gz

4、启动tomcat服务

# ./startup.sh

5、在防火墙添加tomcat端口

# /sbin/iptables -I INPUT -p tcp --dport 8080 -j ACCEPT
保存配置
# /etc/rc.d/init.d/iptables save
重启防火墙
# /etc/rc.d/init.d/iptables restart

访问tomcat主页

http://localhost:8080!

posted @ 2016-09-18 18:00  孟大凡  阅读(168)  评论(0编辑  收藏  举报