Install on Linux platforms:
1. Download: Jdk-6u45-linux-x64.bin
2. Next, log in to the Linux system and give the EXECUTE permission with the following command:
chmod +x Jdk-6u21-linux-x64.bin
3. Perform the installation of the JDK.
./jdk-6u45-linux-x64.bin
4. Configure the environment variables.
The configuration of environment variables is divided into several ways, depending on your choice of configuration:
Mode one: Configure Java_home and PATH and Class_path in the/etc/profile file
Because such a setting will work for the user's shell, it will have an impact on system security.
is at the end of this file add:
Export Java_home=/home/software/jdk1.6.0_45export classpath=.: $JAVA _home/lib/dt.jar: $JAVA _home/lib/ Tools.jarexport path= $PATH: $JAVA _home/bin
Execution Source/etc/profile is configured to take effect immediately
Way two:
Modify the. bashrc file to configure environment variables:
#vi. BASHRC
Export Java_home=/home/software/jdk1.6.0_45export classpath=.: $JAVA _home/lib/dt.jar: $JAVA _home/lib/ Tools.jarexport path= $PATH: $JAVA _home/bi
After the configuration is complete, use the logout command to exit and then log back in to make it effective.
Verify that the installation is successful and use java-version to view it.
[[email protected] jdk1.6.0_45]# Java-versionjava version "1.6.0_45" Java (TM) SE Runtime Environment (build 1.6.0_45-b06) Java HotSpot (TM) 64-bit Server VM (build 20.45-b01, Mixed mode)
Installing jdk1.6 Jdk-6u45-linux-x64.bin on a 64-bit Linux machine