本地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. PHP 大神的十大优良习惯

    1.多阅读手册和源代码 没什么比阅读手册更值得强调的事了–仅仅通过阅读手册你就可以学习到很多东西,特别是很多有关于字符串和数组的函数.就在这些函数里面包括许多有用 的功能,如果你仔细阅读手册,你会经常 ...

  2. Codeforces Round #351 (VK Cup 2016 Round 3, Div. 2 Edition) A. Bear and Game 水题

    A. Bear and Game 题目连接: http://www.codeforces.com/contest/673/problem/A Description Bear Limak likes ...

  3. "Blessing of Dimisionality: High Dimensional Feature and Its Efficient Compression for Face Verification"学习笔记

    这\(^{[1]}\)是一篇关于如何使用高维度特征在人脸验证中的文章,作者以主要LBP为例子,论述了高维特征和验证性能存在着正相关的关系,即人脸维度越高,验证的准确度就越高.由于那时候没有用DeepL ...

  4. jrebel使用

    背景与愿景:开发环境下,tomcat对热布署的支持还不够全面,致使开发人员浪费大量时间在重起服务上.为了提高开发效率,决定引入Jrebel,它对热布署的支持相对比较全面.虽然Jrebel官方号称使用它 ...

  5. GCC 对C语言的扩展

    http://www.cnblogs.com/emituofo/archive/2012/07/20/2600995.html http://blog.csdn.net/andyhuabing/art ...

  6. jquery googleapis

    <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js" type=&quo ...

  7. 我对NHibernate的感受(4):令人欣喜的Interceptor机制

    之前谈了NHibernate的几个方面,似乎抱怨的居多,不过这次我想谈一下我对Interceptor的感受,则基本上都是好话了.这并不一定是说Interceptor设计的又多么好(事实上它使用起来还是 ...

  8. jQuery异步获取json数据的2种方式

    jQuery异步获取json数据有2种方式,一个是$.getJSON方法,一个是$.ajax方法.本篇体验使用这2种方式异步获取json数据,然后追加到页面. 在根目录下创建data.json文件: ...

  9. Selenium2+python自动化60-异常后截图(screenshot)

    前言 在执行用例过程中由于是无人值守的,用例运行报错的时候,我们希望能对当前屏幕截图,留下证据. 在写用例的时候,最后一步是断言,可以把截图的动作放在断言这里,那么如何在断言失败后截图呢? 一.截图方 ...

  10. Eclipse设置打印线

    在调出Preferences之后,选中Text Editors.先选中Show print margin,在Print margin column框中填入180就可以,然后选择以下的Print mar ...