1. Download jdk (download from official website)
2. Unzip tar -xzf
3. Configure environment variables vim /etc/profile Add the configuration at the end (the directory is your own installation directory)
export JAVA_HOME=/root/user/java/jdk1.8.0 _45
export CLASSPATH=.:$JAVA_HOME/lib:$JAVA_HOME/jre/lib:$CLASSPATH
export PATH=$JAVA_HOME/bin:$JAVA_HOME/jre/bin:$PATH
4. Enter source /etc/profile in the terminal to make the configuration take effect
5 .Enter java -version in the terminal
and the following result shows that the jdk configuration is successful
java version "1.8.0_45"
Java(TM) SE Runtime Environment (build 1.8.0_45-b14)
Java HotSpot(TM) 64-Bit Server VM (build 25.45-b02 , mixed mode)
6. Download tomcat (I downloaded tomcat8)
wget http://mirrors.tuna.tsinghua.edu.cn/apache/tomcat/tomcat-8/v8.0.36/bin/apache-tomcat-8.0. 36.tar.gz 7.Unzip
tar -xzf
8. Configure tomcat environment variables In the bin directory
vim start.sh of the tomcat home directory, add export JAVA_HOME=/root/user/java/jdk1.8.0_45
on top of exec "$PRGDIR"/"$EXECUTABLE" start "$@" export CLASSPATH=.:$JAVA_HOME/lib:$JAVA_HOME/jre/lib:$CLASSPATH export PATH=$JAVA_HOME/bin:$JAVA_HOME/jre/bin:$PATH export TOMCAT_HOME=/root/user/tomcat/apache-tomcat- 8.0.36 vim shutdown.sh adds export JAVA_HOME=/root/user/java/jdk1.8.0_45 export CLASSPATH=.:$JAVA_HOME/lib: above exec "$PRGDIR"/"$EXECUTABLE" start "$@" $JAVA_HOME/jre/lib:$CLASSPATH export PATH=$JAVA_HOME/bin:$JAVA_HOME/jre/bin: $PATH export TOMCAT_HOME=/root/user/tomcat/apache-tomcat-8.0.36
9. Start tomcat Open the bin directory under the tomcat home directory and enter ./startup.sh
10. Enter Ip: 8080 in the browser to display the tomcat home page, indicating that the tomcat configuration is successful
11. View the tomcat operation log Open the logs directory under the tomcat home directory and enter tail in the terminal -f catalina.out
Easy Way to Install Tomcat Server on Ubuntu System
Guess you like
Origin http://10.200.1.11:23101/article/api/json?id=326776145&siteId=291194637
Ranking