Installing Java jdk1.6.0_33 on CentOS

Fikri
0

Installing Java jdk1.6.0_33 on CentOS

1. Download jdk-6u33-linux-x64.bin dari internet.
2. Copy file jdk-6u33-linux-x64.bin ke direktori /opt/
3. Rubah permission file agar bisa diinstall
[root@adempiere opt]# cd ~
[root@adempiere ~]# cd /opt/
[root@adempiere opt]# chmod +x jdk-6u33-linux-x64.bin
4. Instal jdk1.6.0_33
[root@adempiere opt]# ./jdk-6u33-linux-x64.bin
5. Setelah selesai akan terbentuk folder dan file-file java di direktori opt
[root@adempiere opt]# ls -la
total 153960
drwxr-xr-x 8 root root 4096 Oct 16 14:37 jdk1.6.0_33
6. Mengaktifkan java yang sudah terinstal
[root@adempiere opt]# update-alternatives --install "/usr/bin/java" "java" "/opt/jdk1.6.0_33/bin/java" 1
[root@adempiere opt]# update-alternatives --install "/usr/bin/javac" "javac" "/opt/jdk1.6.0_33/bin/javac" 1
[root@adempiere opt]# update-alternatives --install "/usr/bin/javaws" "javaws" "/opt/jdk1.6.0_33/bin/javaws" 1
[root@adempiere opt]# update-alternatives --set java /opt/jdk1.6.0_33/bin/java
[root@adempiere opt]# update-alternatives --set java /opt/jdk1.6.0_33/bin/javac
[root@adempiere opt]# update-alternatives --set java /opt/jdk1.6.0_33/bin/javaws
7. Restart server
8. Cek java running
[root@adempiere etc]# java -version
java version "1.6.0_33"
Java(TM) SE Runtime Environment (build 1.6.0_33-b03)
Java HotSpot(TM) 64-Bit Server VM (build 20.8-b03, mixed mode)
9. Set parameter java untuk user adempiere
cd /home/adempiere
vi .bashrc
export ADEMPIERE_HOME=/opt/Adempiere
export JAVA_HOME=/opt/jdk.1.6.0_33
vi .bash_profile
export ADEMPIERE_HOME=/opt/Adempiere
export JAVA_HOME=/opt/jdk.1.6.0_33
10. Restart server
11. Done.

Post a Comment

0Comments

Post a Comment (0)