惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

博客园 - Franky
N
Netflix TechBlog - Medium
Google Online Security Blog
Google Online Security Blog
月光博客
月光博客
量子位
酷 壳 – CoolShell
酷 壳 – CoolShell
V
V2EX
腾讯CDC
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
博客园 - 聂微东
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
M
MIT News - Artificial intelligence
Vercel News
Vercel News
The GitHub Blog
The GitHub Blog
Hugging Face - Blog
Hugging Face - Blog
博客园 - 【当耐特】
Apple Machine Learning Research
Apple Machine Learning Research
aimingoo的专栏
aimingoo的专栏
博客园 - 三生石上(FineUI控件)
CTFtime.org: upcoming CTF events
CTFtime.org: upcoming CTF events
MongoDB | Blog
MongoDB | Blog
H
Help Net Security
The Cloudflare Blog
Blog — PlanetScale
Blog — PlanetScale
F
Full Disclosure
G
Google Developers Blog
罗磊的独立博客
Jina AI
Jina AI
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
Y
Y Combinator Blog
H
Hackread – Cybersecurity News, Data Breaches, AI and More
J
Java Code Geeks
A
About on SuperTechFans
IT之家
IT之家
大猫的无限游戏
大猫的无限游戏
S
SegmentFault 最新的问题
有赞技术团队
有赞技术团队
GbyAI
GbyAI
雷峰网
雷峰网
T
The Blog of Author Tim Ferriss
The Register - Security
The Register - Security
U
Unit 42
D
Docker
Martin Fowler
Martin Fowler
L
LINUX DO - 热门话题
NISL@THU
NISL@THU
阮一峰的网络日志
阮一峰的网络日志
C
Cybersecurity and Infrastructure Security Agency CISA
博客园_首页
Google DeepMind News
Google DeepMind News

博客园 - herobeast

hadoop 2.7.1 高可用安装部署 Redis篇 MySql篇 JDK篇 web一次下载多个附件 Implementing a Custom Security Manager(翻译) 腾达路由器设置 正则表达式 jQuery Resizable笔记 OSGi规范 OSGi bundle 与 fragment OSGi bundle之间互相通信的方法 Apache CXF 分布式OSGi部署HelloWorld 五米测试 Spring.DM web 开发环境搭建 - herobeast Spring.DM版HelloWorld 腾讯资深产品经理谈敏捷开发于游戏 js矢量图类库:Raphaël—JavaScript Library 关于生成id的问题
Tomcat篇
herobeast · 2015-09-14 · via 博客园 - herobeast

安装tomcat

先从tomcat官网找到最新的版本下载地址,我找的是Core下的安装包,下载到本地:

  1. wget http://mirror.bit.edu.cn/apache/tomcat/tomcat-8/v8.0.26/bin/apache-tomcat-8.0.26.tar.gz

下载到本地后,我要解压缩到 /usr/java下面

  1. tar -zxvf apache-tomcat-8.0.26.tar.gz -C /usr/java/

我们看一下是否解压成功了:

  1. # ls
  2. apache-tomcat-8.0.26 default jdk1.8.0_60 latest

看来已经解压完成了,接下来设置一下tomcat的权限,进入到apache-tomcat-8.0.26目录

启动tomcat 

  1. bash bin/startup.sh

设置防火墙

修改防火墙配置文件,所在目录/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

完成之后重新启动防火墙即可 service iptables restart .此端口号将可以被访问

防火墙服务命令:

service iptables start

service iptables restart

service iptables stop

永久性生效,重启后不会复原

开启:

chkconfig iptables on

关闭:

chkconfig iptables off

查看是否可以访问:

http://xxx.xxx.xxx.xxx:8080

如果可以看到tomcat管理界面就说明配置成功了。