- From http://java.sun.com click on downloads->JavaSE and select the latest jdk (JDK6-update10)
- Select the linux -> multi-language and download the .bin file
- The file will download onto your desktop
- Open a terminal session (Applications->Accessories->Terminal) and enter cd Desktop
- move the downloaded file to your destination directory (e.g /opt)
sudo mv jdk-6u10-linux-i586.bin /opt - cd /opt
- sudo chmod 700 jdk-6u10-linux-i586.bin
- sudo ./jdk-6u10-linux-i586.bin
- type yes to accept the license agreement and install java with all the defaults.
Now we need to modify our system variables to know where Java is. There are a number of ways to do this - one option is as follows:
- sudo vi /etc/profile
- add the following entries to the end of the /etc/profile file:
export JAVA_HOME=/usr/jdk1.6.0_10
export PATH=$JAVA_HOME/bin:$PATH
Now reboot your server.
No comments:
Post a Comment