﻿<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/"><channel><title>C++博客-仰天一笑泪光寒</title><link>http://www.cppblog.com/vallygirl/</link><description>相逢一笑泯恩仇</description><language>zh-cn</language><lastBuildDate>Tue, 14 Apr 2026 23:09:23 GMT</lastBuildDate><pubDate>Tue, 14 Apr 2026 23:09:23 GMT</pubDate><ttl>60</ttl><item><title>轻松实现Apache,Tomcat集群和负载均衡(转）</title><link>http://www.cppblog.com/vallygirl/archive/2014/09/02/ApacheTomcat.html</link><dc:creator>ekong</dc:creator><author>ekong</author><pubDate>Tue, 02 Sep 2014 07:57:00 GMT</pubDate><guid>http://www.cppblog.com/vallygirl/archive/2014/09/02/ApacheTomcat.html</guid><description><![CDATA[<span style="font-family: Verdana, Geneva, Arial, Helvetica, sans-serif; font-size: 13px; line-height: 19.200000762939453px; background-color: #ffffff;">第一次尝试配置集群和负载均衡，按照这篇文章配置成功，备忘。</span><br style="font-family: Verdana, Geneva, Arial, Helvetica, sans-serif; font-size: 13px; line-height: 19.200000762939453px; background-color: #ffffff;" /><span style="font-family: Verdana, Geneva, Arial, Helvetica, sans-serif; font-size: 13px; line-height: 19.200000762939453px; background-color: #ffffff;">转自：http://hi.baidu.com/luodaijun/blog/item/5bbe4cfb5ffef864034f56a1.html</span><br style="font-family: Verdana, Geneva, Arial, Helvetica, sans-serif; font-size: 13px; line-height: 19.200000762939453px; background-color: #ffffff;" /><br style="font-family: Verdana, Geneva, Arial, Helvetica, sans-serif; font-size: 13px; line-height: 19.200000762939453px; background-color: #ffffff;" /><span style="font-family: Verdana, Geneva, Arial, Helvetica, sans-serif; font-size: 13px; line-height: 19.200000762939453px; background-color: #ffffff;">作者:罗代均 ldj_work#126.com,转载请保持完整性</span><p style="margin: 0px 0px 14px; font-family: Verdana, Geneva, Arial, Helvetica, sans-serif; font-size: 13px; line-height: 19.200000762939453px; background-color: #ffffff;"><strong>0， 环境说明</strong></p><p style="margin: 0px 0px 14px; font-family: Verdana, Geneva, Arial, Helvetica, sans-serif; font-size: 13px; line-height: 19.200000762939453px; background-color: #ffffff;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Apache&nbsp; :apache_2.0.55&nbsp;&nbsp;&nbsp;&nbsp; 1 个</p><p style="margin: 0px 0px 14px; font-family: Verdana, Geneva, Arial, Helvetica, sans-serif; font-size: 13px; line-height: 19.200000762939453px; background-color: #ffffff;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Tomcat:&nbsp; apache-tomcat-5.5.17 (zip版) 2个</p><p style="margin: 0px 0px 14px; font-family: Verdana, Geneva, Arial, Helvetica, sans-serif; font-size: 13px; line-height: 19.200000762939453px; background-color: #ffffff;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;mod_jk:: mod_jk-apache-2.0.55.so&nbsp; 1个</p><p style="margin: 0px 0px 14px; font-family: Verdana, Geneva, Arial, Helvetica, sans-serif; font-size: 13px; line-height: 19.200000762939453px; background-color: #ffffff;"><strong>第一部分：负载均衡</strong></p><p style="margin: 0px 0px 14px; font-family: Verdana, Geneva, Arial, Helvetica, sans-serif; font-size: 13px; line-height: 19.200000762939453px; background-color: #ffffff;">&nbsp;&nbsp;&nbsp; 负载均衡，就是apache将客户请求均衡的分给tomcat1,tomcat2....去处理</p><p style="margin: 0px 0px 14px; font-family: Verdana, Geneva, Arial, Helvetica, sans-serif; font-size: 13px; line-height: 19.200000762939453px; background-color: #ffffff;"><strong>&nbsp;&nbsp; 1.安装apche,tomcat</strong></p><p style="margin: 0px 0px 14px; font-family: Verdana, Geneva, Arial, Helvetica, sans-serif; font-size: 13px; line-height: 19.200000762939453px; background-color: #ffffff;">&nbsp;&nbsp;&nbsp;<a href="http://httpd.apache.org/" style="color: #1d58d1; text-decoration: none;">http://httpd.apache.org/</a>&nbsp;下载Apache 2.0.55</p><p style="margin: 0px 0px 14px; font-family: Verdana, Geneva, Arial, Helvetica, sans-serif; font-size: 13px; line-height: 19.200000762939453px; background-color: #ffffff;">&nbsp;&nbsp;&nbsp;&nbsp;<a href="http://tomcat.apache.org/download-55.cgi" style="color: #1d58d1; text-decoration: none;">http://tomcat.apache.org/download-55.cgi</a>&nbsp;下载tomcat5.5 zip版本（解压即可，绿色版）</p><p style="margin: 0px 0px 14px; font-family: Verdana, Geneva, Arial, Helvetica, sans-serif; font-size: 13px; line-height: 19.200000762939453px; background-color: #ffffff;">&nbsp;&nbsp;&nbsp;<a href="http://apache.justdn.org/tomcat/tomcat-connectors/jk/binaries/win32/jk-1.2.15/" style="color: #1d58d1; text-decoration: none;">http://apache.justdn.org/tomcat/tomcat-connectors/jk/binaries/win32/jk-1.2.15/</a>&nbsp; 下载mod_jk,注意和&nbsp; apache版本匹配</p><p style="margin: 0px 0px 14px; font-family: Verdana, Geneva, Arial, Helvetica, sans-serif; font-size: 13px; line-height: 19.200000762939453px; background-color: #ffffff;">&nbsp;&nbsp; 按照jdk,我的路径为:E:\ide\apache\Apache2</p><p style="margin: 0px 0px 14px; font-family: Verdana, Geneva, Arial, Helvetica, sans-serif; font-size: 13px; line-height: 19.200000762939453px; background-color: #ffffff;">&nbsp;&nbsp; 解压两份Tomcat, 路径分别为 E:\ide\tomcat1,E:\ide\tomcat2</p><div forimg="1" style="font-family: Verdana, Geneva, Arial, Helvetica, sans-serif; font-size: 13px; line-height: 19.200000762939453px; background-color: #ffffff;"><img src="http://www.blogjava.net/images/blogjava_net/killme2008/1.gif" alt="1.gif" border="0" height="436" width="618" style="border: 0px;" /></div><p style="margin: 0px 0px 14px; font-family: Verdana, Geneva, Arial, Helvetica, sans-serif; font-size: 13px; line-height: 19.200000762939453px; background-color: #ffffff;">下载mod_jk</p><div forimg="1" style="font-family: Verdana, Geneva, Arial, Helvetica, sans-serif; font-size: 13px; line-height: 19.200000762939453px; background-color: #ffffff;"><img src="http://www.blogjava.net/images/blogjava_net/killme2008/2.gif" alt="2.gif" border="0" height="436" width="618" style="border: 0px;" /></div><div forimg="1" style="font-family: Verdana, Geneva, Arial, Helvetica, sans-serif; font-size: 13px; line-height: 19.200000762939453px; background-color: #ffffff;"></div><p style="margin: 0px 0px 14px; font-family: Verdana, Geneva, Arial, Helvetica, sans-serif; font-size: 13px; line-height: 19.200000762939453px; background-color: #ffffff;"><strong>2.修改Apache配置文件http.conf</strong></p><p style="margin: 0px 0px 14px; font-family: Verdana, Geneva, Arial, Helvetica, sans-serif; font-size: 13px; line-height: 19.200000762939453px; background-color: #ffffff;">&nbsp;&nbsp; 在apache安装目录下conf目录中找到http.conf</p><p style="margin: 0px 0px 14px; font-family: Verdana, Geneva, Arial, Helvetica, sans-serif; font-size: 13px; line-height: 19.200000762939453px; background-color: #ffffff;">&nbsp;&nbsp; 在文件最后加上下面一句话就可以了</p><p style="margin: 0px 0px 14px; font-family: Verdana, Geneva, Arial, Helvetica, sans-serif; font-size: 13px; line-height: 19.200000762939453px; background-color: #ffffff;">&nbsp; include "E:\ide\apache\Apache2\conf\mod_jk.conf"</p><div forimg="1" style="font-family: Verdana, Geneva, Arial, Helvetica, sans-serif; font-size: 13px; line-height: 19.200000762939453px; background-color: #ffffff;"><img src="http://www.blogjava.net/images/blogjava_net/killme2008/3.gif" alt="3.gif" border="0" height="331" width="648" style="border: 0px;" /></div><div forimg="1" style="font-family: Verdana, Geneva, Arial, Helvetica, sans-serif; font-size: 13px; line-height: 19.200000762939453px; background-color: #ffffff;"><strong>2. http.conf 同目录下新建mod_jk.conf文件，内容如下</strong></div><div forimg="1" style="font-family: Verdana, Geneva, Arial, Helvetica, sans-serif; font-size: 13px; line-height: 19.200000762939453px; background-color: #ffffff;">&nbsp;&nbsp;</div><div forimg="1" style="font-family: Verdana, Geneva, Arial, Helvetica, sans-serif; font-size: 13px; line-height: 19.200000762939453px; background-color: #ffffff;">#加载mod_jk Module<br />LoadModule jk_module modules/mod_jk-apache-2.0.55.so</div><div forimg="1" style="font-family: Verdana, Geneva, Arial, Helvetica, sans-serif; font-size: 13px; line-height: 19.200000762939453px; background-color: #ffffff;">#指定 workers.properties文件路径<br />JkWorkersFile conf/workers.properties</div><div forimg="1" style="font-family: Verdana, Geneva, Arial, Helvetica, sans-serif; font-size: 13px; line-height: 19.200000762939453px; background-color: #ffffff;">#指定那些请求交给tomcat处理,"controller"为在workers.propertise里指定的负载分配控制器</div><div forimg="1" style="font-family: Verdana, Geneva, Arial, Helvetica, sans-serif; font-size: 13px; line-height: 19.200000762939453px; background-color: #ffffff;">JkMount /*.jsp controller</div><div forimg="1" style="font-family: Verdana, Geneva, Arial, Helvetica, sans-serif; font-size: 13px; line-height: 19.200000762939453px; background-color: #ffffff;"><strong>3.在http.conf同目录下新建 workers.properties文件，内容如下</strong></div><div forimg="1" style="font-family: Verdana, Geneva, Arial, Helvetica, sans-serif; font-size: 13px; line-height: 19.200000762939453px; background-color: #ffffff;">&nbsp;</div><div forimg="1" style="font-family: Verdana, Geneva, Arial, Helvetica, sans-serif; font-size: 13px; line-height: 19.200000762939453px; background-color: #ffffff;">worker.list = controller,tomcat1,tomcat2&nbsp; #server 列表</div><div forimg="1" style="font-family: Verdana, Geneva, Arial, Helvetica, sans-serif; font-size: 13px; line-height: 19.200000762939453px; background-color: #ffffff;">#========tomcat1========</div><div forimg="1" style="font-family: Verdana, Geneva, Arial, Helvetica, sans-serif; font-size: 13px; line-height: 19.200000762939453px; background-color: #ffffff;">worker.tomcat1.port=8009&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; #ajp13 端口号，在tomcat下server.xml配置,默认8009<br />worker.tomcat1.host=localhost&nbsp; #tomcat的主机地址，如不为本机，请填写ip地址<br />worker.tomcat1.type=ajp13<br />worker.tomcat1.lbfactor = 1&nbsp;&nbsp; #server的加权比重，值越高，分得的请求越多</div><div forimg="1" style="font-family: Verdana, Geneva, Arial, Helvetica, sans-serif; font-size: 13px; line-height: 19.200000762939453px; background-color: #ffffff;">#========tomcat2========</div><div forimg="1" style="font-family: Verdana, Geneva, Arial, Helvetica, sans-serif; font-size: 13px; line-height: 19.200000762939453px; background-color: #ffffff;">worker.tomcat2.port=9009&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; #ajp13 端口号，在tomcat下server.xml配置,默认8009<br />worker.tomcat2.host=localhost&nbsp; #tomcat的主机地址，如不为本机，请填写ip地址<br />worker.tomcat2.type=ajp13<br />worker.tomcat2.lbfactor = 1&nbsp;&nbsp; #server的加权比重，值越高，分得的请求越多</div><div forimg="1" style="font-family: Verdana, Geneva, Arial, Helvetica, sans-serif; font-size: 13px; line-height: 19.200000762939453px; background-color: #ffffff;"><br />#========controller,负载均衡控制器========<br />worker.controller.type=lb<br />worker.controller.balanced_workers=tomcat1,tomcat2&nbsp;&nbsp; #指定分担请求的tomcat<br />worker.controller.sticky_session=1</div><div forimg="1" style="font-family: Verdana, Geneva, Arial, Helvetica, sans-serif; font-size: 13px; line-height: 19.200000762939453px; background-color: #ffffff;"><strong>4.修改tomcat配置文件server.xml</strong></div><div forimg="1" style="font-family: Verdana, Geneva, Arial, Helvetica, sans-serif; font-size: 13px; line-height: 19.200000762939453px; background-color: #ffffff;">如果你在不同电脑上安装tomcat,tomcat的安装数量为一个，可以不必修改tomcat配置文件</div><div forimg="1" style="font-family: Verdana, Geneva, Arial, Helvetica, sans-serif; font-size: 13px; line-height: 19.200000762939453px; background-color: #ffffff;">我这里是在同一台电脑上安装两个tomcat，所以需要更改其中一个的设置</div><div forimg="1" style="font-family: Verdana, Geneva, Arial, Helvetica, sans-serif; font-size: 13px; line-height: 19.200000762939453px; background-color: #ffffff;">打开tomcat2/conf/server.xml文件</div><img src="http://www.blogjava.net/images/blogjava_net/killme2008/4.gif" alt="4.gif" border="0" height="329" width="742" style="border: 0px; font-family: Verdana, Geneva, Arial, Helvetica, sans-serif; font-size: 13px; line-height: 19.200000762939453px; background-color: #ffffff;" /><br style="font-family: Verdana, Geneva, Arial, Helvetica, sans-serif; font-size: 13px; line-height: 19.200000762939453px; background-color: #ffffff;" /><div forimg="1" style="font-family: Verdana, Geneva, Arial, Helvetica, sans-serif; font-size: 13px; line-height: 19.200000762939453px; background-color: #ffffff;"><img src="http://www.blogjava.net/images/blogjava_net/killme2008/5.gif" alt="5.gif" border="0" height="329" width="742" style="border: 0px;" /></div><div forimg="1" style="font-family: Verdana, Geneva, Arial, Helvetica, sans-serif; font-size: 13px; line-height: 19.200000762939453px; background-color: #ffffff;"><img src="http://www.blogjava.net/images/blogjava_net/killme2008/6.gif" alt="6.gif" border="0" height="329" width="742" style="border: 0px;" /></div><div forimg="1" style="font-family: Verdana, Geneva, Arial, Helvetica, sans-serif; font-size: 13px; line-height: 19.200000762939453px; background-color: #ffffff;"><strong>5.编写一个测试jsp</strong></div><div forimg="1" style="font-family: Verdana, Geneva, Arial, Helvetica, sans-serif; font-size: 13px; line-height: 19.200000762939453px; background-color: #ffffff;">建立一个目录test.里面新建一个test.jsp,内容为</div><div forimg="1" style="font-family: Verdana, Geneva, Arial, Helvetica, sans-serif; font-size: 13px; line-height: 19.200000762939453px; background-color: #ffffff;">&lt;%&nbsp;<br />&nbsp;&nbsp; System.out.println("===========================");<br />%&gt;</div><div forimg="1" style="font-family: Verdana, Geneva, Arial, Helvetica, sans-serif; font-size: 13px; line-height: 19.200000762939453px; background-color: #ffffff;">把test放到tomcat1,tomcat2的webapps下</div><div forimg="1" style="font-family: Verdana, Geneva, Arial, Helvetica, sans-serif; font-size: 13px; line-height: 19.200000762939453px; background-color: #ffffff;"><strong>6.启动apache,tomcat1,tomcat2,进行测试</strong></div><div forimg="1" style="font-family: Verdana, Geneva, Arial, Helvetica, sans-serif; font-size: 13px; line-height: 19.200000762939453px; background-color: #ffffff;">通过&nbsp;<a href="http://localhost/test/test.jsp" style="color: #1d58d1; text-decoration: none;">http://localhost/test/test.jsp</a>&nbsp;访问，查看tomcat1的窗口，可以看到打印了一行"=========="</div><div forimg="1" style="font-family: Verdana, Geneva, Arial, Helvetica, sans-serif; font-size: 13px; line-height: 19.200000762939453px; background-color: #ffffff;">再刷新一次，tomcat2也打印了一条，再刷新，可以看到请求会被tomcat1,tomcat2轮流处理,实现了负载均衡<br /><img src="http://www.blogjava.net/images/blogjava_net/killme2008/7.gif" alt="7.gif" border="0" height="500" width="1139" style="border: 0px;" /></div><div forimg="1" style="font-family: Verdana, Geneva, Arial, Helvetica, sans-serif; font-size: 13px; line-height: 19.200000762939453px; background-color: #ffffff;"></div><div forimg="1" style="font-family: Verdana, Geneva, Arial, Helvetica, sans-serif; font-size: 13px; line-height: 19.200000762939453px; background-color: #ffffff;"><strong>第二部分，配置集群</strong></div><div forimg="1" style="font-family: Verdana, Geneva, Arial, Helvetica, sans-serif; font-size: 13px; line-height: 19.200000762939453px; background-color: #ffffff;">&nbsp;&nbsp; 只配置负载均衡还不行，还要session复制，也就是说其中任何一个tomcat的添加的session，是要同步复制到其它tomcat， 集群内的tomcat都有相同的session</div><div forimg="1" style="font-family: Verdana, Geneva, Arial, Helvetica, sans-serif; font-size: 13px; line-height: 19.200000762939453px; background-color: #ffffff;"><strong>1. 修改tomcat1, tomcat2的server.xml</strong>,将集群部分配置的在注释符删掉,并将tomcat2的4001端口改为4002，以避免与tomcat冲突，当然，如果是两台电脑，是不用改端口的，去掉注释符即可</div><span style="font-family: Verdana, Geneva, Arial, Helvetica, sans-serif; font-size: 13px; line-height: 19.200000762939453px; background-color: #ffffff;">&nbsp;&nbsp;</span><div forimg="1" style="font-family: Verdana, Geneva, Arial, Helvetica, sans-serif; font-size: 13px; line-height: 19.200000762939453px; background-color: #ffffff;"><img src="http://www.blogjava.net/images/blogjava_net/killme2008/8.gif" alt="8.gif" border="0" height="348" width="682" style="border: 0px;" /></div><div forimg="1" style="font-family: Verdana, Geneva, Arial, Helvetica, sans-serif; font-size: 13px; line-height: 19.200000762939453px; background-color: #ffffff;"><div forimg="1"><img src="http://www.blogjava.net/images/blogjava_net/killme2008/9.gif" alt="9.gif" border="0" height="348" width="682" style="border: 0px;" /></div></div><div forimg="1" style="font-family: Verdana, Geneva, Arial, Helvetica, sans-serif; font-size: 13px; line-height: 19.200000762939453px; background-color: #ffffff;"><img src="http://www.blogjava.net/images/blogjava_net/killme2008/10.gif" alt="10.gif" border="0" height="348" width="682" style="border: 0px;" /></div><div forimg="1" style="font-family: Verdana, Geneva, Arial, Helvetica, sans-serif; font-size: 13px; line-height: 19.200000762939453px; background-color: #ffffff;"><strong><div forimg="1"><img src="http://www.blogjava.net/images/blogjava_net/killme2008/11.gif" alt="11.gif" border="0" height="348" width="682" style="border: 0px;" /></div></strong></div><div forimg="1" style="font-family: Verdana, Geneva, Arial, Helvetica, sans-serif; font-size: 13px; line-height: 19.200000762939453px; background-color: #ffffff;"><strong></strong></div><div forimg="1" style="font-family: Verdana, Geneva, Arial, Helvetica, sans-serif; font-size: 13px; line-height: 19.200000762939453px; background-color: #ffffff;"><strong>2，修改测试项目test</strong></div><div forimg="1" style="font-family: Verdana, Geneva, Arial, Helvetica, sans-serif; font-size: 13px; line-height: 19.200000762939453px; background-color: #ffffff;">修改test.jsp,内容如下</div><div forimg="1" style="font-family: Verdana, Geneva, Arial, Helvetica, sans-serif; font-size: 13px; line-height: 19.200000762939453px; background-color: #ffffff;">&nbsp; &lt;%@ page contentType="text/html; charset=GBK" %&gt;<br />&lt;%@ page import="java.util.*" %&gt;<br />&lt;html&gt;&lt;head&gt;&lt;title&gt;Cluster App Test&lt;/title&gt;&lt;/head&gt;<br />&lt;body&gt;<br />Server Info:<br />&lt;%<br />out.println(request.getLocalAddr() + " : " + request.getLocalPort()+"&lt;br&gt;");%&gt;<br />&lt;%<br />&nbsp; out.println("&lt;br&gt; ID " + session.getId()+"&lt;br&gt;");</div><div forimg="1" style="font-family: Verdana, Geneva, Arial, Helvetica, sans-serif; font-size: 13px; line-height: 19.200000762939453px; background-color: #ffffff;">&nbsp; // 如果有新的 Session 属性设置<br />&nbsp; String dataName = request.getParameter("dataName");<br />&nbsp; if (dataName != null &amp;&amp; dataName.length() &gt; 0) {<br />&nbsp;&nbsp;&nbsp;&nbsp; String dataValue = request.getParameter("dataValue");<br />&nbsp;&nbsp;&nbsp;&nbsp; session.setAttribute(dataName, dataValue);<br />&nbsp; }</div><div forimg="1" style="font-family: Verdana, Geneva, Arial, Helvetica, sans-serif; font-size: 13px; line-height: 19.200000762939453px; background-color: #ffffff;">&nbsp; out.print("&lt;b&gt;Session 列表&lt;/b&gt;");</div><div forimg="1" style="font-family: Verdana, Geneva, Arial, Helvetica, sans-serif; font-size: 13px; line-height: 19.200000762939453px; background-color: #ffffff;">&nbsp; Enumeration e = session.getAttributeNames();<br />&nbsp; while (e.hasMoreElements()) {<br />&nbsp;&nbsp;&nbsp;&nbsp; String name = (String)e.nextElement();<br />&nbsp;&nbsp;&nbsp;&nbsp; String value = session.getAttribute(name).toString();<br />&nbsp;&nbsp;&nbsp;&nbsp; out.println( name + " = " + value+"&lt;br&gt;");<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; System.out.println( name + " = " + value);<br />&nbsp;&nbsp; }<br />%&gt;<br />&nbsp; &lt;form action="index.jsp" method="POST"&gt;<br />&nbsp;&nbsp;&nbsp; 名称:&lt;input type=text size=20 name="dataName"&gt;<br />&nbsp;&nbsp;&nbsp;&nbsp; &lt;br&gt;<br />&nbsp;&nbsp;&nbsp; 值:&lt;input type=text size=20 name="dataValue"&gt;<br />&nbsp;&nbsp;&nbsp;&nbsp; &lt;br&gt;<br />&nbsp;&nbsp;&nbsp; &lt;input type=submit&gt;<br />&nbsp;&nbsp; &lt;/form&gt;<br />&lt;/body&gt;<br />&lt;/html&gt;</div><div forimg="1" style="font-family: Verdana, Geneva, Arial, Helvetica, sans-serif; font-size: 13px; line-height: 19.200000762939453px; background-color: #ffffff;">然后在test 新建WEB-INF目录，WEB-INF下新建web.xml,内容如下</div><div forimg="1" style="font-family: Verdana, Geneva, Arial, Helvetica, sans-serif; font-size: 13px; line-height: 19.200000762939453px; background-color: #ffffff;">&lt;web-app xmlns="<a href="http://java.sun.com/xml/ns/j2ee" style="color: #1d58d1; text-decoration: none;">http://java.sun.com/xml/ns/j2ee</a>" xmlns:xsi="<a href="http://www.w3.org/2001/XMLSchema-instance" style="color: #1d58d1; text-decoration: none;">http://www.w3.org/2001/XMLSchema-instance</a>" xsi:schemaLocation="<a href="http://java.sun.com/xml/ns/j2ee" style="color: #1d58d1; text-decoration: none;">http://java.sun.com/xml/ns/j2ee</a><a href="http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd" style="color: #1d58d1; text-decoration: none;">http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd</a>" version="2.4"&gt;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;display-name&gt;TomcatDemo&lt;/display-name&gt;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<strong>&nbsp;&lt;distributable/&gt;</strong><br />&lt;/web-app&gt;</div><div forimg="1" style="font-family: Verdana, Geneva, Arial, Helvetica, sans-serif; font-size: 13px; line-height: 19.200000762939453px; background-color: #ffffff;">注意：在你的应用的web.xml加入&nbsp;<strong>&nbsp;&lt;distributable/&gt;</strong>即可</div><div forimg="1" style="font-family: Verdana, Geneva, Arial, Helvetica, sans-serif; font-size: 13px; line-height: 19.200000762939453px; background-color: #ffffff;">ok,讲test复制到tomcat1,tomcat2的webapps下，重启apache,tomcat1,tomcat2,</div><div forimg="1" style="font-family: Verdana, Geneva, Arial, Helvetica, sans-serif; font-size: 13px; line-height: 19.200000762939453px; background-color: #ffffff;">输入网址&nbsp;<a href="http://localhost/test/test.jsp" style="color: #1d58d1; text-decoration: none;">http://localhost/test/test.jsp</a>&nbsp;&nbsp;</div><div forimg="1" style="font-family: Verdana, Geneva, Arial, Helvetica, sans-serif; font-size: 13px; line-height: 19.200000762939453px; background-color: #ffffff;">新建一个 名称为 xiaoluo&nbsp; ,值为 cdut 的session,提交查询，新开一个ie窗口，再提交查询，如图，可以看到，两个tomcat 是负载均衡，并且session同步的</div><div forimg="1" style="font-family: Verdana, Geneva, Arial, Helvetica, sans-serif; font-size: 13px; line-height: 19.200000762939453px; background-color: #ffffff;"><div forimg="1"><img src="http://www.blogjava.net/images/blogjava_net/killme2008/12.gif" alt="12.gif" border="0" height="705" width="969" style="border: 0px;" /></div></div><span style="font-family: Verdana, Geneva, Arial, Helvetica, sans-serif; font-size: 13px; line-height: 19.200000762939453px; background-color: #ffffff;">需要注意的是，配置集群时设置jvmRoute时，要把原来的Engine注释掉，去掉上面那一行的注释，也就是修改成</span><br style="font-family: Verdana, Geneva, Arial, Helvetica, sans-serif; font-size: 13px; line-height: 19.200000762939453px; background-color: #ffffff;" /><span style="font-family: Verdana, Geneva, Arial, Helvetica, sans-serif; font-size: 13px; line-height: 19.200000762939453px; background-color: #ffffff;">&nbsp;&lt;!-- You should set jvmRoute to support load-balancing via JK/JK2 ie :&nbsp;&nbsp;&nbsp; --&gt;&nbsp;</span><br style="font-family: Verdana, Geneva, Arial, Helvetica, sans-serif; font-size: 13px; line-height: 19.200000762939453px; background-color: #ffffff;" /><span style="font-family: Verdana, Geneva, Arial, Helvetica, sans-serif; font-size: 13px; line-height: 19.200000762939453px; background-color: #ffffff;">&nbsp;&nbsp;&nbsp; &lt;Engine name="Standalone" defaultHost="localhost" debug="0" jvmRoute="tomcat1"&gt; &nbsp;&nbsp;</span><br style="font-family: Verdana, Geneva, Arial, Helvetica, sans-serif; font-size: 13px; line-height: 19.200000762939453px; background-color: #ffffff;" /><img src ="http://www.cppblog.com/vallygirl/aggbug/208204.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.cppblog.com/vallygirl/" target="_blank">ekong</a> 2014-09-02 15:57 <a href="http://www.cppblog.com/vallygirl/archive/2014/09/02/ApacheTomcat.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>Tomcat 配置</title><link>http://www.cppblog.com/vallygirl/archive/2014/09/02/Tomcat.html</link><dc:creator>ekong</dc:creator><author>ekong</author><pubDate>Tue, 02 Sep 2014 07:50:00 GMT</pubDate><guid>http://www.cppblog.com/vallygirl/archive/2014/09/02/Tomcat.html</guid><description><![CDATA[<p style="font-family: Verdana, Arial, 宋体; font-size: 12px; line-height: 26px; background-color: #ffffcc;">西北大学计算机系硕士<br />2001 年 12 月</p><blockquote style="color: #000000; font-family: Verdana, Arial, 宋体; font-size: 12px; line-height: 26px; background-color: #ffffcc;">随着java的流行，其在web上的应用也越来越广，tomcat作为一个开源的servlet容器，应用前景越来越广，本文将向你讲述tomcat的一些知识。</blockquote><p style="font-family: Verdana, Arial, 宋体; font-size: 12px; line-height: 26px; background-color: #ffffcc;">一：简介<br />tomcat是jakarta项目中的一个重要的子项目，其被JavaWorld杂志的编辑选为2001年度最具创新的java产品(Most Innovative Java Product)，同时它又是sun公司官方推荐的servlet和jsp容器(具体可以见http://java.sun.com/products/jsp/tomcat/)，因此其越来越多的受到软件公司和开发人员的喜爱。servlet和jsp的最新规范都可以在tomcat的新版本中得到实现。</p><p style="font-family: Verdana, Arial, 宋体; font-size: 12px; line-height: 26px; background-color: #ffffcc;">二：安装及配置<br />tomcat最新版本为4.0.1，这个版本用了一个新的servlet容器Catalina，完整的实现了servlet2.3和jsp1.2规范。注意安装之前你的系统必须安装了jdk1.2以上版本。</p><p style="font-family: Verdana, Arial, 宋体; font-size: 12px; line-height: 26px; background-color: #ffffcc;">(一)：安装<br />1：windows平台<br />从tomcat网站下载<u>jakarta-tomcat-4.0.1.exe</u>，按照一般的windows程序安装步骤即可安装好tomcat,安装时它会自动寻找你的jdk和jre的位置。</p><p style="font-family: Verdana, Arial, 宋体; font-size: 12px; line-height: 26px; background-color: #ffffcc;">2：linux平台<br />下载<u>jakarta-tomcat-4.0.1.tar.gz</u>，将其解压到一个目录。</p><p style="font-family: Verdana, Arial, 宋体; font-size: 12px; line-height: 26px; background-color: #ffffcc;">(二)：配置<br />运行tomcat需要设置JAVA_HOME变量</p><table cellspacing="0" cellpadding="5" width="100%" bgcolor="#cccccc" border="1" style="color: #000000; font-family: Verdana, Arial, 宋体; font-size: 12px; line-height: 26px;"><tbody><tr><td><pre style="white-space: pre-wrap; word-wrap: break-word;"><code>set JAVA_HOME=c:/jdk (win98，在msdos方式下使用，或者放入autoexec.bat中) export JAVA_HOME=/usr/local/jdk (linux下使用，放到/etc/bashrc或者/etc/profile中) </code> </pre></td></tr></tbody></table><br style="font-family: Verdana, Arial, 宋体; font-size: 12px; line-height: 26px; background-color: #ffffcc;" /><br style="font-family: Verdana, Arial, 宋体; font-size: 12px; line-height: 26px; background-color: #ffffcc;" /><p style="font-family: Verdana, Arial, 宋体; font-size: 12px; line-height: 26px; background-color: #ffffcc;">(三)：运行<br />设置完毕后就可以运行tomcat服务器了，进入tomcat的bin目录，win98下用startup启动tomcat，linux下用startup.sh，相应的关闭tomcat的命令为shutdown和shutdown.sh。</p><p style="font-family: Verdana, Arial, 宋体; font-size: 12px; line-height: 26px; background-color: #ffffcc;">启动后可以在浏览器中输入http://localhost:8080/测试，由于tomcat本身具有web服务器的功能，因此我们不必安装apache，当然其也可以与apache集成到一起，下面会介绍。</p><p style="font-family: Verdana, Arial, 宋体; font-size: 12px; line-height: 26px; background-color: #ffffcc;">下面你可以测试其自带的jsp和servlet示例。</p><p style="font-family: Verdana, Arial, 宋体; font-size: 12px; line-height: 26px; background-color: #ffffcc;">三：应用</p><p style="font-family: Verdana, Arial, 宋体; font-size: 12px; line-height: 26px; background-color: #ffffcc;">(一):目录结构<br />tomcat的目录结构如下：</p><table cellspacing="0" cellpadding="5" width="100%" bgcolor="#cccccc" border="1" style="color: #000000; font-family: Verdana, Arial, 宋体; font-size: 12px; line-height: 26px;"><tbody><tr><td>目录名</td><td>简介</td></tr><tr><td>bin</td><td>存放启动和关闭tomcat脚本</td></tr><tr><td>conf</td><td>包含不同的配置文件,server.xml(Tomcat的主要配置文件)和web.xml</td></tr><tr><td>work</td><td>存放jsp编译后产生的class文件</td></tr><tr><td>webapp</td><td>存放应用程序示例，以后你要部署的应用程序也要放到此目录</td></tr><tr><td>logs</td><td>存放日志文件</td></tr><tr><td>lib/japser/common</td><td>这三个目录主要存放tomcat所需的jar文件</td></tr></tbody></table><br style="font-family: Verdana, Arial, 宋体; font-size: 12px; line-height: 26px; background-color: #ffffcc;" /><br style="font-family: Verdana, Arial, 宋体; font-size: 12px; line-height: 26px; background-color: #ffffcc;" /><p style="font-family: Verdana, Arial, 宋体; font-size: 12px; line-height: 26px; background-color: #ffffcc;">(二)：server.xml配置简介<br />下面我们将讲述这个文件中的基本配置信息，更具体的配置信息见tomcat的文档</p><table cellspacing="0" cellpadding="0" width="80%" bgcolor="#cccccc" border="1" style="color: #000000; font-family: Verdana, Arial, 宋体; font-size: 12px; line-height: 26px;"><tbody><tr><td width="27%">元素名</td><td width="21%">属性</td><td width="52%">解释</td></tr><tr><td width="27%" rowspan="2">server</td><td width="21%">port</td><td width="52%">指定一个端口，这个端口负责监听关闭tomcat的请求</td></tr><tr><td width="21%">shutdown</td><td width="52%">指定向端口发送的命令字符串</td></tr><tr><td width="27%">service</td><td width="21%">name</td><td width="52%">指定service的名字</td></tr><tr><td width="27%" rowspan="7">Connector<br />(表示客户端和service之间的连接)</td><td width="21%">port</td><td width="52%">指定服务器端要创建的端口号，并在这个断口监听来自客户端的请求</td></tr><tr><td width="21%">minProcessors</td><td width="52%">服务器启动时创建的处理请求的线程数</td></tr><tr><td width="21%">maxProcessors</td><td width="52%">最大可以创建的处理请求的线程数</td></tr><tr><td width="21%">enableLookups</td><td width="52%">如果为true，则可以通过调用request.getRemoteHost()进行DNS查询来得到远程客户端的实际主机名，若为false则不进行DNS查询，而是返回其ip地址</td></tr><tr><td width="21%">redirectPort</td><td width="52%">指定服务器正在处理http请求时收到了一个SSL传输请求后重定向的端口号</td></tr><tr><td width="21%">acceptCount</td><td width="52%">指定当所有可以使用的处理请求的线程数都被使用时，可以放到处理队列中的请求数，超过这个数的请求将不予处理</td></tr><tr><td width="21%">connectionTimeout</td><td width="52%">指定超时的时间数(以毫秒为单位)</td></tr><tr><td width="27%">Engine<br />(表示指定service中的请求处理机，接收和处理来自Connector的请求)</td><td width="21%">defaultHost</td><td width="52%">指定缺省的处理请求的主机名，它至少与其中的一个host元素的name属性值是一样的</td></tr><tr><td width="27%" rowspan="3">Context<br />(表示一个web应用程序，通常为WAR文件，关于WAR的具体信息见servlet规范)</td><td width="21%">docBase</td><td width="52%">应用程序的路径或者是WAR文件存放的路径</td></tr><tr><td width="21%">path</td><td width="52%">表示此web应用程序的url的前缀，这样请求的url为http://localhost:8080/path/****</td></tr><tr><td width="21%">reloadable</td><td width="52%">这个属性非常重要，如果为true，则tomcat会自动检测应用程序的/WEB-INF/lib 和/WEB-INF/classes目录的变化，自动装载新的应用程序，我们可以在不重起tomcat的情况下改变应用程序</td></tr><tr><td width="27%" rowspan="3"><p>host<br />(表示一个虚拟主机)</p></td><td width="21%">name</td><td width="52%">指定主机名</td></tr><tr><td width="21%">appBase</td><td width="52%">应用程序基本目录，即存放应用程序的目录</td></tr><tr><td width="21%">unpackWARs</td><td width="52%">如果为true，则tomcat会自动将WAR文件解压，否则不解压，直接从WAR文件中运行应用程序</td></tr><tr><td rowspan="4"><p>Logger<br />(表示日志，调试和错误信息)</p></td><td width="21%">className</td><td width="52%">指定logger使用的类名，此类必须实现org.apache.catalina.Logger 接口</td></tr><tr><td width="21%">prefix</td><td width="52%">指定log文件的前缀</td></tr><tr><td width="21%">suffix</td><td width="52%">指定log文件的后缀</td></tr><tr><td width="21%">timestamp</td><td width="52%">如果为true，则log文件名中要加入时间，如下例:localhost_log.2001-10-04.txt</td></tr><tr><td width="27%"><p>Realm<br />(表示存放用户名，密码及role的数据库)</p></td><td width="21%">className</td><td width="52%">指定Realm使用的类名，此类必须实现org.apache.catalina.Realm接口</td></tr><tr><td rowspan="3"><p>Valve<br />(功能与Logger差不多，其prefix和suffix属性解释和Logger 中的一样)</p></td><td width="21%">className</td><td width="52%"><p>指定Valve使用的类名，如用org.apache.catalina.valves.AccessLogValve类可以记录应用程序的访问信息</p></td></tr><tr><td width="21%">directory</td><td width="52%">指定log文件存放的位置</td></tr><tr><td width="21%">pattern</td><td width="52%">有两个值，common方式记录远程主机名或ip地址，用户名，日期，第一行请求的字符串，HTTP响应代码，发送的字节数。combined方式比common方式记录的值更多</td></tr></tbody></table><p style="font-family: Verdana, Arial, 宋体; font-size: 12px; line-height: 26px; background-color: #ffffcc;">注意：1：经过我测试，我设置Context 的path="",reloadable=true，然后放一个WAR文件到webapps目录，结果tomcat不能检测出此文件(重起tomcat可以)，而把此文件解压，则tomcat会自动检测出这个新的应用程序。如果不能自动检测WAR文件，我们可以利用下面管理中讲的方法来部署应用程序。</p><p style="font-family: Verdana, Arial, 宋体; font-size: 12px; line-height: 26px; background-color: #ffffcc;">2：默认的server.xml中，Realm元素只设置了一个className属性，但此文件中也包含几个通过JDBC连接到数据库进行验证的示例(被注释掉了)，通过Realm元素我们可以实现容器安全管理(Container Managed Security)。</p><p style="font-family: Verdana, Arial, 宋体; font-size: 12px; line-height: 26px; background-color: #ffffcc;">3：还有一些元素我们没有介绍，如Parameter，loader，你可以通过tomcat的文档获取这些元素的信息。</p><p style="font-family: Verdana, Arial, 宋体; font-size: 12px; line-height: 26px; background-color: #ffffcc;">(三)：管理</p><p style="font-family: Verdana, Arial, 宋体; font-size: 12px; line-height: 26px; background-color: #ffffcc;"><strong>1：配置</strong><br />在进行具体的管理之前，我们先给tomcat添加一个用户，使这个用户有权限来进行管理。</p><p style="font-family: Verdana, Arial, 宋体; font-size: 12px; line-height: 26px; background-color: #ffffcc;">打开conf目录下的tomcat-users.xml文件，在相应的位置添加下面一行：</p><table cellspacing="0" cellpadding="5" width="100%" bgcolor="#cccccc" border="1" style="color: #000000; font-family: Verdana, Arial, 宋体; font-size: 12px; line-height: 26px;"><tbody><tr><td><pre style="white-space: pre-wrap; word-wrap: break-word;"><code>  </code> </pre></td></tr></tbody></table><br style="font-family: Verdana, Arial, 宋体; font-size: 12px; line-height: 26px; background-color: #ffffcc;" /><br style="font-family: Verdana, Arial, 宋体; font-size: 12px; line-height: 26px; background-color: #ffffcc;" /><p style="font-family: Verdana, Arial, 宋体; font-size: 12px; line-height: 26px; background-color: #ffffcc;">注意：这一行的最后部分一定是/&gt;,tomcat的文档掉了/符号，如果没有/符号的话，tomcat重起时将无法访问应用程序。通过logs/catalina.out文件你可以看到这个错误的详细信息。</p><p style="font-family: Verdana, Arial, 宋体; font-size: 12px; line-height: 26px; background-color: #ffffcc;">然后重起tomcat，在浏览器中输入http://localhost:8080/manager/，会弹出对话框，输入上面的用户名和密码即可。</p><p style="font-family: Verdana, Arial, 宋体; font-size: 12px; line-height: 26px; background-color: #ffffcc;"><strong>2：应用程序列表</strong><br />在浏览器中输入http://localhost:8080/manager/list，浏览器将会显示如下的信息：</p><table cellspacing="0" cellpadding="5" width="100%" bgcolor="#cccccc" border="1" style="color: #000000; font-family: Verdana, Arial, 宋体; font-size: 12px; line-height: 26px;"><tbody><tr><td><pre style="white-space: pre-wrap; word-wrap: break-word;"><code>OK - Listed applications for virtual host localhost /ex:running:1 /examples:running:1 /webdav:running:0 /tomcat-docs:running:0 /manager:running:0 /:running:0</code> </pre></td></tr></tbody></table><br style="font-family: Verdana, Arial, 宋体; font-size: 12px; line-height: 26px; background-color: #ffffcc;" /><br style="font-family: Verdana, Arial, 宋体; font-size: 12px; line-height: 26px; background-color: #ffffcc;" /><p style="font-family: Verdana, Arial, 宋体; font-size: 12px; line-height: 26px; background-color: #ffffcc;">面的信息分别为应用程序的路径，当前状态(running 或者stopped)，与这个程序相连的session数。</p><p style="font-family: Verdana, Arial, 宋体; font-size: 12px; line-height: 26px; background-color: #ffffcc;"><strong>3：重新装载应用程序</strong><br />在浏览器中输入 http://localhost:8080/manager/reload?path=/examples，浏览器显示如下：</p><table cellspacing="0" cellpadding="5" width="100%" bgcolor="#cccccc" border="1" style="color: #000000; font-family: Verdana, Arial, 宋体; font-size: 12px; line-height: 26px;"><tbody><tr><td><pre style="white-space: pre-wrap; word-wrap: break-word;"><code>OK - Reloaded application at context path /examples   </code> </pre></td></tr></tbody></table><br style="font-family: Verdana, Arial, 宋体; font-size: 12px; line-height: 26px; background-color: #ffffcc;" /><br style="font-family: Verdana, Arial, 宋体; font-size: 12px; line-height: 26px; background-color: #ffffcc;" /><p style="font-family: Verdana, Arial, 宋体; font-size: 12px; line-height: 26px; background-color: #ffffcc;">表示example应用程序装载成功，如果我们将server.xml的Context元素的reloadable属性设为true(见上面表格)，则没必要利用这种方式重新装载应用程序，因为tomcat会自动装载。</p><p style="font-family: Verdana, Arial, 宋体; font-size: 12px; line-height: 26px; background-color: #ffffcc;"><strong>4：显示session信息</strong><br />在浏览器中输入http://localhost:8080/manager/sessions?path=/examples，浏览器显示如下：</p><table cellspacing="0" cellpadding="5" width="100%" bgcolor="#cccccc" border="1" style="color: #000000; font-family: Verdana, Arial, 宋体; font-size: 12px; line-height: 26px;"><tbody><tr><td><pre style="white-space: pre-wrap; word-wrap: break-word;"><code>OK - Session information for application at context path /examples Default maximum session inactive interval 30 minutes   </code> </pre></td></tr></tbody></table><br style="font-family: Verdana, Arial, 宋体; font-size: 12px; line-height: 26px; background-color: #ffffcc;" /><br style="font-family: Verdana, Arial, 宋体; font-size: 12px; line-height: 26px; background-color: #ffffcc;" /><p style="font-family: Verdana, Arial, 宋体; font-size: 12px; line-height: 26px; background-color: #ffffcc;"><strong>5：启动和关闭应用程序</strong><br />在浏览器中输入http://localhost:8080/manager/start?path=/examples和http://localhost:8080/manager/stop?path=/examples分别启动和关闭examples应用程序。</p><p style="font-family: Verdana, Arial, 宋体; font-size: 12px; line-height: 26px; background-color: #ffffcc;"><strong>6：部署及撤销部署</strong><br />WAR有两种组织方式，一种是按一定的目录结构组织文件，一种是一个后缀为WAR的压缩包，因此它的部署方式也有两种：<br />(1)：在浏览器中输入：<code>http://localhost:8080/manager/install?path=/examples&amp;war=file:/c:/examples</code><br />就会将按目录结构组织的WAR部署</p><p style="font-family: Verdana, Arial, 宋体; font-size: 12px; line-height: 26px; background-color: #ffffcc;">(2)：如果输入:<code>http://localhost:8080/manager/install?path=/examples&amp;war=jar:file:/c:/examples.war!/</code><br />就会将按压缩包组织的WAR部署，注意此url后半部分一定要有!/号。</p><p style="font-family: Verdana, Arial, 宋体; font-size: 12px; line-height: 26px; background-color: #ffffcc;">部署后就可以用 http://localhost:8080/examples访问了。</p><p style="font-family: Verdana, Arial, 宋体; font-size: 12px; line-height: 26px; background-color: #ffffcc;">在浏览器中输入：<code>http://localhost:8080/manager/remove?path=/examples</code><br />就会撤销刚才部署的应用程序。</p><p style="font-family: Verdana, Arial, 宋体; font-size: 12px; line-height: 26px; background-color: #ffffcc;">(四)：与apache集成<br />虽然tomcat也可以作web服务器,但其处理静态html的速度比不上apache,且其作为web服务器的功能远不如apache,因此我们想把apache和tomcat集成起来。</p><p style="font-family: Verdana, Arial, 宋体; font-size: 12px; line-height: 26px; background-color: #ffffcc;">我们以linux系统为例介绍.</p><p style="font-family: Verdana, Arial, 宋体; font-size: 12px; line-height: 26px; background-color: #ffffcc;">从apache网站下载<u>apache1.3.22源代码版本</u>，然后使用如下命令配置安装apache：</p><table cellspacing="0" cellpadding="5" width="100%" bgcolor="#cccccc" border="1" style="color: #000000; font-family: Verdana, Arial, 宋体; font-size: 12px; line-height: 26px;"><tbody><tr><td><pre style="white-space: pre-wrap; word-wrap: break-word;"><code>mkdir /usr/local/apache tar zxvf apache.1.32.tar.gz cd apache.1.32 ./configure --prefix=/usr/local/apache --enable-module=so  make make install </code> </pre></td></tr></tbody></table><br style="font-family: Verdana, Arial, 宋体; font-size: 12px; line-height: 26px; background-color: #ffffcc;" /><br style="font-family: Verdana, Arial, 宋体; font-size: 12px; line-height: 26px; background-color: #ffffcc;" /><p style="font-family: Verdana, Arial, 宋体; font-size: 12px; line-height: 26px; background-color: #ffffcc;">注意configure命令指定目标安装目录，并且加入DSO(Dynamic Shared Object)支持，注意一定不要忘了这一个选项。</p><p style="font-family: Verdana, Arial, 宋体; font-size: 12px; line-height: 26px; background-color: #ffffcc;">然后下载<u>webapp模块</u>，将解压后mod_webapp.so文件放入apache的libexec目录，编辑apache的conf目录下的httpd.conf，在这个文件的最后加入下面三行：</p><table cellspacing="0" cellpadding="5" width="100%" bgcolor="#cccccc" border="1" style="color: #000000; font-family: Verdana, Arial, 宋体; font-size: 12px; line-height: 26px;"><tbody><tr><td><pre style="white-space: pre-wrap; word-wrap: break-word;"><code>LoadModule webapp_module libexec/mod_webapp.so WebAppConnection warpConnection warp localhost:8008 WebAppDeploy examples warpConnection /examples/  </code> </pre></td></tr></tbody></table><br style="font-family: Verdana, Arial, 宋体; font-size: 12px; line-height: 26px; background-color: #ffffcc;" /><br style="font-family: Verdana, Arial, 宋体; font-size: 12px; line-height: 26px; background-color: #ffffcc;" /><p style="font-family: Verdana, Arial, 宋体; font-size: 12px; line-height: 26px; background-color: #ffffcc;">第一行是加入webapp模块，如果编译apache时不增加DSO支持，则无法使用LoadModule指令，第二行指定tomcat与apache的连接，第三行指定部署那个应用，这两个指令使用格式如下：</p><table cellspacing="0" cellpadding="5" width="100%" bgcolor="#cccccc" border="1" style="color: #000000; font-family: Verdana, Arial, 宋体; font-size: 12px; line-height: 26px;"><tbody><tr><td><pre style="white-space: pre-wrap; word-wrap: break-word;"><code>WebAppConnection [connection name] [provider] [host:port] WebAppDeploy [application name] [connection name] [url path]   </code> </pre></td></tr></tbody></table><br style="font-family: Verdana, Arial, 宋体; font-size: 12px; line-height: 26px; background-color: #ffffcc;" /><br style="font-family: Verdana, Arial, 宋体; font-size: 12px; line-height: 26px; background-color: #ffffcc;" /><p style="font-family: Verdana, Arial, 宋体; font-size: 12px; line-height: 26px; background-color: #ffffcc;">其中connection name指定连接名，provider只能是warp，port端口与你的tomcat的配置文件server.xml最后几行指定的要保持一致。文件如下：</p><table cellspacing="0" cellpadding="5" width="100%" bgcolor="#cccccc" border="1" style="color: #000000; font-family: Verdana, Arial, 宋体; font-size: 12px; line-height: 26px;"><tbody><tr><td><pre style="white-space: pre-wrap; word-wrap: break-word;"><code><service name="Tomcat-Apache">  <connector debug="0" acceptcount="10" enablelookups="true" maxprocessors="75" minprocessors="5" port="8008" classname="org.apache.catalina.connector.warp.WarpConnector"> ****** </connector></service>  </code> </pre></td></tr></tbody></table><br style="font-family: Verdana, Arial, 宋体; font-size: 12px; line-height: 26px; background-color: #ffffcc;" /><br style="font-family: Verdana, Arial, 宋体; font-size: 12px; line-height: 26px; background-color: #ffffcc;" /><p style="font-family: Verdana, Arial, 宋体; font-size: 12px; line-height: 26px; background-color: #ffffcc;">application name与你在tomcat中部署的应用名一致，url path指定访问这个应用的url。例如上面的例子可以通过http://localhost/examples/来访问tomcat中的examples应用。</p><p style="font-family: Verdana, Arial, 宋体; font-size: 12px; line-height: 26px; background-color: #ffffcc;">(五)：中文问题<br />一般jsp的乱码问题可以通过在jsp中加入&lt;%@ page contentType="text/html;charset=GB2312" %&gt;来解决，至于servlet的乱码在可以使用servlet2.3中提供的HttpServeletRequest.setCharacterEncoding函数。更详细的中文问题请见<u>JSP/Servlet 中的汉字编码问题</u>。</p><p style="font-family: Verdana, Arial, 宋体; font-size: 12px; line-height: 26px; background-color: #ffffcc;">四：综述<br />tomcat作为一个servlet(jsp也被编译为servlet执行)容器，其应用前景是非常好的，如果与<u>jboss</u>结合起来，则可以实现sun的j2ee规范(用jboss作ejb服务器)。jboss的官方网站也提供集成了tomcat3.2*的jboss以供下载。另外一个开源的应用服务器(<u>enhydra</u>) 也是基于tomcat的，其提供了更友好的管理界面，部署应用程序也更简单，功能也更强大。</p><p style="font-family: Verdana, Arial, 宋体; font-size: 12px; line-height: 26px; background-color: #ffffcc;">参考资料：</p><ul style="font-family: Verdana, Arial, 宋体; font-size: 12px; line-height: 26px; background-color: #ffffcc;"><li><u>tomcat文档</u></li><li><u>www.jguru.com的tomcat faq</u></li><li><u>apache的文档</u></li><li></li></ul><img src ="http://www.cppblog.com/vallygirl/aggbug/208203.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.cppblog.com/vallygirl/" target="_blank">ekong</a> 2014-09-02 15:50 <a href="http://www.cppblog.com/vallygirl/archive/2014/09/02/Tomcat.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>OBIEE了解之问与答（转载） </title><link>http://www.cppblog.com/vallygirl/archive/2013/06/01/OBIEE.html</link><dc:creator>ekong</dc:creator><author>ekong</author><pubDate>Sat, 01 Jun 2013 03:06:00 GMT</pubDate><guid>http://www.cppblog.com/vallygirl/archive/2013/06/01/OBIEE.html</guid><wfw:comment>http://www.cppblog.com/vallygirl/comments/200737.html</wfw:comment><comments>http://www.cppblog.com/vallygirl/archive/2013/06/01/OBIEE.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.cppblog.com/vallygirl/comments/commentRss/200737.html</wfw:commentRss><trackback:ping>http://www.cppblog.com/vallygirl/services/trackbacks/200737.html</trackback:ping><description><![CDATA[<p style="word-wrap: break-word; margin: 0px; padding: 0px; color: #666666; font-family: Arial, sans-serif, Helvetica, Tahoma; font-size: 12px; line-height: 18px; background-color: #ffffff;"><span style="word-wrap: break-word; color: #ff0000;"><span style="word-wrap: break-word; font-size: x-small;">OBIEE</span></span><span style="word-wrap: break-word; font-size: x-small;">&nbsp;之问与答：</span></p><p style="word-wrap: break-word; margin: 0px; padding: 0px; color: #666666; font-family: Arial, sans-serif, Helvetica, Tahoma; font-size: 12px; line-height: 18px; background-color: #ffffff;"><span style="word-wrap: break-word; font-size: x-small;"><br style="word-wrap: break-word;" /></span></p><p style="word-wrap: break-word; margin: 0px; padding: 0px; color: #666666; font-family: Arial, sans-serif, Helvetica, Tahoma; font-size: 12px; line-height: 18px; background-color: #ffffff;"><strong style="word-wrap: break-word;"><span style="word-wrap: break-word; font-size: x-small;">Q:OBIEE能做什么？</span></strong></p><p style="word-wrap: break-word; margin: 0px; padding: 0px; color: #666666; font-family: Arial, sans-serif, Helvetica, Tahoma; font-size: 12px; line-height: 18px; background-color: #ffffff;"><span style="word-wrap: break-word; font-size: x-small;">1，来自于数据库的数据报表</span></p><p style="word-wrap: break-word; margin: 0px; padding: 0px; color: #666666; font-family: Arial, sans-serif, Helvetica, Tahoma; font-size: 12px; line-height: 18px; background-color: #ffffff;"><span style="word-wrap: break-word; font-size: x-small;">2，提供展现内容的一个web平台</span></p><p style="word-wrap: break-word; margin: 0px; padding: 0px; color: #666666; font-family: Arial, sans-serif, Helvetica, Tahoma; font-size: 12px; line-height: 18px; background-color: #ffffff;"><span style="word-wrap: break-word; font-size: x-small;"><br style="word-wrap: break-word;" /></span></p><p style="word-wrap: break-word; margin: 0px; padding: 0px; color: #666666; font-family: Arial, sans-serif, Helvetica, Tahoma; font-size: 12px; line-height: 18px; background-color: #ffffff;"><strong style="word-wrap: break-word;"><span style="word-wrap: break-word; font-size: x-small;">Q:OBIEE是一个数据库吗？</span></strong></p><p style="word-wrap: break-word; margin: 0px; padding: 0px; color: #666666; font-family: Arial, sans-serif, Helvetica, Tahoma; font-size: 12px; line-height: 18px; background-color: #ffffff;"><span style="word-wrap: break-word; font-size: x-small;">不是。</span></p><p style="word-wrap: break-word; margin: 0px; padding: 0px; color: #666666; font-family: Arial, sans-serif, Helvetica, Tahoma; font-size: 12px; line-height: 18px; background-color: #ffffff;"><span style="word-wrap: break-word; font-size: x-small;"><br style="word-wrap: break-word;" /></span></p><p style="word-wrap: break-word; margin: 0px; padding: 0px; color: #666666; font-family: Arial, sans-serif, Helvetica, Tahoma; font-size: 12px; line-height: 18px; background-color: #ffffff;"><strong style="word-wrap: break-word;"><span style="word-wrap: break-word; font-size: x-small;">Q:OBIEE支持的数据库有哪些？</span></strong></p><p style="word-wrap: break-word; margin: 0px; padding: 0px; color: #666666; font-family: Arial, sans-serif, Helvetica, Tahoma; font-size: 12px; line-height: 18px; background-color: #ffffff;"><span style="word-wrap: break-word; font-size: x-small;">1. Oracle<br style="word-wrap: break-word;" />2. SQL Server<br style="word-wrap: break-word;" />3. DB2<br style="word-wrap: break-word;" />4. MySQL<br style="word-wrap: break-word;" />5. ODBC Sources<br style="word-wrap: break-word;" />6. MS Access<br style="word-wrap: break-word;" />7. SyBase<br style="word-wrap: break-word;" />8. Redbrick<br style="word-wrap: break-word;" />9. SAP BW<br style="word-wrap: break-word;" />10. SQL Anywhere<br style="word-wrap: break-word;" />11. DB2 AS400<br style="word-wrap: break-word;" />12. Informix<br style="word-wrap: break-word;" />13. Netezza<br style="word-wrap: break-word;" />14. Times Ten</span></p><p style="word-wrap: break-word; margin: 0px; padding: 0px; color: #666666; font-family: Arial, sans-serif, Helvetica, Tahoma; font-size: 12px; line-height: 18px; background-color: #ffffff;"><span style="word-wrap: break-word; font-size: x-small;"><br style="word-wrap: break-word;" /></span></p><p style="word-wrap: break-word; margin: 0px; padding: 0px; color: #666666; font-family: Arial, sans-serif, Helvetica, Tahoma; font-size: 12px; line-height: 18px; background-color: #ffffff;"><strong style="word-wrap: break-word;"><span style="word-wrap: break-word; font-size: x-small;">Q</span></strong><span style="word-wrap: break-word; font-size: x-small;">&nbsp;<strong style="word-wrap: break-word;">:OBIEE支持其他的数据源吗？</strong>&nbsp;<br style="word-wrap: break-word;" />支持。比如excel，XML,Oracle OLAP,Oracle Essbase,MS Analysic Service</span></p><p style="word-wrap: break-word; margin: 0px; padding: 0px; color: #666666; font-family: Arial, sans-serif, Helvetica, Tahoma; font-size: 12px; line-height: 18px; background-color: #ffffff;"><span style="word-wrap: break-word; font-size: x-small;"><br style="word-wrap: break-word;" /></span></p><p style="word-wrap: break-word; margin: 0px; padding: 0px; color: #666666; font-family: Arial, sans-serif, Helvetica, Tahoma; font-size: 12px; line-height: 18px; background-color: #ffffff;"><strong style="word-wrap: break-word;"><span style="word-wrap: break-word; font-size: x-small;">Q:OBIEE还能做什么？</span></strong></p><p style="word-wrap: break-word; margin: 0px; padding: 0px; color: #666666; font-family: Arial, sans-serif, Helvetica, Tahoma; font-size: 12px; line-height: 18px; background-color: #ffffff;"><span style="word-wrap: break-word; font-size: x-small;">1，创建网页--交互式仪表盘</span></p><p style="word-wrap: break-word; margin: 0px; padding: 0px; color: #666666; font-family: Arial, sans-serif, Helvetica, Tahoma; font-size: 12px; line-height: 18px; background-color: #ffffff;"><span style="word-wrap: break-word; font-size: x-small;">2，报表制作--Answer</span></p><p style="word-wrap: break-word; margin: 0px; padding: 0px; color: #666666; font-family: Arial, sans-serif, Helvetica, Tahoma; font-size: 12px; line-height: 18px; background-color: #ffffff;"><span style="word-wrap: break-word; font-size: x-small;">3，发送报表和消息--Delivers(Ibot)</span></p><p style="word-wrap: break-word; margin: 0px; padding: 0px; color: #666666; font-family: Arial, sans-serif, Helvetica, Tahoma; font-size: 12px; line-height: 18px; background-color: #ffffff;"><span style="word-wrap: break-word; font-size: x-small;">4，完美的报表--BI Publisher</span></p><p style="word-wrap: break-word; margin: 0px; padding: 0px; color: #666666; font-family: Arial, sans-serif, Helvetica, Tahoma; font-size: 12px; line-height: 18px; background-color: #ffffff;"><span style="word-wrap: break-word; font-size: x-small;"><br style="word-wrap: break-word;" /></span></p><p style="word-wrap: break-word; margin: 0px; padding: 0px; color: #666666; font-family: Arial, sans-serif, Helvetica, Tahoma; font-size: 12px; line-height: 18px; background-color: #ffffff;"><strong style="word-wrap: break-word;"><span style="word-wrap: break-word; font-size: x-small;">Q:OBIEE的主要特性有哪些？</span></strong></p><p style="word-wrap: break-word; margin: 0px; padding: 0px; color: #666666; font-family: Arial, sans-serif, Helvetica, Tahoma; font-size: 12px; line-height: 18px; background-color: #ffffff;"><span style="word-wrap: break-word; font-size: x-small;">1，支持层级钻取</span></p><p style="word-wrap: break-word; margin: 0px; padding: 0px; color: #666666; font-family: Arial, sans-serif, Helvetica, Tahoma; font-size: 12px; line-height: 18px; background-color: #ffffff;"><span style="word-wrap: break-word; font-size: x-small;">2，图形化的报表(图表，透视图，计量器等)</span></p><p style="word-wrap: break-word; margin: 0px; padding: 0px; color: #666666; font-family: Arial, sans-serif, Helvetica, Tahoma; font-size: 12px; line-height: 18px; background-color: #ffffff;"><span style="word-wrap: break-word; font-size: x-small;">3，按计划的报表生成</span></p><p style="word-wrap: break-word; margin: 0px; padding: 0px; color: #666666; font-family: Arial, sans-serif, Helvetica, Tahoma; font-size: 12px; line-height: 18px; background-color: #ffffff;"><span style="word-wrap: break-word; font-size: x-small;">4，广泛的支持和开发能力</span></p><p style="word-wrap: break-word; margin: 0px; padding: 0px; color: #666666; font-family: Arial, sans-serif, Helvetica, Tahoma; font-size: 12px; line-height: 18px; background-color: #ffffff;"><span style="word-wrap: break-word; font-size: x-small;"><br style="word-wrap: break-word;" /></span></p><p style="word-wrap: break-word; margin: 0px; padding: 0px; color: #666666; font-family: Arial, sans-serif, Helvetica, Tahoma; font-size: 12px; line-height: 18px; background-color: #ffffff;"><strong style="word-wrap: break-word;"><span style="word-wrap: break-word; font-size: x-small;">Q:与其他BI产品相比，OBIEE有哪些优势？</span></strong></p><p style="word-wrap: break-word; margin: 0px; padding: 0px; color: #666666; font-family: Arial, sans-serif, Helvetica, Tahoma; font-size: 12px; line-height: 18px; background-color: #ffffff;"><span style="word-wrap: break-word; font-size: x-small;">1，基于局域网的部署</span></p><p style="word-wrap: break-word; margin: 0px; padding: 0px; color: #666666; font-family: Arial, sans-serif, Helvetica, Tahoma; font-size: 12px; line-height: 18px; background-color: #ffffff;"><span style="word-wrap: break-word; font-size: x-small;">2，可伸缩性</span></p><p style="word-wrap: break-word; margin: 0px; padding: 0px; color: #666666; font-family: Arial, sans-serif, Helvetica, Tahoma; font-size: 12px; line-height: 18px; background-color: #ffffff;"><span style="word-wrap: break-word; font-size: x-small;">3，基于开发标准</span></p><p style="word-wrap: break-word; margin: 0px; padding: 0px; color: #666666; font-family: Arial, sans-serif, Helvetica, Tahoma; font-size: 12px; line-height: 18px; background-color: #ffffff;"><span style="word-wrap: break-word; font-size: x-small;">4，可以部署在所有平台上</span></p><p style="word-wrap: break-word; margin: 0px; padding: 0px; color: #666666; font-family: Arial, sans-serif, Helvetica, Tahoma; font-size: 12px; line-height: 18px; background-color: #ffffff;"><span style="word-wrap: break-word; font-size: x-small;"><br style="word-wrap: break-word;" /></span></p><p style="word-wrap: break-word; margin: 0px; padding: 0px; color: #666666; font-family: Arial, sans-serif, Helvetica, Tahoma; font-size: 12px; line-height: 18px; background-color: #ffffff;"><strong style="word-wrap: break-word;"><span style="word-wrap: break-word; font-size: x-small;">Q:使用OBIEE可以带来什么好处？</span></strong></p><p style="word-wrap: break-word; margin: 0px; padding: 0px; color: #666666; font-family: Arial, sans-serif, Helvetica, Tahoma; font-size: 12px; line-height: 18px; background-color: #ffffff;"><span style="word-wrap: break-word; font-size: x-small;">1，降低制作报表的难度</span></p><p style="word-wrap: break-word; margin: 0px; padding: 0px; color: #666666; font-family: Arial, sans-serif, Helvetica, Tahoma; font-size: 12px; line-height: 18px; background-color: #ffffff;"><span style="word-wrap: break-word; font-size: x-small;">2，移除报表制作中的冗余</span></p><p style="word-wrap: break-word; margin: 0px; padding: 0px; color: #666666; font-family: Arial, sans-serif, Helvetica, Tahoma; font-size: 12px; line-height: 18px; background-color: #ffffff;"><span style="word-wrap: break-word; font-size: x-small;">3，缩短报表的制作时间，更多的时间用于分析结果</span></p><p style="word-wrap: break-word; margin: 0px; padding: 0px; color: #666666; font-family: Arial, sans-serif, Helvetica, Tahoma; font-size: 12px; line-height: 18px; background-color: #ffffff;"><span style="word-wrap: break-word; font-size: x-small;">4，当需要有所动作时，高亮显示</span></p><p style="word-wrap: break-word; margin: 0px; padding: 0px; color: #666666; font-family: Arial, sans-serif, Helvetica, Tahoma; font-size: 12px; line-height: 18px; background-color: #ffffff;"><span style="word-wrap: break-word; font-size: x-small;">5，<span id="result_box" style="word-wrap: break-word;"><span style="word-wrap: break-word; background-color: #e6ecf9; color: #000000;">启用单一版本的真相通用数据和报告对象</span></span></span></p><p style="word-wrap: break-word; margin: 0px; padding: 0px; color: #666666; font-family: Arial, sans-serif, Helvetica, Tahoma; font-size: 12px; line-height: 18px; background-color: #ffffff;"><span style="word-wrap: break-word; font-size: x-small;"><br style="word-wrap: break-word;" /></span></p><p style="word-wrap: break-word; margin: 0px; padding: 0px; color: #666666; font-family: Arial, sans-serif, Helvetica, Tahoma; font-size: 12px; line-height: 18px; background-color: #ffffff;"><strong style="word-wrap: break-word;"><span style="word-wrap: break-word; font-size: x-small;">Q:在我的工作中，需要用到OBIEE的哪个组件？</span></strong></p><p style="word-wrap: break-word; margin: 0px; padding: 0px; color: #666666; font-family: Arial, sans-serif, Helvetica, Tahoma; font-size: 12px; line-height: 18px; background-color: #ffffff;"><span style="word-wrap: break-word; font-size: x-small;">如何将更新的最新数据，以同样的格式每天发送报表给高管?</span></p><p style="word-wrap: break-word; margin: 0px; padding: 0px; color: #666666; font-family: Arial, sans-serif, Helvetica, Tahoma; font-size: 12px; line-height: 18px; background-color: #ffffff;"><span style="word-wrap: break-word; font-size: x-small;">-----你需要使用BI的publisher来创建报表，使用Delivers通过邮箱发送。</span></p><p style="word-wrap: break-word; margin: 0px; padding: 0px; color: #666666; font-family: Arial, sans-serif, Helvetica, Tahoma; font-size: 12px; line-height: 18px; background-color: #ffffff;"><span style="word-wrap: break-word; font-size: x-small;"><br style="word-wrap: break-word;" /></span></p><p style="word-wrap: break-word; margin: 0px; padding: 0px; color: #666666; font-family: Arial, sans-serif, Helvetica, Tahoma; font-size: 12px; line-height: 18px; background-color: #ffffff;"><strong style="word-wrap: break-word;"><span style="word-wrap: break-word; font-size: x-small;">Q:需要给予团队一系列着重突出事宜的KPI报表？</span></strong></p><p style="word-wrap: break-word; margin: 0px; padding: 0px; color: #666666; font-family: Arial, sans-serif, Helvetica, Tahoma; font-size: 12px; line-height: 18px; background-color: #ffffff;"><span style="word-wrap: break-word; font-size: x-small;">-----利用Answer来创建报表，然后将这些报表放到仪表盘上即可。</span></p><p style="word-wrap: break-word; margin: 0px; padding: 0px; color: #666666; font-family: Arial, sans-serif, Helvetica, Tahoma; font-size: 12px; line-height: 18px; background-color: #ffffff;"><span style="word-wrap: break-word; font-size: x-small;"><br style="word-wrap: break-word;" /></span></p><p style="word-wrap: break-word; margin: 0px; padding: 0px; color: #666666; font-family: Arial, sans-serif, Helvetica, Tahoma; font-size: 12px; line-height: 18px; background-color: #ffffff;"><strong style="word-wrap: break-word;"><span style="word-wrap: break-word; font-size: x-small;">Q:创建pixel perfect document？</span></strong></p><p style="word-wrap: break-word; margin: 0px; padding: 0px; color: #666666; font-family: Arial, sans-serif, Helvetica, Tahoma; font-size: 12px; line-height: 18px; background-color: #ffffff;"><span style="word-wrap: break-word; font-size: x-small;">-----利用BI的publisher来生成报表，记得利用OBIEE的通用数据集</span></p><p style="word-wrap: break-word; margin: 0px; padding: 0px; color: #666666; font-family: Arial, sans-serif, Helvetica, Tahoma; font-size: 12px; line-height: 18px; background-color: #ffffff;"><span style="word-wrap: break-word; font-size: x-small;"><br style="word-wrap: break-word;" /></span></p><p style="word-wrap: break-word; margin: 0px; padding: 0px; color: #666666; font-family: Arial, sans-serif, Helvetica, Tahoma; font-size: 12px; line-height: 18px; background-color: #ffffff;"><strong style="word-wrap: break-word;"><span style="word-wrap: break-word; font-size: x-small;">Q:如何确保每个人的数据一致？</span></strong></p><p style="word-wrap: break-word; margin: 0px; padding: 0px; color: #666666; font-family: Arial, sans-serif, Helvetica, Tahoma; font-size: 12px; line-height: 18px; background-color: #ffffff;"><span style="word-wrap: break-word; font-size: x-small;">-----保证报表数据来自于同一个数据库</span></p><p style="word-wrap: break-word; margin: 0px; padding: 0px; color: #666666; font-family: Arial, sans-serif, Helvetica, Tahoma; font-size: 12px; line-height: 18px; background-color: #ffffff;"><span style="word-wrap: break-word; font-size: x-small;">-----尽量直接利用仪表盘，回复和BI publisher</span></p><p style="word-wrap: break-word; margin: 0px; padding: 0px; color: #666666; font-family: Arial, sans-serif, Helvetica, Tahoma; font-size: 12px; line-height: 18px; background-color: #ffffff;"><span style="word-wrap: break-word; font-size: x-small;"><br style="word-wrap: break-word;" /></span></p><p style="word-wrap: break-word; margin: 0px; padding: 0px; color: #666666; font-family: Arial, sans-serif, Helvetica, Tahoma; font-size: 12px; line-height: 18px; background-color: #ffffff;"><strong style="word-wrap: break-word;"><span style="word-wrap: break-word; font-size: x-small;">Q:如何提升数据质量？</span></strong></p><p style="word-wrap: break-word; margin: 0px; padding: 0px; color: #666666; font-family: Arial, sans-serif, Helvetica, Tahoma; font-size: 12px; line-height: 18px; background-color: #ffffff;"><span style="word-wrap: break-word; font-size: x-small;">-----在仪表盘展示尽量多的数据，不要隐藏数据</span></p><p style="word-wrap: break-word; margin: 0px; padding: 0px; color: #666666; font-family: Arial, sans-serif, Helvetica, Tahoma; font-size: 12px; line-height: 18px; background-color: #ffffff;"><span style="word-wrap: break-word; font-size: x-small;">-----确保所有的高管报表都来自于OBIEE系统</span></p><p style="word-wrap: break-word; margin: 0px; padding: 0px; color: #666666; font-family: Arial, sans-serif, Helvetica, Tahoma; font-size: 12px; line-height: 18px; background-color: #ffffff;"><span style="word-wrap: break-word; font-size: x-small;"><br style="word-wrap: break-word;" /></span></p><p style="word-wrap: break-word; margin: 0px; padding: 0px; color: #666666; font-family: Arial, sans-serif, Helvetica, Tahoma; font-size: 12px; line-height: 18px; background-color: #ffffff;"><span style="word-wrap: break-word; font-size: x-small;"><br style="word-wrap: break-word;" /></span></p><p style="word-wrap: break-word; margin: 0px; padding: 0px; color: #666666; font-family: Arial, sans-serif, Helvetica, Tahoma; font-size: 12px; line-height: 18px; background-color: #ffffff;"><strong style="word-wrap: break-word;"><span style="word-wrap: break-word; font-size: x-small;">Q:如何保存用于审计的报表？</span></strong></p><p style="word-wrap: break-word; margin: 0px; padding: 0px; color: #666666; font-family: Arial, sans-serif, Helvetica, Tahoma; font-size: 12px; line-height: 18px; background-color: #ffffff;"><span style="word-wrap: break-word; font-size: x-small;">1，使用Deliver通过邮件将仪表盘上的报表的拷贝发送到存储账户</span></p><p style="word-wrap: break-word; margin: 0px; padding: 0px; color: #666666; font-family: Arial, sans-serif, Helvetica, Tahoma; font-size: 12px; line-height: 18px; background-color: #ffffff;"><span style="word-wrap: break-word; font-size: x-small;">2，使用工作簿来保存数据</span></p><p style="word-wrap: break-word; margin: 0px; padding: 0px; color: #666666; font-family: Arial, sans-serif, Helvetica, Tahoma; font-size: 12px; line-height: 18px; background-color: #ffffff;"><span style="word-wrap: break-word; font-size: x-small;">3，将报表保存成PDF或THML的格式，然后保存起来</span></p><p style="word-wrap: break-word; margin: 0px; padding: 0px; color: #666666; font-family: Arial, sans-serif, Helvetica, Tahoma; font-size: 12px; line-height: 18px; background-color: #ffffff;"><span style="word-wrap: break-word; font-size: x-small;"><br style="word-wrap: break-word;" /></span></p><p style="word-wrap: break-word; margin: 0px; padding: 0px; color: #666666; font-family: Arial, sans-serif, Helvetica, Tahoma; font-size: 12px; line-height: 18px; background-color: #ffffff;"><span style="word-wrap: break-word; font-size: x-small;"><br style="word-wrap: break-word;" /></span></p><p style="word-wrap: break-word; margin: 0px; padding: 0px; color: #666666; font-family: Arial, sans-serif, Helvetica, Tahoma; font-size: 12px; line-height: 18px; background-color: #ffffff;"><strong style="word-wrap: break-word;"><span style="word-wrap: break-word; font-size: x-small;">Q:OBIEE适用于哪些部门？</span></strong></p><p style="word-wrap: break-word; margin: 0px; padding: 0px; color: #666666; font-family: Arial, sans-serif, Helvetica, Tahoma; font-size: 12px; line-height: 18px; background-color: #ffffff;"><span style="word-wrap: break-word; font-size: x-small;">1，前台办公</span></p><p style="word-wrap: break-word; margin: 0px; padding: 0px; color: #666666; font-family: Arial, sans-serif, Helvetica, Tahoma; font-size: 12px; line-height: 18px; background-color: #ffffff;"><span style="word-wrap: break-word; font-size: x-small;">2，风险分析部门</span></p><p style="word-wrap: break-word; margin: 0px; padding: 0px; color: #666666; font-family: Arial, sans-serif, Helvetica, Tahoma; font-size: 12px; line-height: 18px; background-color: #ffffff;"><span style="word-wrap: break-word; font-size: x-small;">3，财务部门</span></p><p style="word-wrap: break-word; margin: 0px; padding: 0px; color: #666666; font-family: Arial, sans-serif, Helvetica, Tahoma; font-size: 12px; line-height: 18px; background-color: #ffffff;"><span style="word-wrap: break-word; font-size: x-small;">4，产品部门</span></p><p style="word-wrap: break-word; margin: 0px; padding: 0px; color: #666666; font-family: Arial, sans-serif, Helvetica, Tahoma; font-size: 12px; line-height: 18px; background-color: #ffffff;"><span style="word-wrap: break-word; font-size: x-small;">5，区域分布</span></p><p style="word-wrap: break-word; margin: 0px; padding: 0px; color: #666666; font-family: Arial, sans-serif, Helvetica, Tahoma; font-size: 12px; line-height: 18px; background-color: #ffffff;"><span style="word-wrap: break-word; font-size: x-small;">6，市场部门</span></p><p style="word-wrap: break-word; margin: 0px; padding: 0px; color: #666666; font-family: Arial, sans-serif, Helvetica, Tahoma; font-size: 12px; line-height: 18px; background-color: #ffffff;"><span style="word-wrap: break-word; font-size: x-small;">7，销售部门</span></p><p style="word-wrap: break-word; margin: 0px; padding: 0px; color: #666666; font-family: Arial, sans-serif, Helvetica, Tahoma; font-size: 12px; line-height: 18px; background-color: #ffffff;"><span style="word-wrap: break-word; font-size: x-small;"><br style="word-wrap: break-word;" /></span></p><p style="word-wrap: break-word; margin: 0px; padding: 0px; color: #666666; font-family: Arial, sans-serif, Helvetica, Tahoma; font-size: 12px; line-height: 18px; background-color: #ffffff;"><strong style="word-wrap: break-word;"><span style="word-wrap: break-word; font-size: x-small;">Q:什么样规模的公司应该使用OBIEE？</span></strong></p><p style="word-wrap: break-word; margin: 0px; padding: 0px; color: #666666; font-family: Arial, sans-serif, Helvetica, Tahoma; font-size: 12px; line-height: 18px; background-color: #ffffff;"><span style="word-wrap: break-word; font-size: x-small;">1，非常大---跨国公司，银行，矿业</span></p><p style="word-wrap: break-word; margin: 0px; padding: 0px; color: #666666; font-family: Arial, sans-serif, Helvetica, Tahoma; font-size: 12px; line-height: 18px; background-color: #ffffff;"><span style="word-wrap: break-word; font-size: x-small;">2，大---政府机构，技术部门，工厂，咨询公司</span></p><p style="word-wrap: break-word; margin: 0px; padding: 0px; color: #666666; font-family: Arial, sans-serif, Helvetica, Tahoma; font-size: 12px; line-height: 18px; background-color: #ffffff;"><span style="word-wrap: break-word; font-size: x-small;">3，军事---国防部，军队，海军，空间</span></p><p style="word-wrap: break-word; margin: 0px; padding: 0px; color: #666666; font-family: Arial, sans-serif, Helvetica, Tahoma; font-size: 12px; line-height: 18px; background-color: #ffffff;"><span style="word-wrap: break-word; font-size: x-small;">4，中型---零售业，运输</span></p><p style="word-wrap: break-word; margin: 0px; padding: 0px; color: #666666; font-family: Arial, sans-serif, Helvetica, Tahoma; font-size: 12px; line-height: 18px; background-color: #ffffff;"><span style="word-wrap: break-word; font-size: x-small;">5，小型---咨询公司，俱乐部</span></p><p style="word-wrap: break-word; margin: 0px; padding: 0px; color: #666666; font-family: Arial, sans-serif, Helvetica, Tahoma; font-size: 12px; line-height: 18px; background-color: #ffffff;"><span style="word-wrap: break-word; font-size: x-small;">只要有数据分析需求的公司或组织都可以用。</span></p><p style="word-wrap: break-word; margin: 0px; padding: 0px; color: #666666; font-family: Arial, sans-serif, Helvetica, Tahoma; font-size: 12px; line-height: 18px; background-color: #ffffff;"><span style="word-wrap: break-word; font-size: x-small;"><br style="word-wrap: break-word;" /></span></p><p style="word-wrap: break-word; margin: 0px; padding: 0px; color: #666666; font-family: Arial, sans-serif, Helvetica, Tahoma; font-size: 12px; line-height: 18px; background-color: #ffffff;"><strong style="word-wrap: break-word;"><span style="word-wrap: break-word; font-size: x-small;">Q:我应该从哪里开始？</span></strong></p><p style="word-wrap: break-word; margin: 0px; padding: 0px; color: #666666; font-family: Arial, sans-serif, Helvetica, Tahoma; font-size: 12px; line-height: 18px; background-color: #ffffff;"><span style="word-wrap: break-word; font-size: x-small;">1，从Oracle获取OBIEE拷贝(就是贵点)</span></p><p style="word-wrap: break-word; margin: 0px; padding: 0px; color: #666666; font-family: Arial, sans-serif, Helvetica, Tahoma; font-size: 12px; line-height: 18px; background-color: #ffffff;"><span style="word-wrap: break-word; font-size: x-small;">2，培训一些内部的员工如何使用该产品</span></p><p style="word-wrap: break-word; margin: 0px; padding: 0px; color: #666666; font-family: Arial, sans-serif, Helvetica, Tahoma; font-size: 12px; line-height: 18px; background-color: #ffffff;"><span style="word-wrap: break-word; font-size: x-small;">3，加入UKOUG</span></p><p style="word-wrap: break-word; margin: 0px; padding: 0px; color: #666666; font-family: Arial, sans-serif, Helvetica, Tahoma; font-size: 12px; line-height: 18px; background-color: #ffffff;"><span style="word-wrap: break-word; font-size: x-small;">4，go to the User Group conferences</span></p><p style="word-wrap: break-word; margin: 0px; padding: 0px; color: #666666; font-family: Arial, sans-serif, Helvetica, Tahoma; font-size: 12px; line-height: 18px; background-color: #ffffff;"><span style="word-wrap: break-word; font-size: x-small;">5，向集成商咨询</span></p><p style="word-wrap: break-word; margin: 0px; padding: 0px; color: #666666; font-family: Arial, sans-serif, Helvetica, Tahoma; font-size: 12px; line-height: 18px; background-color: #ffffff;"><span style="word-wrap: break-word; font-size: x-small;"><br style="word-wrap: break-word;" /></span></p><p style="word-wrap: break-word; margin: 0px; padding: 0px; color: #666666; font-family: Arial, sans-serif, Helvetica, Tahoma; font-size: 12px; line-height: 18px; background-color: #ffffff;"><strong style="word-wrap: break-word;"><span style="word-wrap: break-word; font-size: x-small;">Q:对于OBEE有什么建议吗？</span></strong></p><p style="word-wrap: break-word; margin: 0px; padding: 0px; color: #666666; font-family: Arial, sans-serif, Helvetica, Tahoma; font-size: 12px; line-height: 18px; background-color: #ffffff;"><span style="word-wrap: break-word; font-size: x-small;">1，运行一个小的POC</span></p><p style="word-wrap: break-word; margin: 0px; padding: 0px; color: #666666; font-family: Arial, sans-serif, Helvetica, Tahoma; font-size: 12px; line-height: 18px; background-color: #ffffff;"><span style="word-wrap: break-word; font-size: x-small;">2，评估OBIEE对公司的益处</span></p><p style="word-wrap: break-word; margin: 0px; padding: 0px; color: #666666; font-family: Arial, sans-serif, Helvetica, Tahoma; font-size: 12px; line-height: 18px; background-color: #ffffff;"><span style="word-wrap: break-word; font-size: x-small;">3，使用富有经验的OBIEE业务分析师</span></p><p style="word-wrap: break-word; margin: 0px; padding: 0px; color: #666666; font-family: Arial, sans-serif, Helvetica, Tahoma; font-size: 12px; line-height: 18px; background-color: #ffffff;"><span style="word-wrap: break-word; font-size: x-small;">4，以敏捷或快速应用开发的方式与最终使用者开展工作</span></p><p style="word-wrap: break-word; margin: 0px; padding: 0px; color: #666666; font-family: Arial, sans-serif, Helvetica, Tahoma; font-size: 12px; line-height: 18px; background-color: #ffffff;"><span style="word-wrap: break-word; font-size: x-small;">5，构建一个报表平台让终端用户使用</span></p><p style="word-wrap: break-word; margin: 0px; padding: 0px; color: #666666; font-family: Arial, sans-serif, Helvetica, Tahoma; font-size: 12px; line-height: 18px; background-color: #ffffff;"><span style="word-wrap: break-word; font-size: x-small;">6，专注于多维模型</span></p><p style="word-wrap: break-word; margin: 0px; padding: 0px; color: #666666; font-family: Arial, sans-serif, Helvetica, Tahoma; font-size: 12px; line-height: 18px; background-color: #ffffff;"><span style="word-wrap: break-word; font-size: x-small;">7，向专家咨询</span></p><p style="word-wrap: break-word; margin: 0px; padding: 0px; color: #666666; font-family: Arial, sans-serif, Helvetica, Tahoma; font-size: 12px; line-height: 18px; background-color: #ffffff;"><span style="word-wrap: break-word; font-size: x-small;"><br style="word-wrap: break-word;" /></span></p><p style="word-wrap: break-word; margin: 0px; padding: 0px; color: #666666; font-family: Arial, sans-serif, Helvetica, Tahoma; font-size: 12px; line-height: 18px; background-color: #ffffff;"><span style="word-wrap: break-word; color: #3366ff;"><span style="word-wrap: break-word; font-size: x-small;">记住：对于任何报表项目，绝大部分都是关于数据库的。无论你的报表多么图形化还或者布局美观，他们都依赖于数据库的速度和精度。OBIEE不是报表的银弹，但是它应该是你解决这类问题的重要选择。</span></span>&nbsp;</p><img src ="http://www.cppblog.com/vallygirl/aggbug/200737.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.cppblog.com/vallygirl/" target="_blank">ekong</a> 2013-06-01 11:06 <a href="http://www.cppblog.com/vallygirl/archive/2013/06/01/OBIEE.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>Informatica PowerCenter 9 Installation and Configuration Complete Guide</title><link>http://www.cppblog.com/vallygirl/archive/2013/02/25/informtica.html</link><dc:creator>ekong</dc:creator><author>ekong</author><pubDate>Mon, 25 Feb 2013 03:00:00 GMT</pubDate><guid>http://www.cppblog.com/vallygirl/archive/2013/02/25/informtica.html</guid><wfw:comment>http://www.cppblog.com/vallygirl/comments/198059.html</wfw:comment><comments>http://www.cppblog.com/vallygirl/archive/2013/02/25/informtica.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.cppblog.com/vallygirl/comments/commentRss/198059.html</wfw:commentRss><trackback:ping>http://www.cppblog.com/vallygirl/services/trackbacks/198059.html</trackback:ping><description><![CDATA[&nbsp;&nbsp;&nbsp;&nbsp; 摘要: http://www.disoln.org/2012/09/Informatica-PowerCenter-9-Installation-and-Configuration-Complete-Guide.htmlThis article provides complete step by step&nbsp;instruction&nbsp;for installation and configu...&nbsp;&nbsp;<a href='http://www.cppblog.com/vallygirl/archive/2013/02/25/informtica.html'>阅读全文</a><img src ="http://www.cppblog.com/vallygirl/aggbug/198059.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.cppblog.com/vallygirl/" target="_blank">ekong</a> 2013-02-25 11:00 <a href="http://www.cppblog.com/vallygirl/archive/2013/02/25/informtica.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item></channel></rss>