Centos 32-bit Operating System
1. Download a good jdk-6u23-linux-i586.bin, you can go to the official website download can also download from the following link:
:
Http://dl.dbank.com/c0sxxbz5vb
Copy the downloaded jdk-6u23-linux-i586.bin to the directory you want to install, for example, under/develop
2. Facility permissions. Then, all users can modify the content in/develop (you can set it as needed)
Run the command [zhengchunxi @ centos ~] $
Sudo chmod A + rwx-r/develop
3. Switch to the/develop directory and unzip the jdk-6u23-linux-i586.bin
Run the command [zhengchunxi @ centos ~] $
CD/develop
[Zhengchunxi @ centos develop] $./jdk-6u23-linux-i586.bin
[Zhengchunxi @ centos ~] $ Sudo chmod A + rwx-r/develop
Decompress the package and generate the jdk1.6.0 _ 23 folder (the folder name is very important and corresponds to the path)
4. Set Environment Variables
If RedHat is used, create a java. Sh file in the/etc/profile. D folder and copy the configuration content to the java. Sh file.
For Ubuntu, the profile file in/etc has only one line at the end. Add the configuration information to the beginning of the last line.
Under centos 6.0
Run the command [zhengchunxi @ centos/] $
Gedit/etc/profile
Open the profile configuration file.
Unset I
Unset pathmunge
Add the following content to the rows:
# Setting Java environment variables
Export java_home =/develop/jdk1.6.0 _ 23
Export jre_home =/develop/jdk1.6.0 _ 23/JRE
Export classpath =.: $ java_home/lib: $ jre_home/lib: $ classpath
Export Path = $ path: $ java_home/bin: $ jre_home/bin: $ home/bin