<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/"><channel><title>Tomcat on 豆博草堂</title><link>https://idocbox.com/tags/tomcat/</link><description>Recent content in Tomcat on 豆博草堂</description><generator>Hugo</generator><language>en-us</language><lastBuildDate>Tue, 14 Jun 2011 00:00:00 +0000</lastBuildDate><atom:link href="https://idocbox.com/tags/tomcat/index.xml" rel="self" type="application/rss+xml"/><item><title>Tomcat 6.x 和 Apache 2.2.11 集群负载均衡搭建</title><link>https://idocbox.com/posts/tomcat-6-x-%E5%92%8C-apache-2-2-11-%E9%9B%86%E7%BE%A4%E8%B4%9F%E8%BD%BD%E5%9D%87%E8%A1%A1%E6%90%AD%E5%BB%BA/</link><pubDate>Tue, 14 Jun 2011 00:00:00 +0000</pubDate><guid>https://idocbox.com/posts/tomcat-6-x-%E5%92%8C-apache-2-2-11-%E9%9B%86%E7%BE%A4%E8%B4%9F%E8%BD%BD%E5%9D%87%E8%A1%A1%E6%90%AD%E5%BB%BA/</guid><description>&lt;p&gt;本文根据 &lt;a href="http://www.cnblogs.com/shiyangxt/archive/2009/02/26/1398902.html"&gt;http://www.cnblogs.com/shiyangxt/archive/2009/02/26/1398902.html&lt;/a&gt; 整理，如有不明，请参阅原文。&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;所需软件：&lt;/li&gt;
&lt;/ol&gt;
&lt;ul&gt;
&lt;li&gt;Apache 2.2.11&lt;/li&gt;
&lt;li&gt;Tomcat 6.x压缩版（.zip, .tar等压缩格式的版本）。&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;2. 配置步骤：&lt;/p&gt;
&lt;p&gt;1） 安装Apache 2.2.11。tomcat 集群负载均衡需要apache服务器来配合实现，所以我们需要安装apache。另外，由于apache 2.2.11已经集成了jk2等负载工具，这将简化我们的配置。可以用安装版或解压版安装apache。&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;ul&gt;
&lt;li&gt;如果用windows下安装版安装，根据向导填写相应参数即可完成。&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;ul&gt;
&lt;li&gt;如果用压缩版，需要将apache解压到一个目录下面，然后打开$APACHE_HOME/conf/httd.conf, 根据实际配置下面参数：&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;#apache安装根目录 ServerRoot &amp;ldquo;D:/devCenter/cluster_lab/Apache2.2 &amp;quot; #端口 Listen 80 # ServerAdmin 邮件 #http文档根目录 DocumentRoot &amp;ldquo;D:/devCenter/cluster_lab/Apache2.2/htdocs&amp;rdquo; # # This should be changed to whatever you set DocumentRoot to. # &amp;lt;Directory &amp;ldquo;D:/devCenter/cluster_lab/Apache2.2/htdocs&amp;rdquo;&amp;gt; # # Possible values for the Options directive are &amp;ldquo;None&amp;rdquo;, &amp;ldquo;All&amp;rdquo;, # or any combination of: # Indexes Includes FollowSymLinks SymLinksifOwnerMatch ExecCGI MultiViews # # Note that &amp;ldquo;MultiViews&amp;rdquo; must be named *explicitly* &amp;mdash; &amp;ldquo;Options All&amp;rdquo; # doesn&amp;rsquo;t give it to you. # # The Options directive is both complicated and important. Please see # &lt;a href="http://httpd.apache.org/docs/2.2/mod/core.html#options"&gt;http://httpd.apache.org/docs/2.2/mod/core.html#options&lt;/a&gt; # for more information. Options Indexes FollowSymLinks # # AllowOverride controls what directives may be placed in .htaccess files. # It can be &amp;ldquo;All&amp;rdquo;, &amp;ldquo;None&amp;rdquo;, or any combination of the keywords: # Options FileInfo AuthConfig Limit # AllowOverride None # # Controls who can get stuff from this server. # Order allow,deny Allow from all &lt;!-- raw HTML omitted --&gt; &amp;lt;IfModule alias_module&amp;gt; # directives as to Alias. ScriptAlias /cgi-bin/ &amp;ldquo;D:/devCenter/cluster_lab/Apache2.2/cgi-bin/&amp;rdquo; &lt;!-- raw HTML omitted --&gt; # # &amp;ldquo;D:/devCenter/cluster_lab/Apache2.2/cgi-bin&amp;rdquo; should be changed to whatever your ScriptAliased # CGI directory exists, if you have that configured. # &amp;lt;Directory &amp;ldquo;D:/devCenter/cluster_lab/Apache2.2/cgi-bin&amp;rdquo;&amp;gt; AllowOverride None Options None Order allow,deny Allow from all &lt;!-- raw HTML omitted --&gt;&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;p&gt;2） 启动apache, 然后通过http://localhost/来测试，检查apache是否已经启动。&lt;/p&gt;</description></item><item><title>如何让Tomcat修改后的端口重新在Eclipse中起效？</title><link>https://idocbox.com/posts/%E5%A6%82%E4%BD%95%E8%AE%A9tomcat%E4%BF%AE%E6%94%B9%E5%90%8E%E7%9A%84%E7%AB%AF%E5%8F%A3%E9%87%8D%E6%96%B0%E5%9C%A8eclipse%E4%B8%AD%E8%B5%B7%E6%95%88/</link><pubDate>Tue, 14 Jun 2011 00:00:00 +0000</pubDate><guid>https://idocbox.com/posts/%E5%A6%82%E4%BD%95%E8%AE%A9tomcat%E4%BF%AE%E6%94%B9%E5%90%8E%E7%9A%84%E7%AB%AF%E5%8F%A3%E9%87%8D%E6%96%B0%E5%9C%A8eclipse%E4%B8%AD%E8%B5%B7%E6%95%88/</guid><description>&lt;p&gt;当某个端口被占用后,tomcat就会无法启动，我们需要修改tomcatconfserver.xml端口，如由8080修改为8082，但Eclipse中对于这个tomcat的关联端口却仍为8080, Connector port=&amp;ldquo;8082&amp;rdquo;&amp;hellip; 这时，我们需要作如下操作，打开Eclipse的 windows-&amp;gt;Preference-&amp;gt;Server-&amp;gt;Installed Runtimes,选中我们那个tomcat，将其删除，同时在J2EE试图状态，在Server tab中删除这个server，然后重起eclipse，再重新用 windows-&amp;gt;Preference-&amp;gt;Server-&amp;gt;Installed Runtimes添加tomcat到eclipse即可让eclipse启动tomcat5时用心的端口8082.&lt;/p&gt;
&lt;p&gt;作者：&lt;a href="http://www.idocbox.com/"&gt;豆博草堂&lt;/a&gt;&lt;/p&gt;</description></item></channel></rss>