Unzip the file: tar xzvf apache-tomcat-9.0.10.tar.gz # unzip tar.gz,
(If the file is compressed .tar file, tar -xvf file.tar, if the file is compressed tar.bz2 file, tar -xjvf file.tar.bz2)
Delete archive: rm -f apache-tomcat-9.0.10.tar.gz
Tomcat package moved to opt / tomcat under: mv /home/sunandmoon/Desktop/apache-tomcat-9.0.10 / opt / tomcat
Configure the environment variables, command: vim / etc / profile, the profile is added at the end of the file: export PATH = / opt / tomcat / bin: $ {PATH}
Continue input source / etc in the Terminal / profile loaded (source / etc / profile are performed at regular user and root)
Into the bin directory under tomcat directory: cd /opt/tomcat/apache-tomcat-9.0.10/bin
Start tomcat: ./ startup.sh
Use http browser in a virtual machine or virtual machine external browser: // localhost: 8080 / test Tomcat, Tomcat page appears if the installation was successful
Close Tomcat: After cd / opt / tomcat / bin ./shutdown.sh
Remarks: The above modify environment variables way for permanent changes, effective for multiple users. There are two other modifications:
Permanent changes, effective for a single user
Takes effect only bash / shell
Note 2: After entering the various commands vi: screen commands like roll , insert text type command , delete command , search and replace commands. . . . . . . . . . . . . Please refer to: https: //www.cnblogs.com/java-wp/p/7885732.html