Install JAVA JDK on Centos 6.x

JDK yang akan saya install adalah versi 1.8 update 111, namun bisa juga digunakan oleh versi-versi yang lain. Berikut langkah yang dilakukan

#cd /opt/

#wget –no-cookies –no-check-certificate –header “Cookie: gpw_e24=http%3A%2F%2Fwww.oracle.com%2F; oraclelicense=accept-securebackup-cookie” “http://download.oracle.com/otn-pub/java/jdk/8u111-b14/jdk-8u111-linux-x64.tar.gz”

#tar -xzvf jdk-8u111-linux-x64.tar.gz
#vi ~/.bash_profile
  then add this line
  export JAVA_HOME=/opt/jdk1.8.0_111
  export JRE_HOME=/opt/jdk1.8.0_111/jre
  export PATH=$PATH:/opt/jdk1.8.0_111/bin:/opt/jdk1.8.0_111/jre/bin
kemudian reload bash profilenya
#source ~/.bash_profile
setelah semua selesai dilakukan coba ketik
java -version
Bila sukses maka akan muncul versi java yang kita install tadi. selamat mencoba 🙂
Advertisements

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