本地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. 【二分】【预处理】zoj4029 Now Loading!!!

    题意:给定一个序列,多次询问 将a数组从小到大排序,下面那个值只有不超过32种,于是预处理f[i][j],表示分母为i时,aj/i的前缀和是多少. 然后对于一个给定的p,一定将分母划分成了一些连续的段 ...

  2. 【枚举】【贪心】Codeforces Round #482 (Div. 2) B. Treasure Hunt

    题意:给你3个字符串,3个人各对自己的字符串执行n轮操作,每一次选择一个字符变为任意一个和原来不同的字符.最后问你谁能使自己的串中的任意重复子串出现的次数最大化. 显然只需关注字符而非子串. 枚举每个 ...

  3. Sublime Text2 默认语言(windows/unix)设置,Sublime插件大全

    Sublime默认系统语言设置 Sublime Text 2默认使用的就是UTF8,这个UTF8模式使用的是不带BOM的,如果要修改这个配置,到Perference->Settings-User ...

  4. 鸟哥的私房菜:Bash shell(三)-命令别名与历史指令

    一  命令别名设定: alias, unalias 命令别名是一个很有趣的东西,特别是你的惯用指令特别长的时候!还有, 增设预设的属性在一些惯用的指令上面,可以预防一些不小心误杀档案的情况发生的时候! ...

  5. hdu 4417 区间内比h小的数 线段树

    题意求区间内比h小的数的个数 将所有的询问离线读入之后,按H从小到大排序.然后对于所有的结点也按从小到大排序,然后根据查询的H,将比H小的点加入到线段树,然后就是一个区间和. 2015-07-27:专 ...

  6. 高并发系列之——负载均衡,web负载均衡

    1 前言 负载均衡,一般包含两方面的含义.一方面是,将单一的重负载分担到多个网络节点上做并行处理,每个节点处理结束后将结果汇总返回给用户,这样可以大幅提高网络系统的处理能力: 第二个方面的含义是,将大 ...

  7. the elements of computing systems 的读书笔记1

    想转职程序猿,还真不是说懂一门语言就够的了,想要继续进步,必须懂其相关实现原理,比如这些底层的构造.最近看的就是这一本计算机入门级的书,但是对我这个纯自学的人来说真是能学到很多. 这本书从最基本的Na ...

  8. mysql长连接

    长连接是干嘛的:  它是做连接复用的: 在openresty中的lua-resty-mysql 里 connect方法去连接mysql时会去ngx_lua cosocket连接池中寻找是否有可用连接 ...

  9. URAL 1880 Psych Up's Eigenvalues

    1880. Psych Up's Eigenvalues Time limit: 0.5 secondMemory limit: 64 MB At one of the contests at the ...

  10. j.u.c系列(01) ---初探ThreadPoolExecutor线程池

    写在前面 之前探索tomcat7启动的过程中,使用了线程池(ThreadPoolExecutor)的技术 public void createExecutor() { internalExecutor ...