LinuxQuestions.org
Register a domain and help support LQ
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 08-05-2011, 11:30 AM   #1
sysmicuser
Member
 
Registered: Mar 2010
Posts: 332

Rep: Reputation: 0
Question Tomcat 7.0 setup fails please help.


Hi Guys,

I am trying to install tomcat on my centos 5.6 box(vm) and it is giving me
failure for make operation.

[panther@localhost unix]$ make
(cd native; make all)
make[1]: Entering directory
`/home/panther/apache-tomcat-7.0.19/bin/commons-daemon-1.0.6-native-src/unix/native'
gcc -g -O2 -DOS_LINUX -DDSO_DLFCN -DCPU=\"i386\" -Wall -Wstrict-prototypes
-DHAVE_LIBCAP -I/usr/bin/java/include -I/usr/bin/java/include/linux -c
jsvc-unix.c -o jsvc-unix.o
cc1: error: /usr/bin/java/include: Not a directory
cc1: error: /usr/bin/java/include/linux: Not a directory
make[1]: *** [jsvc-unix.o] Error 1
make[1]: Leaving directory
`/home/panther/apache-tomcat-7.0.19/bin/commons-daemon-1.0.6-native-src/unix/native'
make: *** [native/all] Error 2

However ./configure is successful without any errors.


./configure
*** Current host ***
checking build system type... i686-pc-linux-gnu
checking host system type... i686-pc-linux-gnu
checking cached host system type... ok
*** C-Language compilation tools ***
checking for gcc... gcc
checking for C compiler default output file name... a.out
checking whether the C compiler works... yes
checking whether we are cross compiling... no
checking for suffix of executables...
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ANSI C... none needed
checking for ranlib... ranlib
checking for strip... strip
*** Host support ***
checking C flags dependant on host system type... ok
*** Java compilation tools ***
checking for sablevm... NONE
checking for kaffe... NONE
checking for javac... /usr/bin/javac
/usr/bin/javac
checking wether the Java compiler (/usr/bin/javac) works... yes
checking for jar... /usr/bin/jar
gcc flags added
checking for cap_init in -lcap... yes
*** Writing output files ***
configure: creating ./config.status
config.status: creating Makefile
config.status: creating Makedefs
config.status: creating native/Makefile
*** All done ***
Now you can issue "make"

Not sure what the heck the problem is

type and which java gives following result,
[panther@localhost unix]$ type java
java is /usr/bin/java
[panther@localhost unix]$ which java
/usr/bin/java

Following documentation located at,
http://tomcat.apache.org/tomcat-7.0-doc/setup.html


uname -a
Linux localhost.localdomain 2.6.18-194.el5 #1 SMP Fri Apr 2 14:58:35 EDT 2010
i686 i686 i386 GNU/Linux


Please assist.

Many thanks

Last edited by sysmicuser; 08-05-2011 at 11:32 AM.
 
Old 08-06-2011, 04:32 AM   #2
kirukan
Senior Member
 
Registered: Jun 2008
Location: Eelam
Distribution: Redhat, Solaris, Suse
Posts: 1,272

Rep: Reputation: 148Reputation: 148
Download java binary distribution and un-tar and save it on your preferred location.

Ex:-
#tar -xzf tomcat.version.tar.gz
#mv tomcat.version /usr/local/tomcat
Set the environment path
CATALINA_BASE=/usr/local/tomcat
CATALNA_HOME=/usr/local/tomcat
EXPORT PATH= CATALINA_BASE CATALINA_HOME
add the above lines on /etc/profile
 
Old 08-06-2011, 10:10 AM   #3
sysmicuser
Member
 
Registered: Mar 2010
Posts: 332

Original Poster
Rep: Reputation: 0
Question

Cooking,

Issue identified and resolved problem was path of java was incorrect , it needs JDK, now all ok.

However I'm now stuck with one more issue!!

./bin/jsvc -cp ./bin/bootstrap.jar:./bin/tomcat-juli.jar \

-outfile ./logs/catalina.out -errfile ./logs/catalina.err \
org.apache.catalina.startup.Bootstrap

[user01@localhost apache-tomcat-7.0.19]$ echo $?
0

But I cannot see whether it is running or not.

Have a look here,
[user01@localhost apache-tomcat-7.0.19]$ ps -aef |grep tomcat|grep -v grep
[user01@localhost apache-tomcat-7.0.19]$ ps -aef |grep jsvc|grep -v grep
[user01@localhost apache-tomcat-7.0.19]$

Cooking, so what is happening?

[user01@localhost apache-tomcat-7.0.19]$ jsvc --help
bash: jsvc: command not found

However I have my environment correctly,
[user01@localhost apache-tomcat-7.0.19]$ echo $CATALINA_HOME

/home/user01/apache-tomcat-7.0.19
[user01@localhost apache-tomcat-7.0.19]$ echo $JAVA_HOME
/usr/java/jdk1.7.0/
[user01@localhost apache-tomcat-7.0.19]$


what exactly is the issue?
 
Old 08-06-2011, 10:57 AM   #4
kirukan
Senior Member
 
Registered: Jun 2008
Location: Eelam
Distribution: Redhat, Solaris, Suse
Posts: 1,272

Rep: Reputation: 148Reputation: 148
Place the jsvc on tomcat_home/bin and tomcat_home/bin/commons-daemon-1.0.5-native-src/unix/samples there is start-up script for tomcat place the start-up script on /etc/init.d then start the tomcat as usual

To check the service
ps ax | grep java
 
  


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
How to finalize apache tomcat setup eliassal Linux - Server 2 11-17-2010 02:03 PM
Tomcat VirtualHost Setup Issue.. your_shadow03 Linux - Newbie 3 11-24-2009 03:46 AM
Tomcat setup problem prasunhowlader Linux - Software 1 05-29-2008 09:38 AM
[SOLVED] Need to setup a subdomain in Tomcat 5.5.9 CentOS 4.2 thedonkdonk Linux - General 2 09-27-2006 10:41 AM
tomcat- apache setup question doublefailure Linux - Software 0 08-09-2002 11:19 PM


All times are GMT -5. The time now is 04:12 PM.

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