Installing the JDK environment on Cnetos

Source: Internet
Author: User

Only in the installation of jdk1.6, jdk1.7 and jdk1.8, other versions please detour, the purpose is to facilitate themselves and everyone in the future to do the JDK environment, suffering from no JDK installation package and set the variable process, I will install the package are placed in the cloud disk, need to directly in the connection to find:

The general framework of this chapter: Part One: CENTOS6 (uninstall all packages that were originally associated with the JDK)

1:root user Identity installation RPM installation method and Tar package installation method

2: Normal user identity installation RPM installation method and Tar package installation method

Part II: CENTOS7 (uninstall all packages that were originally associated with the JDK)

1:root user Identity installation RPM installation method and Tar package installation method

2: Normal user identity installation RPM installation method and Tar package installation method

Part III: Experience and suggestions for beginners

The first part: CENTOS6 series

Be sure to start working without any previous JDK environmental impact--------------------------------------------

RPM Package Series

Root user

jdk1.6 version of RPM package: Jdk-6u45-linux-x64-rpm.bin

After execution, look again at the packages that will generate many sun-java-* RPM packages and jdk-6u45-linux-amd64.rpm.

We can use the command to see that these packages are already installed in the system.

In this process, the RPM package is automatically installed, the variable path does not need to be set up, the installation is finished, directly view the version.

jdk1.7 version of RPM package: jdk-7u80-linux-x64.rpm

View RPM Package Installation status

View JDK version

jdk1.8 version of RPM package: jdk-8u151-linux-x64.rpm

View RPM Package Installation status

View JDK version

Tar Package Series

jdk1.6 Version installation package: Jdk-6u45-linux-x64.bin

Export java_home=/usr/local/jdk1.6.0_45
Export classpath=.: $JAVA _home/lib/dt.jar: $JAVA _home/lib/tools.jar
Export path= $PATH: $JAVA _home/bin

jdk1.7 version of tar package: jdk-7u80-linux-x64.tar.gz

Export java_home=/usr/local/jdk1.7.0_80
Export path= $JAVA _home/bin: $PATH
Export classpath=.: $JAVA _home/lib/dt.jar: $JAVA _home/lib/tools.jar

jdk1.8 Series Tar Package: jdk-8u152-linux-x64.tar.gz

Export java_home=/usr/local/jdk1.8.0_152
Export path= $JAVA _home/bin: $PATH
Export classpath=.: $JAVA _home/lib/dt.jar: $JAVA _home/lib/tools.jar

Normal User

Tar Package Series

Root user

Normal User

Do jdk1.6 series: Jdk-6u45-linux-x64.bin

Export java_home=/usr/local/jdk1.6.0_45
Export classpath=.: $JAVA _home/lib/dt.jar: $JAVA _home/lib/tools.jar
Export path= $PATH: $JAVA _home/bin

Part II: CENTOS7 series

Root user

jdk1.6 version of RPM package: Jdk-6u45-linux-x64-rpm.bin

After execution, review the packages that will generate many sun-java-* RPM packages and jdk-6u45-linux-amd64.rpm

We can use the command to see that these packages are already installed in the system.

In this process, the RPM package is automatically installed, the variable path does not need to be set up, the installation is finished, directly view the version.

jdk1.7 version of RPM package: jdk-7u80-linux-x64.rpm

jdk1.8 version of RPM package: jdk-8u151-linux-x64.rpm

Tar Package Series

Normal User

Root user

Normal User

Installing the JDK environment on Cnetos

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.