1. Visit the following url for downloading:
http://java.sun.com/javase/downloads/index.jsp
2. Copy the downloaded file to /usr/local (or to into a directory or your choice)
cp jdk-6u16-linux-x64-rpm.bin /usr/local/
3. Change the current directory
cd /usr/local/
4. Change the permission of the file you downloaded to be executable. Type:
chmod a+x jdk-6u16-linux-x64-rpm.bin
5. Verify that you have permission to execute the file. Type:
ls -l
6. To start the installation process, type:
./jdk-6u16-linux-x64-rpm.bin
7. The installation file creates jdk-6u16-linux-amd64.rpm file in the current directory.
8. Run the RPM command at the terminal to install the packages. Type:
rpm -ivh jdk-6u16-linux-amd64.rpm
9. The JRE is installed in jre1.6.0_(version number) sub-directory under the current directory.
In this case, the JRE is installed in the /usr/java directory.
Verify that the jdk1.6.0_16 sub-directory is listed under /usr/java directory.
cd /usr/java/
ls
10. Delete the bin and rpm file if you want to save disk space.
cd /usr/local/
rm jdk-6u16-linux-x64-rpm.bin
rm jdk-6u16-linux-amd64.rpm
11. Edit the /etc/profile file
Open /etc/profile file by the following command
vim /etc/profile
Add the following entries at the end of /etc/profile file
JAVA_HOME=/usr/java/jdk1.6.0_16
export JAVA_HOME
JRE_HOME=/usr/java/jdk1.6.0_16/jre
export JRE_HOME
Save /etc/profile file by the following commands
Esc
Shift+ Collon
:qw
Enter
Monday, February 15, 2010
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment