1 Star 0 Fork 9

zhouwang / accumulation

forked from taoxiongfeng / accumulation 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
2.tomcat8服务的安装与配置.md 1.54 KB
一键复制 编辑 原始数据 按行查看 历史
taoxiongfeng 提交于 2019-10-29 17:13 . 提交日志

tomcat8服务的安装与配置

需先准备JDK环境(如没有安装先安装jdk)

一、查看服务器上tomcat版本

[root@izuf61z1rt2fvuhr3u07s0z ~]# yum search tomcat

二、安装

1.进入安装目录(目录自选,或者自己新建)

[root@izuf61z1rt2fvuhr3u07s0z ~]# cd /home/tomcat/

2.下载压缩包(选择tomcat8版本)

# wget http://mirror.bit.edu.cn/apache/tomcat/tomcat-8/v8.5.40/bin/apache-tomcat-8.5.40.tar.gz

3.解压安装包

# tar -zxvf apache-tomcat-8.5.35.tar.gz

4.重命名文件夹(文件夹名字,推荐下划线加端口号方式。区分不同容器)

# mv apache-tomcat-8.5.35 tomcat_8031

5.更改tomcat端口号防止多个tomcat运行冲突(共有3处需要更改)

首先找到tomcat安装目录下的conf文件夹下server.xml文件

更改没有被占用的端口

<Server port="8005" shutdown="SHUTDOWN">(更改前)

<Server port="8020" shutdown="SHUTDOWN">(更改后)

此处为tomcat的运行端口只需更改8080为需要的端口即可

<Connector port="8080" protocol="HTTP/1.1" connectionTimeout="20000" redirectPort="8443" />(更改前)

<Connector port="8030" protocol="HTTP/1.1" connectionTimeout="20000" redirectPort="8443" />(更改后)

最后更改此处端口

<Connector port="8009" protocol="AJP/1.3" redirectPort="8443" />(更改前)

<Connector port="8040" protocol="AJP/1.3" redirectPort="8443" />(更改后)

6.进入启动目录,启动tomcat

# cd /home/tomcat/tomcat_8031/bin/
# ./startup.sh
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
Shell
1
https://gitee.com/zhouwang4/accumulation.git
git@gitee.com:zhouwang4/accumulation.git
zhouwang4
accumulation
accumulation
master

搜索帮助

344bd9b3 5694891 D2dac590 5694891