download tomcat
address:https://tomcat.apache.org/
I downloaded tomcat9.0
tar -zxvf apache-tomcat-9.0.45.tar.gz
cd apache-tomcat-9.0.45/bin
./startup.sh
Browser input locolhost: 8080 (the default port number is 8080, which can be modified in the server.xml configuration file)
successfully✌️
Configure environment variables:
export PATH=$PATH:/Users/yanghui/Downloads/apache-tomcat-9.0.45/bin
Code deployment: deploy the code to the webapps of the instance or under webapps/ROOT/
Shut down tomcat: ./shutdown.sh