Linux部署Tomcat(Deploying Tomcat for Linux)

1.下载

8、9、10版本,三选一

https://tomcat.apache.org/download-10.cgi

https://tomcat.apache.org/download-90.cgi

https://tomcat.apache.org/download-80.cgi

下载Binary Distributions的Core的tar.gz文件

2.解压

例如,用的是10版本,部署在/home/目录

cd home
tar -xvf apache-tomcat-10.0.13.tar.gz
mv apache-tomcat-10.0.13 tomcat

3.修改环境变量

vim ~/.bashrc

添加以下内容:

export CATALINA_HOME=/home/tomcat
export PATH=$PATH:/home/tomcat/bin

更新环境变量

source ~/.bashrc

4.启动

startup.sh

5.测试

在浏览器打开

http://localhost:8080/

6.关闭

shutdown.sh
————————

< strong > 1. Download < / strong >

8. Version 9 and 10, one out of three

https://tomcat.apache.org/download-10.cgi

https://tomcat.apache.org/download-90.cgi

https://tomcat.apache.org/download-80.cgi

下载Binary Distributions的Core的tar.gz文件

< strong > 2. Unzip < / strong >

For example, you are using version 10, which is deployed in the / home / directory

cd home
tar -xvf apache-tomcat-10.0.13.tar.gz
mv apache-tomcat-10.0.13 tomcat

< strong > 3. Modify environment variable < / strong >

vim ~/.bashrc

Add the following:

export CATALINA_HOME=/home/tomcat
export PATH=$PATH:/home/tomcat/bin

Update environment variables

source ~/.bashrc

< strong > 4. Start < / strong >

startup.sh

< strong > 5. Test < / strong >

Open in browser

http://localhost:8080/

< strong > 6. Close < / strong >

shutdown.sh