Installing Tomcat on Linux

1. Download

Official website:
https://tomcat.apache.org/

For instance:
https://tomcat.apache.org/download-80.cgi
8.5.75
Core -> tar.gz

2. Unzip

copy apache-tomcat-8.5.75.tar.gz to /usr/src

Execute the unzip command:

1
tar -xvf apache-tomcat-8.5.75.tar.gz
APACHE

3. Run

Execute the run command:

1
2
3
cd apache-tomcat-8.5.75/bin

./startup.sh
SHELL

4. View log

1
2
3
cd apache-tomcat-8.5.75/logs

tail -f catalina.out
SHELL

5. Stop

1
2
3
cd apache-tomcat-8.5.75/bin

./shutdown.sh
SHELL

6. Other

If you need external network access, you need to open the firewall:

1
2
3
4
5
6
firewall-cmd --list-all

firewall-cmd --add-service=http --permanent
firewall-cmd --add-port=8080/tcp --permanent

firewall-cmd --reload
SHELL

Installing Tomcat on Linux
https://www.hardyhu.cn/2022/02/13/Installing-Tomcat-on-Linux/
Author
John Doe
Posted on
February 13, 2022
Licensed under