LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices

Reply
 
Search this Thread
Old 12-29-2004, 05:23 PM   #1
ssfrstlstnm
Member
 
Registered: Dec 2004
Location: IN, USA
Distribution: debian etch
Posts: 402

Rep: Reputation: 30
tomcat install BASEDIR not defined correctly


Bare with me, I'm new.

I am trying to install tomcat 5.5.4 with Mandrake 10.1 kernel 2.6.8.1.

When I try to run startup.sh, I get this:

The BASEDIR environment variable is not defined correctly
This environment variable is needed to run this program

I have installed Java SDK 1.5.0 which should be compatible with tomcat 5.5.4 right?

I set the required environment variables as follows:

export JAVA_HOME=/usr/java/jdk1.5.0_01
export CATALINA_HOME=/home/stephen/program_files/tomcat/bin/jakarta-tomcat-5.5.4

and set the path by adding the following to .bashrc in the root directory:

:/usr/java/jdk1.5.0_01:/usr/java/jdk1.5.0_01/bin:.

From looking at the shell scripts I am guessing that BASEDIR should be the same as CATALINA_HOME. I can find no mention of BASEDIR in the install directions.
 
Old 12-29-2004, 11:37 PM   #2
megaspaz
Senior Member
 
Registered: Nov 2002
Location: Silly Con Valley
Distribution: Red Hat 7.3, Red Hat 9.0
Posts: 2,054

Rep: Reputation: 46
i've only used tomcat 4.1.31, but i would imagine that CATALINA_HOME should be the same for the 2 versions. CATALINA_HOME should be set to your base install directory. for instance, /usr/local/tomcat, not /usr/local/tomcat/bin. JAVA_HOME looks right to me. you'll need to add to the PATH variable also the bin directories of java. You could also ad the bin directory of tomcat if you want... i don't do that though. you'll probably need to set up your classpath also. when i do this stuff, i always make the variables global to all users by putting it in /etc/profile. below is a copy of my /etc/profile file. you should be interested in the lines below "pathmunge /usr/X11R6/bin after" and above "unset pathmunge".

Code:
# /etc/profile

# System wide environment and startup programs, for login setup
# Functions and aliases go in /etc/bashrc

pathmunge () {
	if ! echo $PATH | /bin/egrep -q "(^|:)$1($|:)" ; then
	   if [ "$2" = "after" ] ; then
	      PATH=$PATH:$1
	   else
	      PATH=$1:$PATH
	   fi
	fi
}

# Path manipulation
if [ `id -u` = 0 ]; then
	pathmunge /sbin
	pathmunge /usr/sbin
	pathmunge /usr/local/sbin
fi

pathmunge /usr/X11R6/bin after

JAVA_HOME=/usr/java/j2sdk1.4.2_06
pathmunge $JAVA_HOME/bin after
export JAVA_HOME

ICC_HOME=/usr/local/intel/compiler70/ia32
pathmunge $ICC_HOME/bin after
export ICC_HOME

KOMODO_HOME=/usr/local/Komodo-2.5
pathmunge $KOMODO_HOME after
export KOMODO_HOME

ANT_HOME=/usr/local/apache-ant-1.6.2
pathmunge $ANT_HOME/bin after
export ANT_HOME

CATALINA_HOME=/usr/local/tomcat
export CATALINA_HOME

AXIS_HOME=/usr/local/axis
pathmunge $AXIS_HOME/bin after

AXIS_LIB=$AXIS_HOME/lib
pathmunge $AXIS_LIB after

AXISCLASSPATH=$AXIS_LIB/axis.jar:$AXIS_LIB/commons-discovery.jar:$AXIS_LIB/commons-logging.jar:$AXIS_LIB/jaxrpc.jar:$AXIS_LIB/saaj.jar:$AXIS_LIB/log


CLASSPATH=/usr/local/tomcat/bin:/usr/java/j2sdk1.4.2_06/lib:/usr/local/tomcat/common/lib:/usr/local/tomcat:$AXISCLASSPATH
export CLASSPATH

export AXIS_HOME
export AXIS_LIB
export AXISCLASSPATH

unset pathmunge

# No core files by default
ulimit -S -c 0 > /dev/null 2>&1

USER="`id -un`"
LOGNAME=$USER
MAIL="/var/spool/mail/$USER"

HOSTNAME=`/bin/hostname`
HISTSIZE=1000

if [ -z "$INPUTRC" -a ! -f "$HOME/.inputrc" ]; then
    INPUTRC=/etc/inputrc
fi

export PATH USER LOGNAME MAIL HOSTNAME HISTSIZE INPUTRC

for i in /etc/profile.d/*.sh ; do
    if [ -r "$i" ]; then
    	. $i
    fi
done

unset i

Last edited by megaspaz; 12-29-2004 at 11:38 PM.
 
Old 12-30-2004, 10:08 AM   #3
ssfrstlstnm
Member
 
Registered: Dec 2004
Location: IN, USA
Distribution: debian etch
Posts: 402

Original Poster
Rep: Reputation: 30
It's working now!!!

Looks like linux did not appreciate me trying to install tomcat in my home directory. I moved the files to /usr/local/tomcat and it is working now. Thanks!
 
Old 01-07-2005, 08:14 AM   #4
joker.iki.fi
LQ Newbie
 
Registered: Jan 2005
Posts: 1

Rep: Reputation: 0
Root cause

For me, this basedir issue usually has to do with the execute permissions in bin-directory being not properly set. If you encounter this issue, you chould try to
set the files in bin directory executable to you:

Code:
cd $CATALINA_HOME/bin
chmod u+x *
 
  


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
Error on install:GLIBC_2.0 not defined fordown Linux - Software 7 04-02-2009 05:28 AM
Error on install:GLIBC_2.0 not defined fordown Linux - Software 2 09-20-2004 12:42 AM
MySQL error: open basedir? Seventh Linux - Software 2 08-13-2004 04:20 PM
Did I install GD correctly? lexington Linux - Newbie 15 04-15-2004 11:06 AM
You have not defined root partition .. RH9 install error poison5151 Linux - Software 3 01-28-2004 07:05 PM


All times are GMT -5. The time now is 10:37 PM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration