Build the Java environment before you install Tomcat
-
- Download JDK http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html from official website first
-
- Then put the downloaded JDK on the Linux server and unzip it with tar
tar -zxvf jdk***
-
- Will extract a folder jdk***
- 4. Editing system Environment variables
vi /etc/profile
Java_home as the path to the JDK
At the end of the document, add the following
export JAVA_HOME=/usr/local/jdk1.8.0_101export CLASSPATH=.:$JAVA_HOME/lib/dt.jar:$JAVA_HOME/lib/tools.jarexport PATH=$JAVA_HOME/bin:$PATH
2.1 Download Tomcat's latest installation package on Tomcat website
And then unzip it.
tar -zxvf /alidata/server/apache-tomcat-7.0.54.tar.gz
2.2 When the decompression is successful, we go directly to the bin directory in Tomcat.
Enter ./startup.sh start Tomcat
2.3 Verifying Successful Installation Tomcat
The default startup port number is: 8080
Use Ps-ef|grep tomcat to view the process;
Can also be a virtual machine Linux system inside, input http://localhost:8080/
Linux installation Tomcat