LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Tomcat 7.0 setup fails please help. (https://www.linuxquestions.org/questions/linux-newbie-8/tomcat-7-0-setup-fails-please-help-895754/)

sysmicuser 08-05-2011 11:30 AM

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

kirukan 08-06-2011 04:32 AM

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

sysmicuser 08-06-2011 10:10 AM

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?

kirukan 08-06-2011 10:57 AM

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


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