Tuesday, December 2, 2008

Problems with installing Go-oo and Java installation How-to

I received some feedback saying installing go-oo on their respective Fedora machines did not work as expected as outlined in my earlier post

By the way, the method also works on Centos and RHEL machines.

Well it seems that after a re-installation of Fedora, and added the YUM repo, I ran into an issue where only 2.4.1 version of go-oo was available. I resolved the issue by changing the "baseurl = " parameneter in /etc/yum.repos.d/GoOo.repo file with baseurl = http://ftp.kddilabs.jp/Linux/distributions/ftp.suse.com/projects/go-oo/stable/linux-x86/

The yum repo rpm points to a metalink i.e. it will redirect the downloader to one of its closest mirror. The repo I am using is in Japan, closest to Malaysia.

Also, if you intend to install Base, do install at least a JRE. I usually go for Sun's Java for maximum compatibility but the free and open Icedtea and OpenJDK seems to work as well.

To enable Java Runtime in a RHEL/Centos/Fedora/BLAG machine:
  1. Download JRE or JDK from http://java.sun.com
  2. Download the BIN file and not the RPM one (e.g. jdk-6u10-linux-i586.bin)
  3. su and then copy the downloaded file to /opt
  4. Change the file to executable by issuing chmod a+x jdk-6u10-linux-i586.bin
  5. Extract the file by ./jdk-6u10-linux-i586.bin, you see the extracted directory as jdk1.6.0_10
  6. Create the file /etc/profile.d/java.sh
  7. Put in the following java.sh file

    export JAVA_HOME= /opt/jdk1.6.0_10
    export PATH=$PATH:$JAVA_HOME/bin:/usr/sbin:/sbin

  8. Exit and save the file
  9. Change the file attribute to executable by chmod a+x /etc/profile.d/java.sh
  10. Load it source /etc/profile.d/java.sh
  11. To test it, type java -version and you should see something like:

    java version "1.6.0_10"
    Java(TM) SE Runtime Environment (build 1.6.0_10-b33)
    Java HotSpot(TM) Server VM (build 11.0-b15, mixed mode)

  12. To enable Jav plugin for FIrefox :
    ln -s /opt/jdk_1.6.0_10/jre/plugin/i386/ns7/libjavaplugin_oji.so /usr/lib/mozilla/plugins

2 comments:

KageSenshi said...

best way to install Java sun is through its compat package.

http://mirrors.dotsrc.org/jpackage/1.7/generic/SRPMS.non-free/

rebuild the java-1.6.0-sun-compat-1.6.0.06-1jpp.src.rpm against the JDK tarball and install it. It will work just like the java rpms from Fedora repositories

and btw, OpenJDK works well. Icedtea is a different case, as thats not Java 1.6 .. but Java 1.7 ..

msian_tux_lover said...

Perhaps I am a little old school But then again, best is debatable; RPMs are always recommended in RHEL/Centos/Fedora.