Apache Tomcat整合小记
作者 佚名技术
来源 Linux系统
浏览
发布时间 2012-05-14
Apache Tomcat整合小记 所需软件: 1、 jdk-6u6-linux-i586.bin 2、 apache-tomcat-5.5.26.tar.gz 3、 tomcat-connectors-1.2.26-src.tar.gz 前篇文章已经完成Apache的安装,因此这里不再介绍,具体安装步骤请参考前篇文章; 设置环境变量; /etc/profile 使环境变量生效 [root@server ~]# source /etc/profile 注意:JAVA及TOMCAT的目录是否为安装目录; 安装JDK 我的软件下载都放在/home/soft里面,每个人的目录都不一样,对号入座; [root@server ~]# cp /home/soft/jdk-6u6-linux-i586.bin /usr/local/ [root@server local]# ./jdk-6u6-linux-i586.bin …………………… I. Installation and Auto-Update. The Software''s installation and auto-update processes transmit a limited amount of data to Sun (or its service provider) about those specific processes to help Sun understand and optimize them. Sun does not associate the data with personally identifiable information. You can find more information about the data Sun collects at [url]http://java.com/data/.[/url] For inquiries please contact: Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, California 95054, U.S.A. Do you agree to the above license terms? [yes or no] yes ………… the JDK installation directory) in a browser. For more information on what data Registration collects and how it is managed and used, see: [url]http://java.sun.com/javase/registration/JDKRegistrationPrivacy.html[/url] Press Enter to continue..... Done. 所有安装,按空格,到提示时输入YES,最近提示按ENTER键结束; 查看当前JAVA版本; [root@server local]# java -version java version "1.6.0_06" Java(TM) SE Runtime Environment (build 1.6.0_06-b02) Java HotSpot(TM) Client VM (build 10.0-b22, mixed mode, sharing) 上面显示表明JAVA安装成功没有出错; [root@server local]mv jdk1.6.0_06/ java 安装TOMCAT,直接解压到/usr/local目录即可; [root@server local]# tar zxvf /home/soft/apache-tomcat-5.5.26.tar.gz [root@server local]# mv apache-tomcat-5.5.26 tomcat 编译安装Mod_jk [root@server local]# tar zxvf /home/soft/tomcat-connectors-1.2.26-src.tar.gz [root@server local]# cd tomcat-connectors-1.2.26-src/native/ [root@server native]# ./configure --with-java-home=/usr/local/java/ > --with-apxs=/usr/local/apache/bin/apxs [root@server native]# make clean; make [root@server native]# make install [root@server native]# cp apache-2.0/mod_jk.so /usr/local/apache/lib/ 以上完成编绎安装,开始设定Apache,让mod_jk 生效. 编辑 httpd.conf 在 httpd.conf 中加入mod_jk模块 # LoadModule foo_module modules/mod_foo.so LoadModule jk_module lib/mod_jk.so # Where to find workers.properties # Update this path to match your conf directory location (put workers.properties next to httpd.conf) JkWorkersFile /usr/local/apache/conf/workers.properties 这个目录是根据自己安装目录来设定,不能照搬; # Where to put jk shared memory # Update this path to match your local state directory or logs directory JkShmFile /var/log/httpd/mod_jk.shm # Where to put jk logs # Update this path to match your logs directory location (put mod_jk.log next to access_log) JkLogFile /var/log/httpd/mod_jk.log # Set the jk log level [debug/error/info] JkLogLevel info |
凌众科技专业提供服务器租用、服务器托管、企业邮局、虚拟主机等服务,公司网站:http://www.lingzhong.cn 为了给广大客户了解更多的技术信息,本技术文章收集来源于网络,凌众科技尊重文章作者的版权,如果有涉及你的版权有必要删除你的文章,请和我们联系。以上信息与文章正文是不可分割的一部分,如果您要转载本文章,请保留以上信息,谢谢! |
你可能对下面的文章感兴趣
关于Apache Tomcat整合小记的所有评论