UbuntuServer12.04 install JRE

Source: Internet
Author: User
UbuntuServer12.04 install JRE1, JRE version is officially released by Oracle serverjre72008,: http://download.oracle.com/otn-pub/java/jdk/7u21-b11/server-jre-7u21-linux-x64.tar.gz? AuthParam = 1369042105_ccb07d81f8301455441aae96f

Install JRE on Ubuntu Server 12.04

1. JRE version is officially released by Oracle server jre 72008,: http://download.oracle.com/otn-pub/java/jdk/7u21-b11/server-jre-7u21-linux-x64.tar.gz? AuthParam = 1369042105_ccb07d81f8301455441aae96ff455be1.

2. Upload the jre to the user root directory.

3. decompress the compressed package

Tar-xzf server-jre-7u21-linux-x64.gz

Get the folder named jdk1.7.0 _ 21.

4. Create/usr/local/java directory

Cd/usr/local

Sudo mkdir java

5. Change ~ /Jdk1.7.0 _ 21 copy to/usr/local/java directory

Sudo mv ~ /Jdk1.7.0 _ 21/usr/local/java

6. Access/usr/local/java

Cd/usr/local/java

7. Change the users and user groups of all files in/usr/local/java to root.

Sudo chown-R root.

Sudo chgrp-R root.

8. Add permanent system environment variables

1. Get the root permission: sudo su-

2. edit/etc/profile: vi/etc/profile.

3. Add the following command at the bottom of/etc/profile:

JAVA_HOME =/usr/local/java/jdk1.7.0 _ 21 # note the path here Export JAVA_HOME PATH = $ JAVA_HOME/bin: $ PATH Export PATH CLASSPATH =.: $ JAVA_HOME/lib/dt. jar: $ JAVA_HOME/lib/tools. jar Export CLASSPATH

4. Save and exit: esc: wq

9. Make the environment variable take effect

Source/etc/profile

10. Check whether the installation is successful.

Java-version

Javac-version

For more information about Ubuntu, see Ubuntu special page http://www.linuxidc.com/topicnews.aspx? Tid = 2

Related Article

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.