您的位置:首页 > 运维架构 > Tomcat

Centos6.3 安装tomcat及开机启动

2016-01-12 22:58 525 查看
这里假设你已经安装好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环境变量要配置好!
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: