本地Apche httpd2.4.6(http://pan.baidu.com/share/link?shareid=4003375081&uk=34256769)和Tomcat7.0.42是如何安装的,请参考前面的文章。

下面是具体整合的步骤。

首先需要得到mod_jk.so,它是apache到tomcat的连接器。

首先,将tomcat-connectors-1.2.37-src.tar.gz解压,可以到( http://pan.baidu.com/share/link?shareid=3998581769&uk=34256769 )下载。

#tar xvzf tomcat-connectors-1.2.37-src.tar.gz

之后得到tomcat-connectors-1.2.37-src目录,进入其中native目录,执行

[root@bogon native]# ./configure -with-apxs=/usr/local/apache2/bin/apxs

checking build system type... i686-pc-linux-gnu
checking host system type... i686-pc-linux-gnu
checking target system type... i686-pc-linux-gnu
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 test... /usr/bin/test
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
need to check for Perl first, apxs depends on it...
checking for perl... /usr/bin/perl
APRINCLUDEDIR is  -I/usr/local/apr/include/apr-1 -I/usr/local/apr/include/apr-1
building connector for "apache-2.0"
checking for gcc... gcc -std=gnu99
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 -std=gnu99 accepts -g... yes
checking for gcc -std=gnu99 option to accept ANSI C... none needed
checking for style of include used by make... GNU
checking dependency style of gcc -std=gnu99... none
checking for a sed that does not truncate output... /bin/sed
checking for egrep... grep -E
checking for ld used by gcc -std=gnu99... /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 -std=gnu99 -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 -std=gnu99 object... ok
checking for objdir... .libs
checking for ar... ar
checking for ranlib... ranlib
checking for strip... strip
checking if gcc -std=gnu99 static flag  works... yes
checking if gcc -std=gnu99 supports -fno-rtti -fno-exceptions... no
checking for gcc -std=gnu99 option to produce PIC... -fPIC
checking if gcc -std=gnu99 PIC flag -fPIC works... yes
checking if gcc -std=gnu99 supports -c -o file.o... yes
checking whether the gcc -std=gnu99 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
LIBTOOL="/usr/local/apr/build-1/libtool --silent"
checking for char... yes
checking size of char... 1
checking for int... yes
checking size of int... 4
checking for long... yes
checking size of long... 4
checking for short... yes
checking size of short... 2
checking for long double... yes
checking size of long double... 12
checking for long long... yes
checking size of long long... 8
checking for longlong... no
checking size of longlong... 0
checking size of pid_t... 4
checking size of pthread_t... 4
checking for snprintf... yes
checking for vsnprintf... yes
checking for flock... yes
checking for setsockopt in -lsocket... no
checking sys/filio.h usability... no
checking sys/filio.h presence... no
checking for sys/filio.h... no
checking whether to use SO_RCVTIMEO with setsockopt()... yes
checking whether to use SO_SNDTIMEO with setsockopt()... yes
checking whether to use SOCK_CLOEXEC with socket()... no
checking poll.h usability... yes
checking poll.h presence... yes
checking for poll.h... yes
checking for poll... yes
checking for target platform... unix
no apache given
no netscape given
configure: creating ./config.status
config.status: creating Makefile
config.status: creating apache-1.3/Makefile
config.status: creating apache-1.3/Makefile.apxs
config.status: creating apache-2.0/Makefile
config.status: creating apache-2.0/Makefile.apxs
config.status: creating common/Makefile
config.status: creating common/list.mk
config.status: creating common/jk_types.h
config.status: creating common/config.h
config.status: executing depfiles commands

注意上面粗体部分是指向本机Apche的bin中的apxs文件的,这个参数要根据各人机器实际配置调整,不可盲目照搬。

接下来。再执行make

[root@bogon native]# make
Making all in common
make[1]: Entering directory `/home/hy/tomcat-connectors-1.2.37-src/native/common'
/usr/local/apr/build-1/libtool --silent --mode=compile gcc -std=gnu99 -I/usr/local/apache2/include  -DHAVE_CONFIG_H -g -O2 -pthread -DHAVE_APR  -I/usr/local/apr/include/apr-1 -I/usr/local/apr/include/apr-1  -DHAVE_CONFIG_H -DLINUX=2 -D_REENTRANT -D_GNU_SOURCE -D_LARGEFILE64_SOURCE -c jk_ajp12_worker.c -o jk_ajp12_worker.lo
/usr/local/apr/build-1/libtool --silent --mode=compile gcc -std=gnu99 -I/usr/local/apache2/include  -DHAVE_CONFIG_H -g -O2 -pthread -DHAVE_APR  -I/usr/local/apr/include/apr-1 -I/usr/local/apr/include/apr-1  -DHAVE_CONFIG_H -DLINUX=2 -D_REENTRANT -D_GNU_SOURCE -D_LARGEFILE64_SOURCE -c jk_connect.c -o jk_connect.lo
/usr/local/apr/build-1/libtool --silent --mode=compile gcc -std=gnu99 -I/usr/local/apache2/include  -DHAVE_CONFIG_H -g -O2 -pthread -DHAVE_APR  -I/usr/local/apr/include/apr-1 -I/usr/local/apr/include/apr-1  -DHAVE_CONFIG_H -DLINUX=2 -D_REENTRANT -D_GNU_SOURCE -D_LARGEFILE64_SOURCE -c jk_msg_buff.c -o jk_msg_buff.lo
/usr/local/apr/build-1/libtool --silent --mode=compile gcc -std=gnu99 -I/usr/local/apache2/include  -DHAVE_CONFIG_H -g -O2 -pthread -DHAVE_APR  -I/usr/local/apr/include/apr-1 -I/usr/local/apr/include/apr-1  -DHAVE_CONFIG_H -DLINUX=2 -D_REENTRANT -D_GNU_SOURCE -D_LARGEFILE64_SOURCE -c jk_util.c -o jk_util.lo
/usr/local/apr/build-1/libtool --silent --mode=compile gcc -std=gnu99 -I/usr/local/apache2/include  -DHAVE_CONFIG_H -g -O2 -pthread -DHAVE_APR  -I/usr/local/apr/include/apr-1 -I/usr/local/apr/include/apr-1  -DHAVE_CONFIG_H -DLINUX=2 -D_REENTRANT -D_GNU_SOURCE -D_LARGEFILE64_SOURCE -c jk_ajp13.c -o jk_ajp13.lo
/usr/local/apr/build-1/libtool --silent --mode=compile gcc -std=gnu99 -I/usr/local/apache2/include  -DHAVE_CONFIG_H -g -O2 -pthread -DHAVE_APR  -I/usr/local/apr/include/apr-1 -I/usr/local/apr/include/apr-1  -DHAVE_CONFIG_H -DLINUX=2 -D_REENTRANT -D_GNU_SOURCE -D_LARGEFILE64_SOURCE -c jk_pool.c -o jk_pool.lo
/usr/local/apr/build-1/libtool --silent --mode=compile gcc -std=gnu99 -I/usr/local/apache2/include  -DHAVE_CONFIG_H -g -O2 -pthread -DHAVE_APR  -I/usr/local/apr/include/apr-1 -I/usr/local/apr/include/apr-1  -DHAVE_CONFIG_H -DLINUX=2 -D_REENTRANT -D_GNU_SOURCE -D_LARGEFILE64_SOURCE -c jk_worker.c -o jk_worker.lo
/usr/local/apr/build-1/libtool --silent --mode=compile gcc -std=gnu99 -I/usr/local/apache2/include  -DHAVE_CONFIG_H -g -O2 -pthread -DHAVE_APR  -I/usr/local/apr/include/apr-1 -I/usr/local/apr/include/apr-1  -DHAVE_CONFIG_H -DLINUX=2 -D_REENTRANT -D_GNU_SOURCE -D_LARGEFILE64_SOURCE -c jk_ajp13_worker.c -o jk_ajp13_worker.lo
/usr/local/apr/build-1/libtool --silent --mode=compile gcc -std=gnu99 -I/usr/local/apache2/include  -DHAVE_CONFIG_H -g -O2 -pthread -DHAVE_APR  -I/usr/local/apr/include/apr-1 -I/usr/local/apr/include/apr-1  -DHAVE_CONFIG_H -DLINUX=2 -D_REENTRANT -D_GNU_SOURCE -D_LARGEFILE64_SOURCE -c jk_lb_worker.c -o jk_lb_worker.lo
/usr/local/apr/build-1/libtool --silent --mode=compile gcc -std=gnu99 -I/usr/local/apache2/include  -DHAVE_CONFIG_H -g -O2 -pthread -DHAVE_APR  -I/usr/local/apr/include/apr-1 -I/usr/local/apr/include/apr-1  -DHAVE_CONFIG_H -DLINUX=2 -D_REENTRANT -D_GNU_SOURCE -D_LARGEFILE64_SOURCE -c jk_sockbuf.c -o jk_sockbuf.lo
/usr/local/apr/build-1/libtool --silent --mode=compile gcc -std=gnu99 -I/usr/local/apache2/include  -DHAVE_CONFIG_H -g -O2 -pthread -DHAVE_APR  -I/usr/local/apr/include/apr-1 -I/usr/local/apr/include/apr-1  -DHAVE_CONFIG_H -DLINUX=2 -D_REENTRANT -D_GNU_SOURCE -D_LARGEFILE64_SOURCE -c jk_map.c -o jk_map.lo
/usr/local/apr/build-1/libtool --silent --mode=compile gcc -std=gnu99 -I/usr/local/apache2/include  -DHAVE_CONFIG_H -g -O2 -pthread -DHAVE_APR  -I/usr/local/apr/include/apr-1 -I/usr/local/apr/include/apr-1  -DHAVE_CONFIG_H -DLINUX=2 -D_REENTRANT -D_GNU_SOURCE -D_LARGEFILE64_SOURCE -c jk_uri_worker_map.c -o jk_uri_worker_map.lo
/usr/local/apr/build-1/libtool --silent --mode=compile gcc -std=gnu99 -I/usr/local/apache2/include  -DHAVE_CONFIG_H -g -O2 -pthread -DHAVE_APR  -I/usr/local/apr/include/apr-1 -I/usr/local/apr/include/apr-1  -DHAVE_CONFIG_H -DLINUX=2 -D_REENTRANT -D_GNU_SOURCE -D_LARGEFILE64_SOURCE -c jk_ajp14.c -o jk_ajp14.lo
/usr/local/apr/build-1/libtool --silent --mode=compile gcc -std=gnu99 -I/usr/local/apache2/include  -DHAVE_CONFIG_H -g -O2 -pthread -DHAVE_APR  -I/usr/local/apr/include/apr-1 -I/usr/local/apr/include/apr-1  -DHAVE_CONFIG_H -DLINUX=2 -D_REENTRANT -D_GNU_SOURCE -D_LARGEFILE64_SOURCE -c jk_ajp14_worker.c -o jk_ajp14_worker.lo
/usr/local/apr/build-1/libtool --silent --mode=compile gcc -std=gnu99 -I/usr/local/apache2/include  -DHAVE_CONFIG_H -g -O2 -pthread -DHAVE_APR  -I/usr/local/apr/include/apr-1 -I/usr/local/apr/include/apr-1  -DHAVE_CONFIG_H -DLINUX=2 -D_REENTRANT -D_GNU_SOURCE -D_LARGEFILE64_SOURCE -c jk_md5.c -o jk_md5.lo
/usr/local/apr/build-1/libtool --silent --mode=compile gcc -std=gnu99 -I/usr/local/apache2/include  -DHAVE_CONFIG_H -g -O2 -pthread -DHAVE_APR  -I/usr/local/apr/include/apr-1 -I/usr/local/apr/include/apr-1  -DHAVE_CONFIG_H -DLINUX=2 -D_REENTRANT -D_GNU_SOURCE -D_LARGEFILE64_SOURCE -c jk_shm.c -o jk_shm.lo
/usr/local/apr/build-1/libtool --silent --mode=compile gcc -std=gnu99 -I/usr/local/apache2/include  -DHAVE_CONFIG_H -g -O2 -pthread -DHAVE_APR  -I/usr/local/apr/include/apr-1 -I/usr/local/apr/include/apr-1  -DHAVE_CONFIG_H -DLINUX=2 -D_REENTRANT -D_GNU_SOURCE -D_LARGEFILE64_SOURCE -c jk_ajp_common.c -o jk_ajp_common.lo
/usr/local/apr/build-1/libtool --silent --mode=compile gcc -std=gnu99 -I/usr/local/apache2/include  -DHAVE_CONFIG_H -g -O2 -pthread -DHAVE_APR  -I/usr/local/apr/include/apr-1 -I/usr/local/apr/include/apr-1  -DHAVE_CONFIG_H -DLINUX=2 -D_REENTRANT -D_GNU_SOURCE -D_LARGEFILE64_SOURCE -c jk_context.c -o jk_context.lo
/usr/local/apr/build-1/libtool --silent --mode=compile gcc -std=gnu99 -I/usr/local/apache2/include  -DHAVE_CONFIG_H -g -O2 -pthread -DHAVE_APR  -I/usr/local/apr/include/apr-1 -I/usr/local/apr/include/apr-1  -DHAVE_CONFIG_H -DLINUX=2 -D_REENTRANT -D_GNU_SOURCE -D_LARGEFILE64_SOURCE -c jk_url.c -o jk_url.lo
/usr/local/apr/build-1/libtool --silent --mode=compile gcc -std=gnu99 -I/usr/local/apache2/include  -DHAVE_CONFIG_H -g -O2 -pthread -DHAVE_APR  -I/usr/local/apr/include/apr-1 -I/usr/local/apr/include/apr-1  -DHAVE_CONFIG_H -DLINUX=2 -D_REENTRANT -D_GNU_SOURCE -D_LARGEFILE64_SOURCE -c jk_status.c -o jk_status.lo
make[1]: Leaving directory `/home/hy/tomcat-connectors-1.2.37-src/native/common'
Making all in apache-2.0
make[1]: Entering directory `/home/hy/tomcat-connectors-1.2.37-src/native/apache-2.0'
/usr/local/apr/build-1/libtool --silent --mode=compile gcc -std=gnu99 -I/usr/local/apache2/include  -DHAVE_CONFIG_H -DUSE_APACHE_MD5 -I ../common -DLINUX=2 -D_REENTRANT -D_GNU_SOURCE -D_LARGEFILE64_SOURCE -g -O2 -pthread -DHAVE_APR  -I/usr/local/apr/include/apr-1 -I/usr/local/apr/include/apr-1  -DHAVE_CONFIG_H -g -O2 -pthread -DLINUX=2 -D_REENTRANT -D_GNU_SOURCE -D_LARGEFILE64_SOURCE -c mod_jk.c -o mod_jk.lo
/usr/local/apr/build-1/libtool --silent --mode=link gcc -std=gnu99 -I/usr/local/apache2/include  -DHAVE_CONFIG_H -DUSE_APACHE_MD5 -I ../common -DLINUX=2 -D_REENTRANT -D_GNU_SOURCE -D_LARGEFILE64_SOURCE -g -O2 -pthread -DHAVE_APR  -I/usr/local/apr/include/apr-1 -I/usr/local/apr/include/apr-1  -DHAVE_CONFIG_H -g -O2 -pthread -DLINUX=2 -D_REENTRANT -D_GNU_SOURCE -D_LARGEFILE64_SOURCE  -o mod_jk.la -module -rpath /usr/local/apache2/modules -avoid-version mod_jk.lo ../common/jk_ajp12_worker.lo ../common/jk_connect.lo ../common/jk_msg_buff.lo ../common/jk_util.lo ../common/jk_ajp13.lo ../common/jk_pool.lo ../common/jk_worker.lo ../common/jk_ajp13_worker.lo ../common/jk_lb_worker.lo ../common/jk_sockbuf.lo ../common/jk_map.lo ../common/jk_uri_worker_map.lo ../common/jk_ajp14.lo ../common/jk_ajp14_worker.lo ../common/jk_md5.lo ../common/jk_shm.lo ../common/jk_ajp_common.lo ../common/jk_context.lo ../common/jk_url.lo ../common/jk_status.lo
../scripts/build/instdso.sh SH_LIBTOOL='/usr/local/apr/build-1/libtool --silent' mod_jk.la `pwd`
/usr/local/apr/build-1/libtool --silent --mode=install cp mod_jk.la /home/hy/tomcat-connectors-1.2.37-src/native/apache-2.0/
libtool: install: warning: remember to run `libtool --finish /usr/local/apache2/modules'
make[1]: Leaving directory `/home/hy/tomcat-connectors-1.2.37-src/native/apache-2.0'
make[1]: Entering directory `/home/hy/tomcat-connectors-1.2.37-src/native'
make[1]: Nothing to be done for `all-am'.
make[1]: Leaving directory `/home/hy/tomcat-connectors-1.2.37-src/native'
target="all"; \
        list='common apache-2.0'; \
        for i in $list; do \
            echo "Making $target in $i"; \
            if test "$i" != "."; then \
               (cd $i && make $target) || exit 1; \
            fi; \
        done;
Making all in common
make[1]: Entering directory `/home/hy/tomcat-connectors-1.2.37-src/native/common'
make[1]: Nothing to be done for `all'.
make[1]: Leaving directory `/home/hy/tomcat-connectors-1.2.37-src/native/common'
Making all in apache-2.0
make[1]: Entering directory `/home/hy/tomcat-connectors-1.2.37-src/native/apache-2.0'
make[1]: Nothing to be done for `all'.
make[1]: Leaving directory `/home/hy/tomcat-connectors-1.2.37-src/native/apache-2.0'

完成以后,进入apache-2.0目录,就能发现我们需要的目标文件

[root@bogon native]# cd apache-2.0/
[root@bogon apache-2.0]# ls
bldjk54.qclsrc  Makefile.apxs     mod_jk.a    mod_jk.lo
bldjk.qclsrc    Makefile.apxs.in  mod_jk.c    mod_jk.o
config.m4       Makefile.in       mod_jk.dsp  mod_jk.so
Makefile        Makefile.vc       mod_jk.la   NWGNUmakefile

这个文件就是Apache和Tomcat的连接器,我们需要把它拷贝到apache的modules目录去。

[root@bogon apache-2.0]# cp mod_jk.so /usr/local/apache2/modules/
cp: overwrite `/usr/local/apache2/modules/mod_jk.so'? y

上面覆写的原因是原有一个不正确的mod_jk.so,这次用生成的文件覆盖掉。如果原来没有则直接拷贝不会有输出。

再接下里,要修改apache的conf文件了。

打开/usr/local/apache2/conf/httpd.conf,在末尾增加这样一段:

...

LoadModule jk_module modules/mod_jk.so
JkWorkersFile conf/workers.properties
JkLogFile logs/mod_jk.log
JkLogLevel debug
JkMount /*.jsp worker1

保存退出后,在同一目录下新增文件workers.properties,其内容如下:

worker.list=worker1
worker.worker1.port=8009
worker.worker1.host=localhost
worker.worker1.type=ajp13
worker.worker1.lbfactor=1

之后执行拷贝文件,之所以要这样做是因为将/usr/local/httpd/conf/httpd.conf和/usr/local/apache2/conf/httpd.conf保持一致。

[root@bogon conf]# cp  httpd.conf  /usr/local/httpd/conf/
cp: overwrite `/usr/local/httpd/conf/httpd.conf'? y

到这里,配置工作就完成了,我们需要重启httpd服务和启动Tomcat

重启httpd

[root@bogon conf]# service httpd stop
AH00557: httpd: apr_sockaddr_info_get() failed for bogon
AH00558: httpd: Could not reliably determine the server's fully qualified domain name, using 127.0.0.1. Set the 'ServerName' directive globally to suppress this message
[root@bogon conf]# service httpd start
AH00557: httpd: apr_sockaddr_info_get() failed for bogon
AH00558: httpd: Could not reliably determine the server's fully qualified domain name, using 127.0.0.1. Set the 'ServerName' directive globally to suppress this message

启动Tomcat

[root@bogon apache-2.0]# cd /usr/local/tomcat7.0.42/
[root@bogon tomcat7.0.42]# ls
bin   lib      logs    RELEASE-NOTES  temp     work
conf  LICENSE  NOTICE  RUNNING.txt    webapps
[root@bogon tomcat7.0.42]# cd bin
[root@bogon bin]# ls
bootstrap.jar                 cpappend.bat      startup.bat
catalina.bat                  daemon.sh         startup.sh
catalina.sh                   digest.bat        tomcat-juli.jar
catalina-tasks.xml            digest.sh         tomcat-native.tar.gz
commons-daemon.jar            setclasspath.bat  tool-wrapper.bat
commons-daemon-native.tar.gz  setclasspath.sh   tool-wrapper.sh
configtest.bat                shutdown.bat      version.bat
configtest.sh                 shutdown.sh       version.sh
[root@bogon bin]# ./startup.sh
Using CATALINA_BASE:   /usr/local/tomcat7.0.42
Using CATALINA_HOME:   /usr/local/tomcat7.0.42
Using CATALINA_TMPDIR: /usr/local/tomcat7.0.42/temp
Using JRE_HOME:        /usr/java/jdk1.7.0_25
Using CLASSPATH:       /usr/local/tomcat7.0.42/bin/bootstrap.jar:/usr/local/tomcat7.0.42/bin/tomcat-juli.jar
[root@bogon bin]#

最后来检验一下,首先看Tomcat自带的网页,网址是:http://192.168.0.104:8080/examples/jsp/jsp2/el/basic-arithmetic.jsp

再让我们访问80端口看看,网址是:http://192.168.0.104/examples/jsp/jsp2/el/basic-arithmetic.jsp

两个URL中,端口一个是8080,一个是80,但结果是一致的,这说明Apache到Tomcat的连接完全成功了。

<全文完,有问题请指出,谢谢!>

在Foreda8中整合Apche httpd2.4.6和Tomcat7.0.42(使用tomcat-connectors-1.2.37)的更多相关文章

  1. Web开发中运行环境的配置:(Tomcat7.0.59)和开发环境的配置

    第一部分:运行环境的配置 1.下载压缩包,解压即可 2.配置系统变量JAVA_HOME为jdk的安装路径 3.如有需要修改端口号,比如8080已被占用的时候,可以将其改为9080等 apache-to ...

  2. 源码安装ipython,并在ipython中整合spark

    一.安装ipython 下载ipython, https://pypi.python.org/packages/source/i/ipython/ipython-2.2.0.tar.gz#md5=b9 ...

  3. ASP.NET MVC3 中整合 NHibernate3.3、Spring.NET2.0 时 Session 关闭问题

    一.问题描述 在向ASP.NET MVC中整合NHibernate.Spring.NET后,如下管理员与角色关系: 类public class Admin { public virtual strin ...

  4. 在OneThink(ThinkPHP3.2.3)中整合阿里云OSS的PHP-SDK2.0.4,实现Web端直传,服务端签名直传并设置上传回调的实现流程

    在OneThink(ThinkPHP3.2.3)中整合阿里云OSS的PHP-SDK2.0.4,实现本地文件上传流程 by shuijingwan · 2016/01/13 1.SDK安装 github ...

  5. 在DWZ框架中整合kindeditor复文本框控件

    今天上午在DWZ框架中整合kindeditor复文本框控件,发现上传图片是老是提示 “上传中,请稍候...”,上网查看别人说可能是文件路径问题,在想以前在其他项目中用这个控件一直没问题,到这里怎么会出 ...

  6. SpringMVC 中整合之JSON、XML

    每次看到好的博客我就想好好的整理起来,便于后面自己复习,同时也共享给网络上的伙伴们! 博客地址: springMVC整合Jaxb2.xStream:  http://www.cnblogs.com/h ...

  7. Spring框架中整合JUnit单元测试的方法

    一. 步骤: 1. 拷贝jar包: 1. JUnit-4.9.jar和spring-test-4.2.4.RELEASE.jar ; 2. 替换原来的main函数: 1. 在测试类上使用注解方式替换: ...

  8. C#开发微信门户及应用(48) - 在微信框架中整合CacheManager 缓存框架

    在我们的很多框架或者项目应用中,缓存在一定程度上可以提高程序的响应速度,以及减轻服务器的承载压力,因此在一些地方我们都考虑引入缓存模块,这篇随笔介绍使用开源缓存框架CacheManager来实现数据的 ...

  9. 玩转spring mvc(四)---在spring MVC中整合JPA

    关于在Spring MVC中整合JPA是在我的上一篇关于spring mvc基本配置基础上进行的,所以大家先参考一下我的上一篇文章:http://blog.csdn.net/u012116457/ar ...

随机推荐

  1. Codeforces Round #248 (Div. 1) A. Ryouko's Memory Note 水题

    A. Ryouko's Memory Note 题目连接: http://www.codeforces.com/contest/434/problem/A Description Ryouko is ...

  2. OpenVPN原理及实践文章收集(转)

    一.基本理论篇 vpn原理及实现--一般理论 vpn原理及实现--隧道的一种实现 vpn原理及实现--虚拟网卡构建vpn vpn原理及实现--tcp还是udp Linux平台VPN技术概论 Linux ...

  3. run commands in linux shell using batch file

    adb shell as root after device rooted once device rooted, we must perform "su" before we g ...

  4. 74HC125 74HCT125 74LV125 74LVC125

    74HC125; 74HCT125Quad buffer/line driver; 3-state The 74HC125; 74HCT125 is a quad buffer/line driver ...

  5. jquery获取单选button选中的值

    在页面上单选button的代码: <s:iterator value="@com.hljw.cmeav.util.CmeavGlobal@isComMap"> < ...

  6. 无法打开文件“atlsd.lib”

    问题: vs2013编译c++代码,错误 15 error LNK1104: 无法打开文件“atlsd.lib” 解决: 在你电脑或者其他人电脑上搜索atlsd.lib,将其拷贝到D:\Program ...

  7. pytest文档23-使用多个fixture和fixture直接互相调用

    使用多个fixture 如果用例需要用到多个fixture的返回数据,fixture也可以return一个元组.list或字典,然后从里面取出对应数据. # test_fixture4.py impo ...

  8. [翻译] 使用开源库 JGDownloadAcceleration 控制下载队列,断点下载,加速下载

    JGDownloadAcceleration 本人对原文进行了翻译,凑合看看,使用心得以后补上 https://github.com/JonasGessner/JGDownloadAccelerati ...

  9. DTree的改进与使用经验

    1.dtree.js源码 function Node(id, pid, name, url, title, target, icon, iconOpen, open) { this.id = id; ...

  10. IOS tableview 横向滚动

    1. UITableView 设置 CGRect tableViewRect = CGRectMake(0.0, 0.0, 50.0, 320.0);self.tableView = [[UITabl ...