Tomcat and RHEL5.3

lonetwin lonetwins at gmail.com
Thu Apr 16 06:32:41 UTC 2009


What does : java -v show ?

That will indicate if java has successfully installed or not. Personally i
did the following to make sure java v1.5.0_10 got installed for my
jboss+tomcat application :


If a old or unsupported version of java is already present then on the
hosting system,





First remove /var/lib/alternatives/java file by typing;
rm /var/lib/alternatives/java
When asked press the 'y' key,
Now to create the new (corrected) alternatives file for java type
the following commands as root (modify for jdk as needed);

/usr/sbin/alternatives --install /usr/bin/java java
/usr/lib/jvm/jre-1.4.2-gcj/bin/java 1

/usr/sbin/alternatives --install /usr/bin/java java
/usr/java/j2re1.5.0_06/bin/java 2

/usr/sbin/alternatives --config java

You should now see for example:

There are 2 programs which provide 'java'.

Selection Command
-----------------------------------------------
1 /usr/lib/jvm/jre-1.4.2-gcj/bin/java
*+ 2 /usr/java/j2re1.5.0_06/bin/java

Enter to keep the current selection[+], or type selection number:

Type: <choose 1 or 2>

In the example above java is already configured correctly [*+ 2] to
use Sun's Java, no changes are needed, just press the Enter key here.
If you have been following the instructions then you should have
the same results (version numbers may be sightly different).

Now type; /usr/sbin/alternatives --display java

You should see for example;

java - status is manual.
link currently points to /usr/java/j2re1.5.0_06/bin/java
/usr/lib/jvm/jre-1.4.2-gcj/bin/java - priority 1
/usr/java/j2re1.5.0_06/bin/java - priority 2
Current `best' version is /usr/java/j2re1.5.0_06/bin/java.

Next you might want to create (or edit) /etc/profile.d/java.sh
file, example below;

export JAVA_HOME="/usr/java/jre1.5.0_06/bin"
export JAVA_PATH="$JAVA_HOME"
export PATH="$PATH:$JAVA_HOME"

When done creating or editing the file type;

source /etc/profile.d/java.sh

Now any user root or other wise should be able to use the command;

which java

and the results should read something like;

/usr/java/jre1.5.0_06/bin/java

Also any user root or other wise should be able to use the command;

java -version

and the results should read something like;

java version "1.5.0_06"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_06-b05)
Java HotSpot(TM) Client VM (build 1.5.0_06-b05, mixed mode, sharing)



Hope this helps.

Cheers,

lonetwins


On Thu, Apr 16, 2009 at 2:07 AM, Virgilio Antonio Araujo <
vi.rlz4ever at gmail.com> wrote:

> Hello group.
>
> I need to install a tomcat server 6.0.18 at a RHEL 5.3 i386 server.
> A install the latest jdk jdk-6u13-linux-i586-rpm.bin and point JAVA_HOME to
> /usr/java/jdk1.6.0_13.
> When a try to start tomcat I see the follow errors at catalina.out and the
> tomcat dosent init.
> Above the erros:
> [root at localhost logs]# tail -f catalina.out
>        at org.apache.catalina.startup.Bootstrap.init(Bootstrap.java:215)
>        at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:390)
> java.lang.ClassNotFoundException: org.apache.catalina.startup.Catalina
>        at java.net.URLClassLoader$1.run(Unknown Source)
>        at java.security.AccessController.doPrivileged(Native Method)
>        at java.net.URLClassLoader.findClass(Unknown Source)
>        at java.lang.ClassLoader.loadClass(Unknown Source)
>        at java.lang.ClassLoader.loadClass(Unknown Source)
>        at org.apache.catalina.startup.Bootstrap.init(Bootstrap.java:215)
>        at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:390)
>
> Someone had sucess to install tomcat from source on RHEL5.3?
>
>
> Sorry for bad english.
>
> Att.
> --
> Virgilio Antonio Araujo
> -----------------------------
> RHCT
> LPIC 3
> Mandriva
> +55(11)8060-9745
> Nextel 55*86*20211 - 7881-2795
> --
> redhat-list mailing list
> unsubscribe mailto:redhat-list-request at redhat.com?subject=unsubscribe
> https://www.redhat.com/mailman/listinfo/redhat-list
>



More information about the redhat-list mailing list