CentOS 7.7 upgrades the Tomcat version with soft links
1. Install JDK:
# rpm-ivh jdk-8u241-linux-x64.rpm
# java-version
2. Decompress Tomcat 8.5:
# tar-xf apache-tomcat-8.5.50.tar.gz-C / usr/local
# cd / usr/local
# ln-sv apache-tomcat-8.5.50/ tomcat
# ll | grep tomcat
Remarks: option description
(1)-s: soft link
(2)-v: displays the name of each linked file
3. Configure Tomcat environment variables:
# vim / etc/profile.d/tomcat.sh
Export CATALINA_HOME=/usr/local/tomcat
Export PATH=$CATALINA_HOME/bin:$PATH
Export JAVA_HOME=/usr/java/latest
Export JRE_HOME=$JAVA_HOME/jre
#. / etc/profile.d/tomcat.sh
# echo $CATALINA_HOME
# catalina.sh version
4. Decompress Tomcat 9.0:
# tar-xf apache-tomcat-9.0.30.tar.gz-C / usr/local
# cd / usr/local
Modify the soft link:
# ln-snf apache-tomcat-9.0.30/ tomcat
# ll | grep tomcat
Remarks: option description
(1)-s: soft link
(2)-n: if the link name is a symbolic link to a directory, it is treated as a normal file
(3)-f: delete the existing target file
5. View Tomcat environment variables and version information:
# echo $CATALINA_HOME
# version.sh