Install Java Sun On Centos


Step one please uninstall java version from GNU

$ yum remove *java*

Download java from HERE , Create directory java under directory /usr/ or you can download with wget

$ mkdir /usr/java

 

Copy java to directory java, Extarct your java

$ tar zxvf jre-7u5-linux-i586.gz

Look java version on directory

$ /usr/java/jre1.7.0_05/bin/java -version
java version "1.7.0_05"
Java(TM) SE Runtime Environment (build 1.7.0_05-b05)
Java HotSpot(TM) Client VM (build 23.1-b03, mixed mode)

Edit PATH Java from the profile

$ vim /etc/profile

Add line export PATH above default

PATH=$PATH:/usr/java/jre1.7.0_05/bin/

Clear session, Logout your session & Login again to as root

$ clear
$ logout

Look java version

$ java -version
java version "1.7.0_05"
Java(TM) SE Runtime Environment (build 1.7.0_05-b05)
Java HotSpot(TM) Client VM (build 23.1-b03, mixed mode)

Good Luck

 

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s