Personal Note : How to update java on centos 5.2

This post is a reminder to myself on how to update the java version on my VPS a linux Centos hosted at Viviotech.

 

With a normal browser

1. Find the last version of java from the website java.sun

2. Copy the link of the version without the rpm something like that

http://cds.sun.com/is-bin/INTERSHOP.enfinity/WFS/CDS-CDS_Developer-Site/en_US/-/USD/VerifyItem-Start/jdk-6u20-linux-i586.bin?BundledLineItemUUID=s7dIBe.ogRAAAAEo4NxbMEqR&OrderID=6F9IBe.ojMoAAAEo0dxbMEqR&ProductID=guBIBe.oc_wAAAEnaDJHqPYe&FileName=/jdk-6u20-linux-i586.bin

 

On the VPS 

1.

-bash-3.2# cd /opt/soft/
 Go to where you wants to download the file. 

2. 

-bash-3.2# wget with the link

3. 

-bash-3.2# mv *.bin jdk-6u20-linux-i586.bin that will rename the long file to something more normal.

4. 

-bash-3.2# chmod +x jdk-6u20-linux-i586.bin that will make the file executable.

5. 

-bash-3.2# ./jdk-6u20-linux-i586.bin execute the installation.

You will need to press "enter" a couple of time to acknowledge the licence and press "Y" at the end.

6. Now we have a new folder jdk1.6.0_20

7. 

-bash-3.2# rm jdk-6u20-linux-i586.bin
 that remove the installation files.

Now we have to update the old link in 2 places for my setup.

8. 

-bash-3.2# vi /etc/profile.d/java.sh

Modify the path of JAVA_HOME to new version

export JAVA_HOME=/opt/soft/jdk1.6.0_20/

9. 

-bash-3.2# vi /etc/init.d/resin

Modify the path of JAVA_HOME

JAVA_HOME=/your/java/path for me it's /opt/soft/jdk1.6.0_20

 

Voilà.

 

| View count: 16470
del.icio.us Digg Facebook Yahoo! My Web Google Bookmarks DZone

No comments yet.

(will not be published)
Leave this field empty: