在Foreda8中整合Apche httpd2.4.6和Tomcat7.0.42(使用tomcat-connectors-1.2.37)-阿里云开发者社区

开发者社区> 桃子红了呐> 正文

在Foreda8中整合Apche httpd2.4.6和Tomcat7.0.42(使用tomcat-connectors-1.2.37)

简介:
+关注继续查看

本地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的连接完全成功了。

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



















本文转自张昺华-sky博客园博客,原文链接:http://www.cnblogs.com/xiandedanteng/p/3292657.html,如需转载请自行联系原作者


版权声明:本文内容由阿里云实名注册用户自发贡献,版权归原作者所有,阿里云开发者社区不拥有其著作权,亦不承担相应法律责任。具体规则请查看《阿里云开发者社区用户服务协议》和《阿里云开发者社区知识产权保护指引》。如果您发现本社区中有涉嫌抄袭的内容,填写侵权投诉表单进行举报,一经查实,本社区将立刻删除涉嫌侵权内容。

相关文章
Zuul整合Swagger,使用ZuulFilter解决下游服务context-path
问题起因:使用Zuul网关服务,需要整合下游系统的swagger,但是下游服务存在context-path配置,无法正确跳转,最后使用ZuulFilter解决。 1.Zuul整合下游swagger 首先介绍一下Zuul如何整合下游服务swagger,很好理解,就是通过Zuul的swagger地址,实现将下游服务的swagger都放入同一个页面内,流转图如下: 1.
342 0
使用Nginx反向代理 让IIS和Tomcat等多个站点一起飞
使用Nginx 让IIS和Tomcat等多个站点一起飞   前言:   养成一个好习惯,解决一个什么问题之后就记下来,毕竟“好记性不如烂笔头”。   这样也能帮助更多的人 不是吗?      最近闲着没事儿瞎搞,自己在写一个ASP.NET MVC的系统,所以理所当然的 在服务器上搭建了一个IIS。
2649 0
Tomcat使用线程池配置高并发连接
Tomcat使用线程池配置高并发连接1:配置executor属性 打开/conf/server.xml文件,在Connector之前配置一个线程池: namePrefix="tomcatThreadPool-" maxThreads="1000" maxIdleTime="300000" minSpareThreads="200"/> 重要参数说明:name:共享线程池的名字。
1057 0
对小程序地图小程序API:my.createMapContext(mapId)的简单使用
my.createMapContext(mapId):创建并返回 map 上下文 mapContext 对象。 mapContext 通过 mapId 跟一个  组件绑定,通过它可以操作对应的  组件。
1550 0
SpringBoot Jpa 使用问题解决整合
1. 启动项目报错 Not a managed type: class com.xzxx 这种问题一般出在多模块开发中的依赖传递导致的问题,该问题的原因是启动类找不到对应的bean。
922 0
下拉框控件dhtmlXCombo在ASP.NET中的使用详解
原文:http://blog.csdn.net/asengine11/article/details/6455267    在ASP.NET项目中经常会用到下拉框控件,但是ASP.NET提供的DropDownList控件不能修改样式,经常会与网站整体风格格格不入。
955 0
Asp.net MVC Preview 4 中使用RenderComponent
RenderComponent在Pv3及以前版本中经常用到,自从Monorails而来Component就以其方便自然而让我很是喜欢,虽然它性能明显不如Parse/UserControl 在pv4中要使用以下方法来调用组件  n.About()); %> 注意2点 原来的
568 0
redis整合Spring集群搭建及业务中的使用
1.redis安装   Redis是c语言开发的。   安装redis需要c语言的编译环境。如果没有gcc需要在线安装。yum install gcc-c++   安装步骤:   第一步:redis的源码包上传到linux系统。
1069 0
4269
文章
0
问答
文章排行榜
最热
最新
相关电子书
更多
《2021云上架构与运维峰会演讲合集》
立即下载
《零基础CSS入门教程》
立即下载
《零基础HTML入门教程》
立即下载