LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > SUSE / openSUSE
User Name
Password
SUSE / openSUSE This Forum is for the discussion of Suse Linux.

Notices


Reply
  Search this Thread
Old 12-10-2007, 08:14 AM   #1
cvoelker
LQ Newbie
 
Registered: Dec 2004
Location: Hamburg, Germany
Distribution: Debian
Posts: 2

Rep: Reputation: 0
How to run Java/Tomcat on SLES 10.1: Hints appreciated


Hello,

I got offered a decent web hosting machine essentially for free which is preinstalled with SuSE Linux Enterprise 10.1. I have limited experience with SuSE but I regularly work with systems such as Debian, MacOS X and FreeBSD. I access the machine by ssh.

My goal is to set up a productive environment to run a Java based application called DSpace. I could install everything manually, compile myself and so on, but I want to use a package management to get easy access to future updates. That is what distros are good for from my perspective. I do not expect the latest version of everything but at least software that is still maintained by the publisher of the software.

I took the time to explore yast extensively but I found only three or four years old software. The worst was tomcat5 to be the latest package available which is not supported any more by the Apache Foundation. I found another package manager JPackage available through yast (version 1.6 - outdated, current is 1.7) which in turn uses yum.

SuSE installs the IBM JDK as a default which is incompatible with my software. SuSE offers SUN Java 1.4x which is really old but would be ok. As I had to search for other installation sources anyway, I found that they have have an AddOn CD but my provider did not know about that. I installed Java 5 from the corresponding OpenSuSE repository over the web. Then I had to deal with the alternatives system which is generally fine, but I was missing a canonical way how to figure out the master links to set. I just tried and reconfigured java and javac but I am not sure whether I am done with that now.

Tomcat55 is available through JPackage 1.6 but dependencies dont get resolved automatically. When trying to resolve them manually I got stuck with a missing jta package and I could not find any hint on that. I also tried to install mod_jk2 and apache2 and got stuck with that either. However I did not yet investigate that as thoroughly as the tomcat issues.

With these experiences in the back of my mind, I searched the web and various boards including this one to find useful instructions but I was not successful. Part of the problem is the inconsistent naming scheme that makes me wonder whether I should follow suggestions that were made on base of OpenSuSE. Any general hints and hints regarding the jta package specifically are appreciated.

Bye, Christian
 
Old 12-10-2007, 10:31 AM   #2
caddr
LQ Newbie
 
Registered: Nov 2006
Posts: 11

Rep: Reputation: 0
The alternatives for SLES is similar to the one on fedora. The difference I believe is that the application is called update-alternatives. This is a shell script that fixes the java paths for a jdk downloaded from SUN. I install the jdk in /usr/jdk so you'll need to change that to meet your needs. You can have several jdk's installed, you can use the alternatives --config java to pick which one to use.

#!/bin/bash

if test -f /proc/sys/fs/binfmt_misc/jarexec
then
echo '-1' > /proc/sys/fs/binfmt_misc/jarexec
fi
if test -f /proc/sys/fs/binfmt_misc/register
then
echo ':jarexec:M::PK\x03\x04::/usr/jdk/jre/lib/jexec:' \
> /proc/sys/fs/binfmt_misc/register
fi

/usr/sbin/alternatives \
--install /usr/bin/java java /usr/jdk/bin/java 17000 \
--slave /usr/lib/jvm/jre jre /usr/jdk/jre \
--slave /usr/lib/jvm-exports/jre jre_exports /usr/jdk/jre \
--slave /usr/bin/keytool keytool /usr/jdk/bin/keytool \
--slave /usr/bin/orbd orbd /usr/jdk/bin/orbd \
--slave /usr/bin/pack200 pack200 /usr/jdk/bin/pack200 \
--slave /usr/bin/policytool policytool /usr/jdk/bin/policytool \
--slave /usr/bin/rmid rmid /usr/jdk/bin/rmid \
--slave /usr/bin/rmiregistry rmiregistry /usr/jdk/bin/rmiregistry \
--slave /usr/bin/servertool servertool /usr/jdk/bin/servertool \
--slave /usr/bin/tnameserv tnameserv /usr/jdk/bin/tnameserv \
--slave /usr/bin/unpack200 unpack200 /usr/jdk/bin/unpack200 \
--slave /usr/share/man/man1/java.1 java.1 /usr/jdk/man/man1/java.1 \
--slave /usr/share/man/man1/keytool.1 keytool.1 /usr/jdk/man/man1/keytool.1 \
--slave /usr/share/man/man1/orbd.1 orbd.1 /usr/jdk/man/man1/orbd.1 \
--slave /usr/share/man/man1/pack200.1 pack200.1 /usr/jdk/man/man1/pack200.1 \
--slave /usr/share/man/man1/policytool.1 policytool.1 /usr/jdk/man/man1/policytool.1 \
--slave /usr/share/man/man1/rmid.1 rmid.1 /usr/jdk/man/man1/rmid.1 \
--slave /usr/share/man/man1/rmiregistry.1 rmiregistry.1 /usr/jdk/man/man1/rmiregistry.1 \
--slave /usr/share/man/man1/servertool.1 servertool.1 /usr/jdk/man/man1/servertool.1 \
--slave /usr/share/man/man1/tnameserv.1 tnameserv.1 /usr/jdk/man/man1/tnameserv.1 \
--slave /usr/share/man/man1/unpack200.1 unpack200.1 /usr/jdk/man/man1/unpack200.1

/usr/sbin/alternatives \
--install /usr/lib/mozilla/plugins/libjavaplugin.so libjavaplugin.so /usr/jdk/jre/plugin/i386/ns7/libjavaplugin_oji.so 17000
 
Old 12-10-2007, 10:52 AM   #3
cvoelker
LQ Newbie
 
Registered: Dec 2004
Location: Hamburg, Germany
Distribution: Debian
Posts: 2

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by caddr View Post
... I believe is that the application is called update-alternatives.
Hello and thanks. Yes, thats true, of course I used that tool to make my settings. Problem is that there is no such thing as a diagnostic option like "update-alternatives --display all" or "update-alternatives --display masters" or whatever one might find appropriate. You have to make an educated guess on what might fit.

If you go to the /etc/alternatives directory, you will find hundred links there or more and have to check each of them to make sure that they are set to the binary intended. But in my case they were not. The link for java-jdk-1.5.0 was still set to the ibm-java. I dont know whether this link is commonly used and will step into my way, but it was not possible to change him using update-alternatives. Probably this is no master link, but there is also no hint in the output to the master link to use. That makes me feel uncomfortable.

Bye, Christian
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
An application equivalent to MS ACCESS to run on SLES 9 or SUSE Linux Prof. 9.3 reycapoy Linux - Software 3 01-12-2006 01:54 AM
I can't run tomcat hus Programming 2 05-11-2005 11:48 AM
How do you run Tomcat as nobody? vous Linux - Software 11 03-24-2005 01:15 PM
Probelm running Java on SUSE SLES 8.0 usham Linux - Software 1 10-17-2004 05:23 AM
run java and tomcat varunbihani Linux - Software 2 09-17-2003 04:05 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > SUSE / openSUSE

All times are GMT -5. The time now is 05:10 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration