centos6.4 Linux下安装tomcat
1、下载tomcat
http://mirrors.hust.edu.cn/apache/tomcat/tomcat-8/v8.5.16/bin/apache-tomcat-8.5.16.tar.gz
2、解压tomcat到指定目录
tar -zxvf /home/softwore/apache-tomcat-8.0.36.tar.gz -C /home/tools/
3、启动tomcat
进入bin目录下 ./startup.sh
4、在Windows环境下访问centos需要开通防火墙指定端口
找到配置文件 /etc/sysconfig/iptables
-A INPUT -m state --state NEW -m tcp -p tcp --dport 8080 -j ACCEPT
//将上面那句放在下面这两句上面
-A INPUT -j REJECT --reject-with icmp-host-prohibited
-A FORWARD -j REJECT --reject-with icmp-host-prohibited
5、设置开机自启动
在/etc/rc.d/rc.local 文件里添加
echo "tomcat start..."
export JAVA_HOME=/home/tools/jdk1.8.0_131 //需要指定jdk
/home/tools/apache-tomcat-8.0.36/bin/startup.sh start
/home/tools/apache-tomcat-8.0.36/bin/startup.sh start
相关推荐
farwang 2020-11-25
星愿心愿 2020-11-24
tianhuak 2020-11-24
zhjn0 2020-11-24
昭君出塞 2020-11-23
bluecarrot 2020-11-23
linuxwcj 2020-10-21
以梦为马不负韶华 2020-10-20
彼岸随笔 2020-10-20
yutou0 2020-10-17
applecarelte 2020-10-16
ourtimes 2020-10-16
waterhorse 2020-09-19
MRFENGG 2020-11-11
rainandtear 2020-10-30
kyssfanhui 2020-10-20
liuhangtiant 2020-10-20