1. Download the Tomcat server
Link: https://pan.baidu.com/s/15wEXVJWdUUuXX1xRnXylUQ
Extraction code: 1234Official website download: Apache Tomcat® - Apache Tomcat 9 Software Downloads
2. Upload to Linux
I am using the upload tool that comes with FInalShell
3. Unzip the installation package
tar -zxvf apache-tomcat-9.0.63.tar.gz -C /usr/local/
Among them, I am used to putting the software I installed in the /usr/local directory
4. Start the service
sh startup.sh
Enter the bin directory of Tomcat to start the service, and the running results are as follows
5. Two methods to verify whether Tomcat starts successfully
(1) Check the startup log
Check the next fifty lines of the log to see if there is an error message
tail -50 /usr/local/apache-tomcat-9.0.63/logs/catalina.out
(2) View process
Check the existence of the process
ps -ef|grep tomcat
6. Access tTomcat in windows
Check your ip address: ip addr
ip addr
Then visit http://192.168.176.128:8080/ in Windows according to ip
It is normal to be unable to access, the Linux system firewall is automatically opened, so we need to set up a firewall
7. Set up a firewall
Firewall operation:
View firewall status: systemctl status firewalld
Temporarily shut down the firewall: systemctl stop firewalldPermanently turn off the firewall: systemctl disable firewalld
Open the firewall: systemctl start firewalld
Open the specified port: firewall-cmd --zone=public --add-port=8080/tcp --permanent
Close the specified port: firewall-cmd --zone=public --remove-port=8080/tcp --permanent
Effective immediately: firewall-cmd --reload
View open ports: firewall-cmd --zone=public --list-ports
firewall-cmd --zone=public --add-port=8080/tcp --permanent
firewall-cmd --reload
firewall-cmd --zone=public --list-ports