Linux - SoftwareThis 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
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
back to orignal question.
I am not sure if I need to have both Tomcat and Apache running together. You said there are 2 options:
1. Change Tomcat standalone to listen on port 80. This means your Apache server can't listen on that port.
2. Use Apache as your front-end to Tomcat.
I have 50/50 distribution of jsp pages and html pages. So I am not sure what is reasonable to do.
If I just decide to configure Tomcat to listen to port 80 I will have to stop Apache, right?
I fount several ways how to do it: http://linux.org.mt/article/tomcat-ports.
Peple say that to confiure Tomcat and Apache the most popular way of solving this problem.
But again what is better? There's got to be areason for it. Right?
looks like only this needs to be done:
iptables -t nat -A PREROUTING -p tcp --dport 80 -i eth0 -j REDIRECT --to-port 8080
If so how do I reconfigure it back to the original state where I am right now?
Will I have to do someithing like this:
iptables -t nat -A PREROUTING -p tcp --dport 80 -i eth0 -j REDIRECT --to-port 80
?
I have 50/50 distribution of jsp pages and html pages. So I am not sure what is reasonable to do.
That's a decision you'll have to make since it's your server and your content.
Quote:
If I just decide to configure Tomcat to listen to port 80 I will have to stop Apache, right?
Yep.
Quote:
I fount several ways how to do it: http://linux.org.mt/article/tomcat-ports.
Peple say that to confiure Tomcat and Apache the most popular way of solving this problem.
That article applies only if running Tomcat as root poses a security risk for you. TONS of people run Tomcat standalone on port 80, you'll have to determine if doing so will pose a risk to your particular site/server
Quote:
But again what is better? There's got to be areason for it. Right?
Betteris a subjective term and only you can answer that question. If you get mod_jk2 working, you can decide if you still want/need Apache as your front-end or not.
Once you get APXS installed (through httpd-devel), you should be able to get mod_jk2 installed and the rest should just plug in and work.
Quote:
looks like only this needs to be done:
iptables -t nat -A PREROUTING -p tcp --dport 80 -i eth0 -j REDIRECT --to-port 8080
If so how do I reconfigure it back to the original state where I am right now?
Will I have to do someithing like this:
iptables -t nat -A PREROUTING -p tcp --dport 80 -i eth0 -j REDIRECT --to-port 80
?
Unless you're comfortable with Linux firewalling and iptables, I would focus on getting mod_jk2 running.
I have httpd-devel-2.2.0-6.i386.rpm
Tried to install it and got this: Missing Dependency: httpd = 2.2.0-6 is needed by package httpd-devel
?
Ok, apparently you're not quite understanding the package naming conventions.
You can't just "randomly" pick packages to install, they must match the versions of related packages you have installed.
Above you posted this:
Quote:
I tried to install this package: httpd-2.2.0-5.1.2.i386.rpm and it says that it already exists
That means you already have httpd-2.2.0-5.1.2 for i386 already installed. Look for a httpd-devel-2.2.0-5.1.2 package, if one exists. The message you got above is saying you will need a newer Apache package to match the httpd-devel package you downloaded.
I swear, this package stuff drives me *crazy*! I tried it once on a FC2 system and quickly gave up due to some idiotic circular dependency problem (where package A needed package B which needed package A which neeeded package B....)
If there is a way you could simply post the list of httpd packages that are available for you, I could tell you which ones to install.
Hello,
I found this package: httpd-devel-2.2.0-5.1.2
when you say "httpd packages that are available". What do you mean by available?
Since I've got now httpd-devel-2.2.0-5.1.2 after successful installation I should have apxs, right?
this is what I needed and I remeber somebody mentioned that I need devel package to get apxs.
Hello,
I found this package: httpd-devel-2.2.0-5.1.2
when you say "httpd packages that are available". What do you mean by available?
By "available", I mean that you can download. You're downloading stuff and you're choosing what to download and the list you are making your choices from are what is "available".
[quote]Since I've got now httpd-devel-2.2.0-5.1.2 after successful installation I should have apxs, right?[/quopte]Yep.
Quote:
this is what I needed and I remeber somebody mentioned that I need devel package to get apxs.
I did.. above.
Get this installed, then build mod_jk2 and then we can proceed.
checking build system type... i686-pc-linux
checking host system type... i686-pc-linux
checking target system type... i686-pc-linux
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
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 style of include used by make... GNU
checking dependency style of gcc... none
checking for a sed that does not truncate output... /bin/sed
checking for egrep... grep -E
checking for ld used by gcc... /usr/bin/ld
checking if the linker (/usr/bin/ld) is GNU ld... yes
checking for /usr/bin/ld option to reload object files... -r
checking for BSD-compatible nm... /usr/bin/nm -B
checking whether ln -s works... yes
checking how to recognise dependent libraries... pass_all
checking how to run the C preprocessor... gcc -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking dlfcn.h usability... yes
checking dlfcn.h presence... yes
checking for dlfcn.h... yes
checking for g++... g++
checking whether we are using the GNU C++ compiler... yes
checking whether g++ accepts -g... yes
checking dependency style of g++... none
checking how to run the C++ preprocessor... g++ -E
checking for g77... no
checking for f77... no
checking for xlf... no
checking for frt... no
checking for pgf77... no
checking for fort77... no
checking for fl32... no
checking for af77... no
checking for f90... no
checking for xlf90... no
checking for pgf90... no
checking for epcf90... no
checking for f95... f95
checking whether we are using the GNU Fortran 77 compiler... yes
checking whether f95 accepts -g... yes
checking the maximum length of command line arguments... 32768
checking command to parse /usr/bin/nm -B output from gcc object... ok
checking for objdir... .libs
checking for ar... ar
checking for ranlib... ranlib
checking for strip... strip
checking if gcc static flag works... yes
checking if gcc supports -fno-rtti -fno-exceptions... no
checking for gcc option to produce PIC... -fPIC
checking if gcc PIC flag -fPIC works... yes
checking if gcc supports -c -o file.o... yes
checking whether the gcc linker (/usr/bin/ld) supports shared libraries... yes
checking whether -lc should be explicitly linked in... no
checking dynamic linker characteristics... GNU/Linux ld.so
checking how to hardcode library paths into programs... immediate
checking whether stripping libraries is possible... yes
checking for shl_load... no
checking for shl_load in -ldld... no
checking for dlopen... no
checking for dlopen in -ldl... yes
checking whether a program can dlopen itself... yes
checking whether a statically linked program can dlopen itself... yes
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... yes
checking whether to build static libraries... yes
configure: creating libtool
appending configuration tag "CXX" to libtool
checking for ld used by g++... /usr/bin/ld
checking if the linker (/usr/bin/ld) is GNU ld... yes
checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes
checking for g++ option to produce PIC... -fPIC
checking if g++ PIC flag -fPIC works... yes
checking if g++ supports -c -o file.o... yes
checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes
checking dynamic linker characteristics... GNU/Linux ld.so
checking how to hardcode library paths into programs... immediate
checking whether stripping libraries is possible... yes
checking for shl_load... (cached) no
checking for shl_load in -ldld... (cached) no
checking for dlopen... (cached) no
checking for dlopen in -ldl... (cached) yes
checking whether a program can dlopen itself... (cached) yes
checking whether a statically linked program can dlopen itself... (cached) yes
appending configuration tag "F77" to libtool
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... yes
checking whether to build static libraries... yes
checking for f95 option to produce PIC... -fPIC
checking if f95 PIC flag -fPIC works... yes
checking if f95 supports -c -o file.o... yes
checking whether the f95 linker (/usr/bin/ld) supports shared libraries... yes
checking dynamic linker characteristics... GNU/Linux ld.so
checking how to hardcode library paths into programs... immediate
checking whether stripping libraries is possible... yes
checking for test... /usr/bin/test
checking for rm... /bin/rm
checking for grep... /bin/grep
checking for echo... /bin/echo
checking for sed... /bin/sed
checking for cp... /bin/cp
checking for mkdir... /bin/mkdir
checking for uint32_t... yes
checking size of uint32_t... 4
checking for u_int32_t... yes
checking size of u_int32_t... 4
checking for unsigned long... yes
checking size of unsigned long... 4
checking for unsigned int... yes
checking size of unsigned int... 4
checking for unsigned long long... yes
checking size of unsigned long long... 8
checking for unsigned longlong... no
checking size of unsigned longlong... 0
checking for snprintf... yes
checking for vsnprintf... yes
checking for flock... yes
checking for setsockopt in -lsocket... no
checking whether to use SO_RCVTIMEO with setsockopt()... yes
checking whether to use SO_SNDTIMEO with setsockopt()... yes
no apxs given
checking for target platform... unix
no apache given
configure: error: Cannot find the WebServer
Good job on getting httpd-devel installed. Now, when you follow installation guides like that, you can't follow them "blindly". You have to make adjustments based on your particular system configuration.
So, we need to find where httpd-devel install apxs. Run this command and post the output:
$ su
# find / -name apxs
I suspect it will be in /usr/sbin but we'll let the find command tell us. Run the "find" command as root to eliminate the "permission denied" messages.
Once we know where apxs is located, you can specify THAT path in your configure command for mod_jk2:
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.