Help needed to install Apache Tomcat
I want to setup apache tomcat on my linux distribution .
I Have downloaded apache tomcat from below mentioned link. Administration Web Application: http://tomcat.apache.org/download-55.cgi The setup was in following format. apache-tomcat-5.5.29-admin.tar.gz Below are the command i have used to install the software. I have copied the file to / directory Quote:
I m currently stuck at this step .What should be my next step. i had no trouble installing it on my windows box but since i m new to linux request you to help me install it. My linux distribution detail: Quote:
Quote:
|
After few searching here and there i came to know that i needed to install tomcat core setup first .
I have now installed core tomcat. Now whenever i run startup.sh .It says Quote:
How can i determine whether the java installed on my os or not. Output of java -version Quote:
|
I have somehow managed to run startup.sh
Quote:
|
I faced the same problem. Same as Pinga123....
But no one their to replay or direct any solution... Where is moderation... ? This site is still working. ? Hey Pinga123 !!! Let me find solution on other site...and if it work for me i post here... Linux is hard but not impossible. |
Guys,
Hang on !! Code:
Where is moderation... ? For experts from any particular field answer your query , you need to wait. |
@post #4
Quote:
Thus no amount of moderation forces ANY member of this site to respond to your little outbursts. And yes this site is still working 100%...if you look at the way pinga_123 tried to figure stuff out himself; this is what is promoted on LQ - try to figure stuff out yourself with members helping you out along the way. @pinga_123 The home page for Tomcat can be accessed at http://localhost:8080/ if you did the default install. Just out of curiousity, is there a reason that you're using such an old version of Tomcat (the latest is Tomcat 6)? Cheers Yas |
Quote:
I m going to Post my experience in installing TOMCAT on linux. Your comments are highly appreciated. OS : Oracle Enterprise Linux 5.2 32bit Step1: Install Tomcat, JDK, JRE We are going to install following softwares in the newly created machines. Make a folder named install in /. Copy all the required softwares in /install. Quote:
1)apache-tomcat-5.5.29.tar.gz: I have choosen linux version of tomcat. For Initial Setup You should always go for Core version download. downloaded apache-tomcat-5.5.29.tar.gz Code:
#gunzip apache-tomcat-5.5.29.tar.gz go to apache-tomcat-5.5.29/bin run Code:
#./startup.sh 2) jdk-6u20-linux-i586-rpm.bin: Next we will install latest jdk version. Code:
chmod +x jdk-6u20-linux-i586-rpm.bin Code:
/usr/java/jdk1.6.0_20/ 3) jre-6u20-linux-i586-rpm.bin Next we will install latest jre version. Code:
chmod +x jre-6u20-linux-i586-rpm.bin /usr/java/jre1.6.0_20/ use it for JRE_HOME. Step2:Configure java and TOMCAT # javac -version javac 1.6.0_20 # java -version java version "1.4.2" gij (GNU libgcj) version 4.1.2 20071124 (Red Hat 4.1.2-42) Copyright (C) 2006 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. ######At this time java is set to default java in linux our aim is to change it to latest java version. for setting up this you need root login therefore type Code:
#su Code:
#/usr/sbin/alternatives --install /usr/bin/java java /usr/java/jdk1.6.0_20/bin/java 2 Code:
#;/usr/sbin/alternatives --config java Now make sure you disable firewall . Code:
# system-config-securitylevel I have created a script called Tomcat and pasted following content inside it.(All credit goes to original script writer) Code:
# This is the init script for starting up the Edit the lines that start with tomcat and export to match Save the script with name “tomcat” to a location “/etc/init.d” (at least on most newer releases since /etc/init.d is a standard now). Then you have to allow execute access to the script, so run: Code:
chmod a+x tomcat The easy way to do this is to just simply run: Code:
chkconfig --add tomcat Add username/Password for tomcat manager: How to add a new user name to tomcat manager: just add line number 3 and 6 to /install/apache-tomcat-5.5.29/conf/tomcat-users.xml Quote:
By using service tomcat restart. If anybody faces any issue just PM me .I will try to help as soon as possible. Some additional Information:: To check whether the Tomcat is running or not.(Contributed by Alli yas). Code:
#netstat -ntpl | grep java Code:
# ps -ef | grep 6375 |
You can rather put it under one of your blog and refer the post whenever anyone faces issue setting up Apache and Tomcat.
Good work !! |
Excellent stuff pinga_123 :D
To add on to what you've done. If ever you want to debug whether Tomcat has started do the following: Code:
#netstat -ntpl Also, monitor $CATALINA_HOME/logs/catalina.out - this is a VERY useful file that will show any exceptions that are thrown if the app server fails to start. Feel free to PM me as well for Tomcat related issues:) |
hi
just wanted to add that also had problems with Tomcat & as a newbie didn't want to do to much configuation. The bigest problem was path, java_home etc; i think i'm right in saying that if you use apt-get your system configures these setting s for you At the end of this post is a link to how I did it. Also if your goingto get Tomcat I don't see the point in needig Apache since Tomcat serves html files just as easily as jsp files. http://www.linuxquestions.org/questi...needed-802179/ |
Quote:
Thus you need to either read the documentation for the rpm you have downloaded or query the rpm itself to try to determine where the different files will be placed. Another way of doing things (I'm not saying its right - its what I do to make my life easier :D) is to download and install applications manually via either tarballs (Tomcat), binary installs (java), source etcetera - its longer and a bit more difficult; but you can control where things are installed - and you won't have trouble with JAVA_HOME locations and so forth. Quote:
Further, remember that Tomcat is tightly coupled to the JVM, so if your Java fails for some reason; then your web server also fails - versus Apache which will continue running - this thus is also a consideration. |
Quote:
I tried as you said its work great . I m posting the result of my output. Code:
#netstat -ntpl | grep java |
alli yas
thanks for info so your are talking about ... tar xfv tarball ./configure make make install i have done that a couple of times with other more simple programmes but not tomcat. ok so you download tomcat source from jakarta or equivalnet source. i'm interested in an outline of the install sequence my path to ROOT (tomcat web root) is /var/lib/tomcat6/webapps/ROOT although once it ended up user/share/ so would you mkdir tomcat6 in /var/lib/ then untar inside tomcat6 or would that end up tomcat6/tomcat6 something along those lines.... |
Quote:
|
Tomcat script throwing errors
All,
I am trying to set up Tomcat v6 to run on a red hat server. I copied the "tomcat" script above in this thread, edited it, and am trying to run from the command as a first step. I get the following feedback: serverY#./tomcat start : command not found : No such file or directory.d/functions : command not found : command not found : command not found '/tomcat: line 23: syntax error near unexpected tokem '{ '/tomcat: line 22: 'start(){ Here are my changes to the tomcat script: # source function library . /etc/init.d/functions # get config . /etc/sysconfig/network-scripts ... tomcat=/usr/ .../apache-tomcat-6... ... export JAVA_HOME=/usr/java/jdk1.6.0_21 Can you give me some ideas on how to debug this script? Thank you. - Spuds |
Hi spuds99
Welcome to LQ :) Please take some time to read the rules an "How to ask questions the Smart way" - you'll find the links in my signature below. Note that "thread-jacking" is against the rules; thus even if a thread is similar to yours, please create a new thread with your questions/problem. @Mods - please move this to a new thread. Regarding your issue; simply copying the script is not going to get Tomcat working. Please provide details of how and where you've installed Tomcat. Also post the complete script and make use of Code tags to make it more readable. |
Make sure you have /usr/java/jdk1.6.0_20 directory and tomcat variable properly set (In my case it is /install/apache-tomcat-5.5.29
but it may differ in your case) . Make these changes in your script and then try to run it. It may not run if you copy paste it you may need to change these 2 parameter manually. |
All times are GMT -5. The time now is 06:17 AM. |