LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 01-28-2009, 11:51 AM   #1
Ashhere
LQ Newbie
 
Registered: Aug 2008
Posts: 25

Rep: Reputation: 15
apache tomcat installation


Hi,

Recently, I downloaded apache-tomcat-6.0.40.src file.

When I try to run the server,

[root@localhost ~]# $CATALINA_HOME/bin/startup.sh
bash: /bin/startup.sh: No such file or directory


Can anyone help me?
 
Old 01-28-2009, 01:44 PM   #2
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 11,792

Rep: Reputation: 1590Reputation: 1590Reputation: 1590Reputation: 1590Reputation: 1590Reputation: 1590Reputation: 1590Reputation: 1590Reputation: 1590Reputation: 1590Reputation: 1590
Quote:
Recently, I downloaded apache-tomcat-6.0.40.src file.
According to apache-tomcat, the latest version is 6.0.18. And why you downloaded the source and not the binary?
Anyway you can try to run it replacing $CATALINA_HOME with the full path to the directory you've extracted the archive you downloaded, e.g:
Code:
/path/to/apache-tomcat-VERSION/bin/startup.sh
 
Old 01-28-2009, 01:56 PM   #3
AuroraCA
Member
 
Registered: Jul 2008
Location: Northern CA USA
Distribution: Ubuntu, Slackware, Gentoo, Fedora, Red Hat, Puppy Linux
Posts: 370

Rep: Reputation: 35
What is the Linux distribution and release that you are using? There are several ways to install applications and programs depending upon the distribution you are using.
 
Old 01-30-2009, 11:19 PM   #4
Ashhere
LQ Newbie
 
Registered: Aug 2008
Posts: 25

Original Poster
Rep: Reputation: 15
Quote:
Anyway you can try to run it replacing $CATALINA_HOME with the full path to the directory you've extracted the archive you downloaded,
when i tried it,
[root@localhost ~]# /usr/bin/apache-tomcat-6.0.18-src/bin/startup.sh
bash: /usr/bin/apache-tomcat-6.0.18-src/bin/startup.sh: Permission denied

[though I hav logged in as root]

I am using redhat 5...

Last edited by Ashhere; 01-30-2009 at 11:46 PM.
 
Old 01-31-2009, 01:38 AM   #5
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 11,792

Rep: Reputation: 1590Reputation: 1590Reputation: 1590Reputation: 1590Reputation: 1590Reputation: 1590Reputation: 1590Reputation: 1590Reputation: 1590Reputation: 1590Reputation: 1590
Is startup.sh executable? You may run
Code:
chmod +x /usr/bin/apache-tomcat-6.0.18-src/bin/startup.sh
to make it executable and try again.
 
Old 01-31-2009, 02:24 AM   #6
Ashhere
LQ Newbie
 
Registered: Aug 2008
Posts: 25

Original Poster
Rep: Reputation: 15
Yeah thanks for that. But,


[root@localhost ~]# chmod +x /usr/bin/apache-tomcat-6.0.18-src/bin/startup.sh
[root@localhost ~]# /usr/bin/apache-tomcat-6.0.18-src/bin/startup.sh
Cannot find /usr/bin/apache-tomcat-6.0.18-src/bin/catalina.sh
This file is needed to run this program
 
Old 01-31-2009, 02:35 AM   #7
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 11,792

Rep: Reputation: 1590Reputation: 1590Reputation: 1590Reputation: 1590Reputation: 1590Reputation: 1590Reputation: 1590Reputation: 1590Reputation: 1590Reputation: 1590Reputation: 1590
All the scripts in the bin/ directory must be executable. So run:
Code:
chmod +x /usr/bin/apache-tomcat-6.0.18-src/bin/*.sh
to make them all executable.
 
Old 01-31-2009, 03:05 AM   #8
Ashhere
LQ Newbie
 
Registered: Aug 2008
Posts: 25

Original Poster
Rep: Reputation: 15
At the terminal,

[root@localhost ~]# chmod +x /usr/bin/apache-tomcat-6.0.18-src/bin/*.sh

[root@localhost ~]# /usr/bin/apache-tomcat-6.0.18-src/bin/startup.sh
Using CATALINA_BASE: /usr/bin/apache-tomcat-6.0.18-src
Using CATALINA_HOME: /usr/bin/apache-tomcat-6.0.18-src
Using CATALINA_TMPDIR: /usr/bin/apache-tomcat-6.0.18-src/temp
Using JRE_HOME: /usr/java/jdk1.6.0_11
touch: cannot touch `/usr/bin/apache-tomcat-6.0.18-src/logs/catalina.out': No such file or directory
/usr/bin/apache-tomcat-6.0.18-src/bin/catalina.sh: line 292: /usr/bin/apache-tomcat-6.0.18-src/logs/catalina.out: No such file or directory

so i tried with

[root@localhost ~]# chmod +x /usr/bin/apache-tomcat-6.0.18-src/logs/catalina.out

chmod: cannot access `/usr/bin/apache-tomcat-6.0.18-src/logs/catalina.out': No such file or directory
[root@localhost ~]#

 
Old 01-31-2009, 03:40 AM   #9
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 11,792

Rep: Reputation: 1590Reputation: 1590Reputation: 1590Reputation: 1590Reputation: 1590Reputation: 1590Reputation: 1590Reputation: 1590Reputation: 1590Reputation: 1590Reputation: 1590
Quote:
touch: cannot touch `/usr/bin/apache-tomcat-6.0.18-src/logs/catalina.out': No such file or directory
Does the directory /usr/bin/apache-tomcat-6.0.18-src/logs exists? If not you have to create it.
BTW you didn't answer why you use the source distribution and not the binary and AuroraCA's question regarding your distro. If you're using a distro like Fedora, Suse and others you may need to configure selinux to allow tomcat run.
 
Old 01-31-2009, 01:30 PM   #10
anomie
Senior Member
 
Registered: Nov 2004
Location: Texas
Distribution: RHEL, Scientific Linux, Debian, Fedora
Posts: 3,935
Blog Entries: 5

Rep: Reputation: Disabled
@Ashhere: I would also recommend that you pick up a book on Linux for beginners. A big part of the FOSS world (especially when compiling from source) is understanding basic error messages and correcting them. A good foundation will make your experience a lot more pleasant.
 
Old 02-01-2009, 06:20 AM   #11
Ashhere
LQ Newbie
 
Registered: Aug 2008
Posts: 25

Original Poster
Rep: Reputation: 15
Actually, I am fairly new to linux that I dont know the difference between source and binary files. I'd be thankful if you could it explain me. And also the probs with source files.

Quote:
I am using redhat 5...
Also, sorry for being so inexperienced....am trying to improve..if you could suggest me some good books just as a startup...

And thanks for the replies...

And now,
Quote:
Does the directory /usr/bin/apache-tomcat-6.0.18-src/logs exists? If not you have to create it.
I created one and then...

[root@localhost ~]# /usr/bin/apache-tomcat-6.0.18-src/bin/startup.shUsing CATALINA_BASE: /usr/bin/apache-tomcat-6.0.18-src
Using CATALINA_HOME: /usr/bin/apache-tomcat-6.0.18-src
Using CATALINA_TMPDIR: /usr/bin/apache-tomcat-6.0.18-src/temp
Using JRE_HOME: /usr/java/jdk1.6.0_11
[root@localhost ~]#

I guess the app is now installed properly...but I cannot get the homepage of apache when using http://localhost:8080/
 
Old 02-01-2009, 11:35 AM   #12
anomie
Senior Member
 
Registered: Nov 2004
Location: Texas
Distribution: RHEL, Scientific Linux, Debian, Fedora
Posts: 3,935
Blog Entries: 5

Rep: Reputation: Disabled
In general, a binary distribution is pre-compiled for your OS version and architecture. This is usually the easiest way to install an application. A source distribution requires that you (assuming you have installed all the tools needed for building the app) configure, compile, and then install it. This is usually the only way to set customized build-time options.

As for books, a really comprehensive (i.e. beginner all the way to advanced level) book to pick up is Linux Administration Handbook (2nd Edition) by Evi Nemeth, Garth Snyder, Trent R. Hein. It might be a little overwhelming to a new user, so I would supplement it with a true beginner-level book that focuses on your distro - whatever that may be.

Finally, give yourself some time and be patient. IMO, Tomcat is a bit of a beast to understand and configure properly (especially if you intend to front-end it with Apache web server and a connector).
 
Old 02-06-2009, 09:01 AM   #13
Ashhere
LQ Newbie
 
Registered: Aug 2008
Posts: 25

Original Poster
Rep: Reputation: 15
Thanks a lot anomie. U made it pretty clear to me about binary and source files.
Anyways have started from the beginning.

If you could suggest a solution to my problem too!! Actualy, I need to configure tomcat urgently and with my limited knowledge, I dont think I will be able to get to configuring web servers within this time.

Thanks again. Waiting for your reply.
 
Old 02-06-2009, 01:57 PM   #14
anomie
Senior Member
 
Registered: Nov 2004
Location: Texas
Distribution: RHEL, Scientific Linux, Debian, Fedora
Posts: 3,935
Blog Entries: 5

Rep: Reputation: Disabled
Maybe you should download the binary distribution instead: http://tomcat.apache.org/download-60.cgi

It's important to also take time to read the documentation: http://tomcat.apache.org/tomcat-6.0-doc/index.html

(And I wasn't joking about picking up a beginner Linux book. You need to get comfortable on the command line.)
 
Old 03-10-2009, 02:03 PM   #15
Ashhere
LQ Newbie
 
Registered: Aug 2008
Posts: 25

Original Poster
Rep: Reputation: 15
Thanks everyone.

The problem is solved. It was that my java version didnt match with that needed for tomcat.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
apache-tomcat and jakarta-tomcat shifter Programming 1 07-28-2007 10:36 PM
security holes in FC6 directly effecting a secure installation of apache tomcat jsbali Linux - Security 3 03-12-2007 04:26 PM
Tomcat - Apache Ant Installation crazycondor Debian 1 12-20-2006 05:37 AM
Apache Ant - Tomcat Installation crazycondor Linux - Newbie 1 12-16-2006 11:27 PM
Why use Apache with Tomcat rather than just Tomcat itself? davee Linux - Software 1 08-21-2003 09:47 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 02:20 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration