With a little side of applesauce...

Thursday, February 1, 2007

Installing Greenstone Digital Library Software on Fedora Core 4

Fedora Core 4 comes with java jre installed, but we need the jdk installed to use the Greenstone Librarians Interface (gli.sh).

To remove the default java packages from Fedora Core 4:

rpm -e –nodeps java-1.4.2-gcj-compat-1.4.2.0-40jpp_31rh

Then, we need to download the j2sdk 1.4.2 from sun.com (it is down today for maintenance, so will get a URL later).

Now, we install the j2sdk-1_4_2_*.rpm (download the newest SDK from http://java.sun.com/j2se/1.4.2/download.html, if you haven’t yet):

chmod 755 j2sdk-1_4_2_11-linux-i586-rpm.bin
./j2sdk-1_4_2_11-linux-i586-rpm.bin

Which yields the following:

Do you agree to the above license terms? [yes or no]
yes
Unpacking…
Checksumming…
0
0
Extracting…
UnZipSFX 5.40 of 28 November 1998, by Info-ZIP (Zip-Bugs@lists.wku.edu).
inflating: j2sdk-1_4_2_11-linux-i586.rpm
Done.

Finally:
rpm -i j2sdk-1_4_2_11-linux-i586.rpm

Now, we export the new java_install/bin directory into the $PATH:
export PATH=$PATH:/usr/java/j2sdk1.4.2_11/bin

Or, to maintain the correct PATH environment variable across multiple sessions, modify the PATH line already found in your ~/.bash_profile to look like:
PATH=$PATH:$HOME/bin:/usr/java/j2sdk1.4.2_11/bin

Next, let’s run the installation script to install gsdl into /usr/local/gsdl:

tar -xzvf gsdl-2.63-unix.tar.gz
cd gsdl-2.63-unix/Unix
./Install.sh

I took all of the defaults. Add the following configuration directives to your httpd.conf file:

ScriptAlias /cgi-bin/ "/usr/local/gsdl/cgi-bin/"
<Directory "/usr/local/gsdl/cgi-bin">
AllowOverride None
Options None
Order allow,deny
Allow from all
</Directory>


Alias /gsdl/ "/usr/local/gsdl/"
<Directory "/usr/local/gsdl">
Options Indexes MultiViews FollowSymLinks
AllowOverride None
Order allow,deny
Allow from all
</Directory>


NOTE: Don’t forget to comment out the default cgi-bin ScriptAlias.

Test the webserver setup by opening your browser and visiting:
http://localhost/cgi-bin/library

Next, we need to do a few things to get the Greenstone Librarians Interface to work:

Enter the /usr/local/gsdl/gli directory and run:

./makegli.sh
./makejar.sh

Run the GLI:
./gli.sh

TROUBLESHOOTING:

If you run:

./gli.sh

and receive the following error:


Running the Greenstone Librarian Interface...
Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/java/j2sdk1.4.2_09/jre/lib/i386/libawt.so: libXp.so.6: cannot open shared object file: No such file or directory
at java.lang.ClassLoader$NativeLibrary.load(Native Method)
at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1586)
at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1503)
at java.lang.Runtime.loadLibrary0(Runtime.java:788)
at java.lang.System.loadLibrary(System.java:834)
at sun.security.action.LoadLibraryAction.run(LoadLibraryAction.java:50)
at java.security.AccessController.doPrivileged(Native Method)
at java.awt.Toolkit.loadLibraries(Toolkit.java:1437)
at java.awt.Toolkit.(Toolkit.java:1458)
at java.awt.Color.(Color.java:250)
at javax.swing.plaf.metal.MetalTheme.(MetalTheme.java:32)
at javax.swing.plaf.metal.MetalLookAndFeel.getCurrentTheme(MetalLookAndFeel.java:1294)
at javax.swing.plaf.metal.MetalLookAndFeel.createDefaultTheme(MetalLookAndFeel.java:1226)
at javax.swing.plaf.metal.MetalLookAndFeel.getDefaults(MetalLookAndFeel.java:1233)
at javax.swing.UIManager.setLookAndFeel(UIManager.java:394)
at javax.swing.UIManager.setLookAndFeel(UIManager.java:424)
at org.greenstone.gatherer.GathererProg.main(GathererProg.java:57)
Done!

This is caused by Fedora Core 4 has moving from xfree86 to xorgs (for xwindows). You can fix this by visiting rpmfind.net and installing the following package:
xorg-x11-deprecated-libs-6.8.2-37.FC4.49.2.i386.rpm

No comments: