这里假设你已经安装好jdk1.7
官方网址:http://tomcat.apache.org/
最好选择国内镜像网址下载。
上传到Linux中
解压
tar -xvf /root/apache-tomcat-7.0.67.tar.gz
启动 我的目录是/usr/local/tomcat7/bin/startup.sh
现在其他计算机 还不能访问,要设置防火墙。
如果不太明白 可以直接关闭防火墙和Selinux
关闭 Selinux 编辑/etc/selinux/config文件
# This file controls the state of SELinux on the system.
# SELINUX= can take one of these three values:
# enforcing - SELinux security policy is enforced.
# permissive - SELinux prints warnings instead of enforcing.
# disabled - No SELinux policy is loaded.
SELINUX=disabled
# SELINUXTYPE= can take one of these two values:
# targeted - Targeted processes are protected,
# mls - Multi Level Security protection.
SELINUXTYPE=targeted
将 SElNUX 设为disabled
关闭防火墙
chkconfig –level 35 iptables off
现在其他计算机就可以访问了
设置开机启动
编辑 /etc/rc.d/rc.local
在最后添加
/usr/local/tomcat7/bin/startup.sh
前提是 JDK环境变量要配置好!