Ubuntu14.04 installing JDK and Tomcat

Source: Internet
Author: User

It has been installed several times before, but each time you need to install again and have to re-search the tutorial, to record their own to avoid forgetting.

Install JDK Download

Download: Click to open the link, I downloaded the filename is jdk-8u66-linux-x64.tar.gz

Unzip the installation

I'm going to install it under/opt/jvm/.

First extract, TAR-ZXVF jdk-8u66-linux-x64.tar.gz, get jdk1.8.0_66

Rename and move to/OPT/JVM,mv jdk1.8.0_66/jdk1.8/ mv jdk1.8.0_66//opt/jvm/

Setting Environment Variablesedit/etc/profile, add
Export Java_home=/opt/jvm/jdk1.8export Jre_home=${java_home}/jreexport classpath=.:${java_home}/lib:${jre_home}/ Libexport Path=${java_home}/bin: $PATH
Depending on the actual situation.

Exit after saving, run Source/etc/profile, make the change take effect

Configuring the default JDK

Because some systems have pre-installed OPENJDK and use it by default, it is necessary to change the default to our manual installation. Execute the following command:

sudo update-alternatives--install/usr/bin/java java/opt/jvm/jdk1.8/bin/java 300sudo update-alternatives--install/ Usr/bin/javac Javac/opt/jvm/jdk1.8/bin/javac 300sudo update-alternatives--install/usr/bin/javah javah/opt/jvm/ Jdk1.8/bin/javah 300sudo update-alternatives--install/usr/bin/javap javap/opt/jvm/jdk1.8/bin/javap 300sudo Update-alternatives--install/usr/bin/javadoc Javadoc/opt/jvm/jdk1.8/bin/javadoc 300sudo update-alternatives-- Config Javasudo update-alternatives--config javacsudo update-alternatives--config javahsudo update-alternatives-- Config Javapsudo update-alternatives--config Javadoc

during the selection version, enter the label of your own installation

ValidationInput: Java-versionmy output is as followsjava Version "1.8.0_66"
Java (TM) SE Runtime Environment (build 1.8.0_66-b17)
Java HotSpot (TM) 64-bit Server VM (build 25.66-b17, Mixed mode)
The JDK was successfully installed.Installing TomcatDownloadwebsite address: Click to open the linkSelect the version you want to download. I'm under 8.0, file name is apache-tomcat-8.0.33.tar.gzUnzip the installationalso ready to install under/opt/Unzip, TAR-ZXVF apache-tomcat-8.0.33.tar.gz. Get apache-tomcat-8.0.33 Renaming MV apache-tomcat-8.0.33 tomcat-8.0 move to/opt/MV tomcat-8.0/opt/ Use

Run the Tomcat folder in the Bin directory under the startup.sh script to start Tomcat, and then enter localhost:8080 in the browser to appear on that page. Shutdown.sh is the close script.

configuring Tomcat in EclipseDownload Plugin

Go to this address click on the open link to download the plugin, unzip and copy to Eclipse's plugin folder, restart eclipse will find the upper left corner of a number of kittens icon


The leftmost one is to start the Tomcat server, the middle one is off, and the last is the reboot.

Then make the appropriate configuration under Windown---preferences---tomcat, select the version and the Tomcat installation path.

You can then use Tomcat in Eclipse.

Ubuntu14.04 installing JDK and Tomcat

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.