PDA

View Full Version : instalation of JAVA and Tomcat



Joseph_Reda
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 127.0.0.1:8080. 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.

Thanks,
Joseph

marcrblevins
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'
[/code]

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

tomcat6-servlet-2.5-api-6.0.18-1.1.fc9.noarch
tomcat5-server-lib-5.5.27-0jpp.2.fc9.x86_64
tomcat6-jsp-2.1-api-6.0.18-1.1.fc9.noarch
jakarta-commons-pool-tomcat5-1.3-10jpp.3.fc9.x86_64
tomcat5-servlet-2.4-api-5.5.27-0jpp.2.fc9.x86_64
tomcat5-jasper-5.5.27-0jpp.2.fc9.x86_64
tomcat-native-1.1.15-1.fc9.x86_64
jakarta-commons-dbcp-tomcat5-1.2.1-11jpp.3.fc9.x86_64
tomcat6-lib-6.0.18-1.1.fc9.noarch
tomcat5-common-lib-5.5.27-0jpp.2.fc9.x86_64
tomcat6-6.0.18-1.1.fc9.noarch
tomcat5-jsp-2.0-api-5.5.27-0jpp.2.fc9.x86_64
jakarta-commons-collections-tomcat5-3.2-2jpp.2.fc9.x86_64


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:
/usr/bin/java

which tomcat6
/usr/sbin/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.

Thanks
Joseph