Select the official website of the installation package https://tomcat.apache.org/download-70.cgi?Preferred=http%3A%2F%2Fmirror.bit.edu.cn%2Fapache%2F
Select the appropriate mirror
Right copy the link on the package needed
LINUX by
wget http://mirror.bit.edu.cn/apache/tomcat/tomcat-7/v7.0.96/bin/apache-tomcat-7.0.96.tar.gz
Decompression
tar zxvf apache-tomcat-7.0.96.tar.gz ## 测试 cd apache-tomcat-7.0.96/ sh bin/startup.sh ## 访问8080端口看成功与否 ## 关闭 sh bin/shutdown.sh
Configuration environment variable
## 查看当前路径 pwd ## 我的路径是/home/apache-tomcat-7.0.96 ## 修改配置文件 vim /etc/profile # 在配置文件末尾增加tomcat配置 TOMCAT_HOME=/home/apache-tomcat-7.0.96 PATH=$PATH:$TOMCAT_HOME/bin export TOMCAT_HOME PATH # 刷新配置 source /etc/profile
verification
## 启动tomcat
startup.sh
## 关闭tomcat
shutdown.sh