Ubuntu 16.4 LTS Install JDK1.8 102 / tomcat9

Download JDK install package from oracle.
http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html
Choose JDK 64x for linux, tar.gz file.
Mv the gz file to /usr/: sudo mv ...gz /usr
tar -zxvf ...gz
vi /etc/profile
Add JAVA_HOME/CLASSPATH/PATH for the jdk folder.
done. java -version


Tomcat: download tar.gz
unzip to /usr
sudo vi startup.sh
Add below env settings.
[quote]JAVA_HOME=/usr/jdk1.8.0_102
JRE_HOME=$JAVA_HOME/jre
PATH=$PATH:$JAVA_HOME/bin:$JRE_HOME
CLASSPATH=.:$JRE_HOME/lib/rt.jar:$JAVA_HOME/lib/dt.jar:$JAVA_HOME/lib/tools.jar
TOMCAT_HOME=/usr/apache-tomcat-9.0.0.M10[/quote]
sudo ./startup.sh

ssh/sftp
http://yhf8377.blog.163.com/blog/static/176860177201210217219800/

你可能感兴趣的:(Ubuntu 16.4 LTS Install JDK1.8 102 / tomcat9)