Installation of Linux-centos JDK-6u32-linux-i586.bin

Source: Internet
Author: User
1. Download jdk1.6linux from the official Oracle website.

Is:

Http://download.oracle.com/otn-pub/java/jdk/6u32-b05/jdk-6u32-linux-i586.bin

 

2. The downloaded file is a jdk-6u32-linux-i586.bin file, which can be directly executed with the suffix binfile ..

After the download is complete, you can pass it to the Linux system through FTP.

 

3. log on to the Linux system and grant the execution permission. The command is as follows:

# Chmod-r 775 jdk-6u32-linux-i586.bin

 

4. Run JDK installation.

#./Jdk-6u32-linux-i586.bin

 

During installation, you will be prompted to press the Enter key and press Enter. A jdk1.6.0 _ 32 file will be generated under the current Linux directory.

JDK installation is complete.

 

5. Configure environment variables.

Environment variables can be configured in several ways, depending on your choice:

 

Method 1: Configure java_home and path and class_path in the/etc/profile file.

This setting will take effect for the user's shell and affect system security.
Add the following at the end of the file:
Export java_home =/home/webserver/software/linux_jdk/jdk1.6.0 _ 32
Export classpath =.: $ java_home/lib/dt. jar: $ java_home/lib/tools. Jar
Export Path = $ path: $ java_home/bin

 

Method 2:

Modify the. bashrc file to configure the environment variables:

# Vi. bashrc

Export java_home =/home/webserver/software/linux_jdk/jdk1.6.0 _ 32
Export classpath =.: $ java_home/lib/dt. jar: $ java_home/lib/tools. Jar
Export Path = $ path: $ java_home/bin

 

After the configuration is complete, use the logout command to exit and then log on again to make it take effect.

Verify whether the installation is successful. Use Java-version to check whether the installation is successful.

 

# Java-version
Java version "1.6.0 _ 32"
Java (TM) se Runtime Environment (build 1.6.0 _ 32-b05)
Java hotspot (TM) Client VM (build plugin 7-b02, mixed mode, sharing)
[Root @ localhost etc] #

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.