🔖 Tomcat 安装脚本和文档
parent
2d6f13c903
commit
4aacef0676
|
@ -49,3 +49,4 @@
|
|||
* Nginx 安装和配置:| [CODES](codes/deploy/tool/nginx) | [DOCS](docs/deploy/tool/nginx/install-nginx.md) |
|
||||
* Nodejs 安装和配置:| [CODES](codes/deploy/tool/nodejs) | [DOCS](docs/deploy/tool/nodejs/install-nodejs.md) |
|
||||
* Redis 安装和配置:| [CODES](codes/deploy/tool/redis) | [DOCS](docs/deploy/tool/redis/install-redis.md) |
|
||||
* Tomcat 安装和配置:| [CODES](codes/deploy/tool/tomcat) | [DOCS](docs/deploy/tool/tomcat/install-tomcat.md) |
|
||||
|
|
|
@ -0,0 +1,13 @@
|
|||
# 安装 Tomcat
|
||||
|
||||
## 安装 Tomcat8
|
||||
|
||||
使用方法:
|
||||
|
||||
```sh
|
||||
wget --no-check-certificate --no-cookies https://raw.githubusercontent.com/dunwu/linux/master/codes/deploy/tool/tomcat/install-tomcat8.sh
|
||||
chmod -R 777 install-tomcat8.sh
|
||||
./install-tomcat8.sh
|
||||
```
|
||||
|
||||
脚本会下载解压 tomcat 到 `/opt/software/tomcat` 路径下。
|
|
@ -1,10 +1,17 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
echo -e "\n>>>>>>>>> install Node.js"
|
||||
###################################################################################
|
||||
# 安装 Tomcat 脚本
|
||||
# 适用于所有 linux 发行版本。
|
||||
# Author: Zhang Peng
|
||||
###################################################################################
|
||||
|
||||
mkdir -p /opt/software/tomcat
|
||||
cd /opt/software/tomcat
|
||||
echo -e "\n>>>>>>>>> install tomcat"
|
||||
|
||||
version=8.5.27
|
||||
wget http://apache.fayea.com/tomcat/tomcat-8/v${version}/bin/apache-tomcat-${version}.tar.gz
|
||||
tar -zxvf apache-tomcat-${version}.tar.gz
|
||||
# 下载并解压 redis
|
||||
root=/opt/software/tomcat
|
||||
version=8.5.28
|
||||
mkdir -p ${root}
|
||||
wget -O ${root}/apache-tomcat-${version}.tar.gz http://mirrors.tuna.tsinghua.edu.cn/apache/tomcat/tomcat-8/v${version}/bin/apache-tomcat-${version}.tar.gz
|
||||
cd ${root}
|
||||
tar zxvf apache-tomcat-${version}.tar.gz
|
||||
|
|
|
@ -0,0 +1,39 @@
|
|||
# Tomcat 安装
|
||||
|
||||
## 安装
|
||||
|
||||
安装步骤如下:
|
||||
|
||||
(1)下载并解压到本地
|
||||
|
||||
进入官网下载地址:https://tomcat.apache.org/download-80.cgi ,选择合适的版本下载。
|
||||
|
||||
我选择的是最新稳定版本 8.5.28:http://mirrors.tuna.tsinghua.edu.cn/apache/tomcat/tomcat-8/v8.5.28/bin/apache-tomcat-8.5.28.tar.gz
|
||||
|
||||
我个人喜欢存放在:`/opt/software/tomcat`
|
||||
|
||||
```
|
||||
wget -O /opt/software/tomcat/apache-tomcat-8.5.28.tar.gz http://mirrors.tuna.tsinghua.edu.cn/apache/tomcat/tomcat-8/v8.5.28/bin/apache-tomcat-8.5.28.tar.gz
|
||||
cd /opt/software/tomcat
|
||||
tar zxvf apache-tomcat-8.5.28.tar.gz
|
||||
```
|
||||
|
||||
## 启动
|
||||
|
||||
**启动 tomcat 服务**
|
||||
|
||||
```
|
||||
cd /opt/software/tomcat/apache-tomcat-8.5.28/bin
|
||||
./catalina.sh start
|
||||
```
|
||||
|
||||
**停止 tomcat 服务**
|
||||
|
||||
```
|
||||
cd /opt/software/tomcat/apache-tomcat-8.5.28/bin
|
||||
./catalina.sh stop
|
||||
```
|
||||
|
||||
## 脚本
|
||||
|
||||
| [安装脚本](https://github.com/dunwu/linux/tree/master/codes/deploy/tool/tomcat) |
|
Loading…
Reference in New Issue