View Full Version : instalation of JAVA and Tomcat

19th November 2008, 06:42 PM
I have been going in cycles now for years with LINUX. I have been using Fedora on 64 AMD.

I want install Java (JDK and JRE). I actually went to SUN and downloaded the latest. I did not install Java and Tomcat from Fedora DVD (new installation). When I installed JDK and JRE; I could not find where its installed. When searching for the directory I got a lot of java directory's which is not good. jre-6u10-linux-x64.bin is what installed also the JDK same version.
javac is working now in compare to before installation. I continued to install Tomcat-Apache 6 from there web site and it was installed but when pointing to the localhost..Tomcat page dos not show up. localhost:8080 or I installed Tomcat 6 .. used Yum install tomcat6 and then service tomcat6 start. strangely when I try to stop .. it say it failed...

I simply want at the end of installing Java and Tomcat to develop JDBC on a Tomcat and so far I download the latest Fedora 9 64. I do get into a cycle of trying to get this server setup with above SW, but I end up with a broken server.
If any one in this Forum that is experience and can help me to complete this instalation. I will be glad to re-install and start fresh on Fed 5,8, or 9 to to get my web site up with JDBC.


20th November 2008, 02:24 AM
Tomcat can be installed from yum. Its a long list when using 'yum search tomcat'.

You can run 'rpm -qa | grep tomcat' to see which tomcat package was installed.

For the java part:

su -
alternatives --config java

If the new java is not on the list, then you need to do a 'locate java | grep bin' to find out which is the new java. Then run 'alternatives --install' for that new java.

Look at 'man alternatives'

21st November 2008, 03:59 PM
When I ran first command I got:


and when I ran the one for Java .. I got:

There are 2 programs which provide 'java'.

Selection Command
*+ 1 /usr/lib/jvm/jre-1.6.0-openjdk.x86_64/bin/java
2 /usr/lib/jvm/jre-1.5.0-gcj/bin/java

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

The strange thing seeing this that I did not install Tomcat5 or any Java with Fedora 9.
I only installed Tomcat6 and jdk-6u10/jre-6u10-linux-x64-rpm.bin

When I ran 'which java' I get:

which tomcat6

which tomcat5
/usr/bin/which: no tomcat5

the big question is why I have to struggle get this setup or find where its every time is different based on the mood of the release not a slandered which of course drive every one who dos not know this crazy.

And why Fedora did not provide there own latest package or Java/Tomcat a good document for proper installation ... just a thought maybe a guru have an satisfying answer here.