Matur Nuwun Sampun Mampir Mugi-Mugi Saget Dados Ilmu Ingkang Manfaat Fiddunya Wal Akherat

Senin, 04 Agustus 2008

Instalasi Sun Java (JDK) di CentOS-5

Pada CentOS-5 defaultnya telah ada Java, akan tetapi Java yang terpasang adalah GNU Java (versi 1.4.2). seperti terlihat dibawah ini

[helix@helix ~]$ java -version
java version "1.4.2"
gij (GNU libgcj) version 4.1.2 20070626 (Red Hat 4.1.2-14)

Copyright (C) 2006 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
[helix@helix ~]$

Nah, gimana caranya jika kita menggunakan Sun Java (JDK 6 update 4) tanpa menghapus GNU Java?. caranya adalah sebagai berikut:
1. download JDK 6 update 4 (paket: jdk-6u4-linux-i586-rpm.bin) click disini
2. berikutnya:

       # chmod +x jdk-6u4-linux-i586-rpm.bin
# ./jdk-6u4-linux-i586-rpm.bin

3. setelah selesai proses instalasi coba lagi perintah di bawah ini:

[root@helix helix]# java -version
java version "1.4.2"
gij (GNU libgcj) version 4.1.2 20070626 (Red Hat 4.1.2-14)

Copyright (C) 2006 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
[root@helix helix]#

Ooops…ternyata masih GNU Java. agar defaultnya kita menggunakan Sun Java maka lakukanlah seperti perintah di bawah ini:

        # rm -f /var/lib/alternatives/java
# /usr/sbin/alternatives --install /usr/bin/java java /usr/lib/jvm/java-1.4.2-gcj-1.4.2.0/jre/bin 1
# /usr/sbin/alternatives --install /usr/bin/java java /usr/java/jdk1.6.0_04/bin 2

periksa apakah Sun Java merupakan default, dengan perintah:

        # /usr/sbin/alternatives --config java

langkah berikutnya adalah membuat file java.sh di direktori /etc/profile.d yang berisikan:

        export JAVA_HOME=”/usr/java/jdk1.6.0_04”
export PATH=”$PATH:$JAVA_HOME/bin”

lalu ubah mode akses dengan perintah:

        # chmod +x /etc/profile.d/java.sh

untuk langkah berikutnya kita coba lihat apakah java yang digunakan adalah Sun Java dengan perintah:

[root@helix helix]# which java
/usr/bin/java
[root@helix helix]# java -version
java version "1.6.0_04"
Java(TM) SE Runtime Environment (build 1.6.0_04-b12)
Java HotSpot(TM) Client VM (build 10.0-b19, mixed mode, sharing)
[root@helix helix]#

0 komentar:


Silakan Bekomentar.!!!


Semakin banyak berkomentar, semakin banyak backlink, semakin cinta Search Engine terhadap blog anda
:a:
:b:
:c:
:1: :2: :3: :4: :5: :6:
:7: :8: :9: :10: :11: :12:

Posting Komentar

Tinggalkan Pesan

Get cash from your website. Sign up as affiliate.Join 4Shared Now! affiliate program

EARN CASH FROM YOUR SITE

Turn your valuable site visitors into income. Work online and join our free money making partner program. We offer the most commission rate to help maximize your income stream.

Join our money making program absolutely no charge and 100% risk free.

Sign Up...

Mountain a constant stream of money

Our money making system helps you to establish a constant stream of cash, 24 hours a day, 7 days a week, 365 days a year. Allowing you more time to focus on the things you love. You'll even receive money while you sleep!

Start receiving steady affiliate revenue

This money earn program really can make you profit on the same day. Start collecting serious partner income with almost no effort at all. This is a serious revenue opportunity, the first step for you to build a steady, reliable, long-time profitable business.

A constant money generator

Imagine running of a something that never failed to provide you with income-flow. A earning money program so amazingly profitable that you never had to work for a boss ever again!

Lotta Rewards Lotta Rewards