﻿<?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>BlogJava-zhyiwww -随笔分类-software</title><link>http://www.blogjava.net/zhyiwww/category/9157.html</link><description>用平实的笔，记录编程路上的点点滴滴………</description><language>zh-cn</language><lastBuildDate>Wed, 19 Feb 2014 05:47:30 GMT</lastBuildDate><pubDate>Wed, 19 Feb 2014 05:47:30 GMT</pubDate><ttl>60</ttl><item><title>Windows下的SC命令参考</title><link>http://www.blogjava.net/zhyiwww/archive/2014/02/18/410001.html</link><dc:creator>zhyiwww</dc:creator><author>zhyiwww</author><pubDate>Tue, 18 Feb 2014 12:46:00 GMT</pubDate><guid>http://www.blogjava.net/zhyiwww/archive/2014/02/18/410001.html</guid><wfw:comment>http://www.blogjava.net/zhyiwww/comments/410001.html</wfw:comment><comments>http://www.blogjava.net/zhyiwww/archive/2014/02/18/410001.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.blogjava.net/zhyiwww/comments/commentRss/410001.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/zhyiwww/services/trackbacks/410001.html</trackback:ping><description><![CDATA[<div></div><div>C:\tmp&gt;sc /?</div><div></div><div>错误: &nbsp;未知命令</div><div></div><div>描述:</div><div>&nbsp; &nbsp; &nbsp; &nbsp; SC 是用于与服务控制管理器和服务进行通信的命令行程序。</div><div>用法:</div><div>&nbsp; &nbsp; &nbsp; &nbsp; sc &lt;server&gt; [command] [service name] &lt;option1&gt; &lt;option2&gt;...</div><div></div><div></div><div>&nbsp; &nbsp; &nbsp; &nbsp; 选项 &lt;server&gt; 的格式为 "\\ServerName"</div><div>&nbsp; &nbsp; &nbsp; &nbsp; 键入 "sc [command]" 可以获得有关命令的进一步帮助</div><div>&nbsp; &nbsp; &nbsp; &nbsp; 命令:</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; query-----------查询服务的状态，</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 或枚举服务类型的状态。</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; queryex---------查询服务的扩展状态，</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 或枚举服务类型的状态。</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; start-----------启动服务。</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; pause-----------向服务发送 PAUSE 控制请求。</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; interrogate-----向服务发送 INTERROGATE 控制请求。</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; continue--------向服务发送 CONTINUE 控制请求。</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; stop------------向服务发送 STOP 请求。</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; config----------更改服务的配置(永久)。</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; description-----更改服务的描述。</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; failure---------更改服务失败时执行的操作。</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; failureflag-----更改服务的失败操作标志。</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; sidtype---------更改服务的服务 SID 类型。</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; privs-----------更改服务的所需权限。</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; qc--------------查询服务的配置信息。</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; qdescription----查询服务的描述。</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; qfailure--------查询失败时服务执行的操作。</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; qfailureflag----查询服务的失败操作标志。</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; qsidtype--------查询服务的服务 SID 类型。</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; qprivs----------查询服务的所需权限。</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; qtriggerinfo----查询服务的触发器参数。</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; qpreferrednode--查询首选的服务 NUMA 节点。</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; delete----------(从注册表)删除服务。</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; create----------创建服务(将其添加到注册表)。</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; control---------向服务发送控制。</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; sdshow----------显示服务的安全描述符。</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; sdset-----------设置服务的安全描述符。</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; showsid---------显示相应于假定名称的 SID 字符串。</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; triggerinfo-----配置服务的触发器参数。</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; preferrednode---设置首选的服务 NUMA 节点。</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; GetDisplayName--获取服务的 DisplayName</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; GetKeyName------获取服务的 ServiceKeyName。</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; EnumDepend------枚举服务的依存关系。</div><div></div><div>&nbsp; &nbsp; &nbsp; &nbsp; 下列命令不要求服务名称:</div><div>&nbsp; &nbsp; &nbsp; &nbsp; sc &lt;server&gt; &lt;command&gt; &lt;option&gt;</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; boot------------(ok | bad) 指示是否将上一次启动保存为</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 最近一次已知的正确启动配置</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Lock------------锁定服务数据库</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; QueryLock-------查询 SCManager 数据库的 LockStatus</div><div>示例:</div><div>&nbsp; &nbsp; &nbsp; &nbsp; sc start MyService</div><div></div><div>是否想参阅 QUERY 和 QUERYEX 命令的帮助? [ y | n ]:</div><div>y</div><div></div><div>QUERY 和 QUERYEX 选项:</div><div>&nbsp; &nbsp; &nbsp; &nbsp; 如果查询命令带服务名称，将返回</div><div>&nbsp; &nbsp; &nbsp; &nbsp; 该服务的状态。其他选项不适合这种</div><div>&nbsp; &nbsp; &nbsp; &nbsp; 情况。如果查询命令不带参数或</div><div>&nbsp; &nbsp; &nbsp; &nbsp; 带下列选项之一，将枚举此服务。</div><div>&nbsp; &nbsp; type= &nbsp; &nbsp;要枚举的服务的类型(driver, service, all)</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;默认 = service)</div><div>&nbsp; &nbsp; state= &nbsp; 要枚举的服务的状态 (inactive, all)</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;(默认 = active)</div><div>&nbsp; &nbsp; bufsize= 枚举缓冲区的大小(以字节计)</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;(默认 = 4096)</div><div>&nbsp; &nbsp; ri= &nbsp; &nbsp; &nbsp;开始枚举的恢复索引号</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;(默认 = 0)</div><div>&nbsp; &nbsp; group= &nbsp; 要枚举的服务组</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;(默认 = all groups)</div><div></div><div>语法示例</div><div>sc query &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;- 枚举活动服务和驱动程序的状态</div><div>sc query eventlog &nbsp; &nbsp; &nbsp; - 显示 eventlog 服务的状态</div><div>sc queryex eventlog &nbsp; &nbsp; - 显示 eventlog 服务的扩展状态</div><div>sc query type= driver &nbsp; - 仅枚举活动驱动程序</div><div>sc query type= service &nbsp;- 仅枚举 Win32 服务</div><div>sc query state= all &nbsp; &nbsp; - 枚举所有服务和驱动程序</div><div>sc query bufsize= 50 &nbsp; &nbsp;- 枚举缓冲区为 50 字节</div><div>sc query ri= 14 &nbsp; &nbsp; &nbsp; &nbsp; - 枚举时恢复索引 = 14</div><div>sc queryex group= "" &nbsp; &nbsp;- 枚举不在组内的活动服务</div><div>sc query type= interact - 枚举所有不活动服务</div><div>sc query type= driver group= NDIS &nbsp; &nbsp; - 枚举所有 NDIS 驱动程序</div><div></div><div></div><div>C:\tmp&gt;<br /><br />如果需要查看全部的服务：<br />可以使用 &nbsp;sc query state= all&nbsp;<br /><br />如果我想完成一个自动启动和关闭的oracle 脚本，可以通过如下步骤实现：<br />1)sc query state= all &gt; sl.txt<br />2)findstr "DISPLAY_NAME" sl.txt &gt; asl.txt<br />如下：<br /><div></div><div>C:\tmp&gt;findstr "DISPLAY_NAME" &nbsp;sl.txt</div><div>DISPLAY_NAME: Adobe Acrobat Update Service</div><div>DISPLAY_NAME: Application Experience</div><div>DISPLAY_NAME: Application Layer Gateway Service</div><div>DISPLAY_NAME: AMD External Events Utility</div><div>DISPLAY_NAME: Avira Scheduler</div><div>DISPLAY_NAME: Avira Real-Time Protection</div><div>DISPLAY_NAME: Application Identity</div><div>DISPLAY_NAME: Application Information</div><div>DISPLAY_NAME: Application Management</div><div>DISPLAY_NAME: Windows Audio Endpoint Builder</div><div>DISPLAY_NAME: Windows Audio</div>。。。<br />3)findstr /i "oracle" &nbsp;asl.txt &gt; osl.txt<br />内容:<div>C:\tmp&gt;findstr /i "oracle" asl.txt</div><div>DISPLAY_NAME: OracleDBConsoleorcl</div><div>DISPLAY_NAME: OracleJobSchedulerORCL</div><div>DISPLAY_NAME: OracleMTSRecoveryService</div><div>DISPLAY_NAME: OracleOraDb11g_home1ClrAgent</div><div>DISPLAY_NAME: OracleOraDb11g_home1TNSListener</div><div>DISPLAY_NAME: OracleServiceORCL</div><div>DISPLAY_NAME: Oracle ORCL VSS Writer Service<br />4)在vim中，把DISPLAY_NAME:替换成 net stop 或者net start就可以了：<br /><div><div><br />C:\tmp&gt;gvim osl.txt</div><div></div><div>C:\tmp&gt;type &nbsp;osl.txt</div><div>net stop &nbsp;OracleDBConsoleorcl</div><div>net stop &nbsp;OracleJobSchedulerORCL</div><div>net stop &nbsp;OracleMTSRecoveryService</div><div>net stop &nbsp;OracleOraDb11g_home1ClrAgent</div><div>net stop &nbsp;OracleOraDb11g_home1TNSListener</div><div>net stop &nbsp;OracleServiceORCL</div><div>net stop &nbsp;Oracle ORCL VSS Writer Service</div><div></div><div>net start &nbsp;OracleDBConsoleorcl</div><div>net start &nbsp;OracleJobSchedulerORCL</div><div>net start &nbsp;OracleMTSRecoveryService</div><div>net start &nbsp;OracleOraDb11g_home1ClrAgent</div><div>net start &nbsp;OracleOraDb11g_home1TNSListener</div><div>net start &nbsp;OracleServiceORCL</div><div>net start &nbsp;Oracle ORCL VSS Writer Service</div><div></div></div></div></div><img src ="http://www.blogjava.net/zhyiwww/aggbug/410001.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/zhyiwww/" target="_blank">zhyiwww</a> 2014-02-18 20:46 <a href="http://www.blogjava.net/zhyiwww/archive/2014/02/18/410001.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>myeclipse10svn插件的安装</title><link>http://www.blogjava.net/zhyiwww/archive/2013/07/18/401696.html</link><dc:creator>zhyiwww</dc:creator><author>zhyiwww</author><pubDate>Thu, 18 Jul 2013 05:04:00 GMT</pubDate><guid>http://www.blogjava.net/zhyiwww/archive/2013/07/18/401696.html</guid><wfw:comment>http://www.blogjava.net/zhyiwww/comments/401696.html</wfw:comment><comments>http://www.blogjava.net/zhyiwww/archive/2013/07/18/401696.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.blogjava.net/zhyiwww/comments/commentRss/401696.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/zhyiwww/services/trackbacks/401696.html</trackback:ping><description><![CDATA[下载svn插件，下载地址：http://subclipse.tigris.org/servlets/ProjectDocumentList?folderID=2240,可以下载site-1.8.22.zip.<br /><br />下载后，把site-1.8.22.zip复制到myeclipse的dropins目录，如我的目录为：<div>D:\MyEclipse\MyEclipse 10\dropins</div><br />解压site-1.8.22.zip到site-1.8.22目录，然后把site-1.8.22目录重命名为svn,即目录：<div>D:\MyEclipse\MyEclipse 10\dropins\svn<br /><br />重启myeclipse就可以用SVN了。<br /><br />注：<br />&nbsp;&nbsp;&nbsp; 在myeclipse 8.5 的时候，我曾经这么用过，似乎SVN不能用，很郁闷。没有想到这次就可以用了。大家也可以试一下。</div><div></div><br /><div></div><img src ="http://www.blogjava.net/zhyiwww/aggbug/401696.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/zhyiwww/" target="_blank">zhyiwww</a> 2013-07-18 13:04 <a href="http://www.blogjava.net/zhyiwww/archive/2013/07/18/401696.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>在word中表格分页显示表头</title><link>http://www.blogjava.net/zhyiwww/archive/2012/12/12/392877.html</link><dc:creator>zhyiwww</dc:creator><author>zhyiwww</author><pubDate>Wed, 12 Dec 2012 07:52:00 GMT</pubDate><guid>http://www.blogjava.net/zhyiwww/archive/2012/12/12/392877.html</guid><wfw:comment>http://www.blogjava.net/zhyiwww/comments/392877.html</wfw:comment><comments>http://www.blogjava.net/zhyiwww/archive/2012/12/12/392877.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.blogjava.net/zhyiwww/comments/commentRss/392877.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/zhyiwww/services/trackbacks/392877.html</trackback:ping><description><![CDATA[<div><h2><span id="q-title"><span ml-5"="">word中表格一页显示不完在下一页显示的表格自动添加表头</span> </span> </h2><div mb-10"="" id="recommend-answer-1029042674"><div answer"="" id="answer-1029042674">操作步骤：<br />只需一下3个步骤<br /><div content"=""><ol><li><pre id="recommend-content-1029042674"  mb-10"="">选中表头<br /></pre></li><li>右键属性</li><li><pre id="recommend-content-1029042674"  mb-10"="">选择行标签，勾选 &#8220;在各页顶端已标题行出现&#8221;</pre></li></ol></div></div></div></div><img src ="http://www.blogjava.net/zhyiwww/aggbug/392877.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/zhyiwww/" target="_blank">zhyiwww</a> 2012-12-12 15:52 <a href="http://www.blogjava.net/zhyiwww/archive/2012/12/12/392877.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>在64位ubutu上安装32位adobe flash player</title><link>http://www.blogjava.net/zhyiwww/archive/2011/05/10/349920.html</link><dc:creator>zhyiwww</dc:creator><author>zhyiwww</author><pubDate>Tue, 10 May 2011 07:06:00 GMT</pubDate><guid>http://www.blogjava.net/zhyiwww/archive/2011/05/10/349920.html</guid><wfw:comment>http://www.blogjava.net/zhyiwww/comments/349920.html</wfw:comment><comments>http://www.blogjava.net/zhyiwww/archive/2011/05/10/349920.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.blogjava.net/zhyiwww/comments/commentRss/349920.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/zhyiwww/services/trackbacks/349920.html</trackback:ping><description><![CDATA[[1]下载64位flash<br />
<a href="http://download.macromedia.com/pub/labs/flashplayer10/flashplayer10_2_p3_64bit_linux_111710.tar.gz">http://download.macromedia.com/pub/labs/flashplayer10/flashplayer10_2_p3_64bit_linux_111710.tar.gz</a><br />
<br />
[2]复制文件到插件目录<br />
sudo&nbsp; cp /tmp/libflashplayer.so /usr/lib/firefox-addons/plugins/<br />
&nbsp;<br />
[3]重启firefox<br />
<br />
<br />
<img src ="http://www.blogjava.net/zhyiwww/aggbug/349920.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/zhyiwww/" target="_blank">zhyiwww</a> 2011-05-10 15:06 <a href="http://www.blogjava.net/zhyiwww/archive/2011/05/10/349920.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>outlook2007导出邮件为eml文件的方法</title><link>http://www.blogjava.net/zhyiwww/archive/2011/05/03/349423.html</link><dc:creator>zhyiwww</dc:creator><author>zhyiwww</author><pubDate>Tue, 03 May 2011 06:10:00 GMT</pubDate><guid>http://www.blogjava.net/zhyiwww/archive/2011/05/03/349423.html</guid><wfw:comment>http://www.blogjava.net/zhyiwww/comments/349423.html</wfw:comment><comments>http://www.blogjava.net/zhyiwww/archive/2011/05/03/349423.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.blogjava.net/zhyiwww/comments/commentRss/349423.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/zhyiwww/services/trackbacks/349423.html</trackback:ping><description><![CDATA[两步：<br />
【1】用windows outlook express导入outlook 2007邮件。<br />
【2】在windows outlook express中，把选中的邮件拖拽到一个文件目录，就存成了.eml文件了。<br />
<br />
<br />
<img src ="http://www.blogjava.net/zhyiwww/aggbug/349423.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/zhyiwww/" target="_blank">zhyiwww</a> 2011-05-03 14:10 <a href="http://www.blogjava.net/zhyiwww/archive/2011/05/03/349423.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>在Firefox和IE上使用del.icio.us插件</title><link>http://www.blogjava.net/zhyiwww/archive/2010/08/19/329303.html</link><dc:creator>zhyiwww</dc:creator><author>zhyiwww</author><pubDate>Thu, 19 Aug 2010 01:31:00 GMT</pubDate><guid>http://www.blogjava.net/zhyiwww/archive/2010/08/19/329303.html</guid><wfw:comment>http://www.blogjava.net/zhyiwww/comments/329303.html</wfw:comment><comments>http://www.blogjava.net/zhyiwww/archive/2010/08/19/329303.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.blogjava.net/zhyiwww/comments/commentRss/329303.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/zhyiwww/services/trackbacks/329303.html</trackback:ping><description><![CDATA[<br />
一直很喜欢使用del.icio.us插件，最近不能用了。<br />
也一样从www.mozilla.com上安装插件，就是不能用，在插件配置里面只有创建新用户的按钮，没有用户登录的按钮。<br />
后来找官方资料，找到了有效的解决方法。<br />
请访问<a title="http://www.delicious.com/help/installff" href="http://www.delicious.com/help/installff">http://www.delicious.com/help/installff</a><br />
点击选择自己所用的浏览器，然后安装插件就可以。<br />
<br />
可喜的是，现在del.icio.us插件支持IE和Chrome了。<br />
以后就可以在常用主流浏览器下实现书签的共享了。<br />
<br />
<img src ="http://www.blogjava.net/zhyiwww/aggbug/329303.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/zhyiwww/" target="_blank">zhyiwww</a> 2010-08-19 09:31 <a href="http://www.blogjava.net/zhyiwww/archive/2010/08/19/329303.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>修复MBR</title><link>http://www.blogjava.net/zhyiwww/archive/2009/08/17/291448.html</link><dc:creator>zhyiwww</dc:creator><author>zhyiwww</author><pubDate>Mon, 17 Aug 2009 03:40:00 GMT</pubDate><guid>http://www.blogjava.net/zhyiwww/archive/2009/08/17/291448.html</guid><wfw:comment>http://www.blogjava.net/zhyiwww/comments/291448.html</wfw:comment><comments>http://www.blogjava.net/zhyiwww/archive/2009/08/17/291448.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.blogjava.net/zhyiwww/comments/commentRss/291448.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/zhyiwww/services/trackbacks/291448.html</trackback:ping><description><![CDATA[我安装了XP和Ubuntu,并由grub来引导系统。但是我的grub系统出了问题了，所以就不能引导了。连XP也进不去了。<br />解决办法就只能想办法恢复MBR。<br />可以用mbrifc这个工具来实现。<br />可以到http://www.sysint.no/nedlasting/mbrfix.htm下载，然后解压。<br /><h3>Usage:</h3><pre>    MbrFix /drive &lt;num&gt; {/partition &lt;part&gt;} &lt;command&gt; { /yes } { /byte }<br /><br /><br />执行 MbrFix /drive 0 fixmbr /yes<br />然后重启，你就能进入XP系统了。<br /><br /><br /><br /><br /><br /></pre><br /><br /><br /><br /><br /><br /><br /><br /><br /><img src ="http://www.blogjava.net/zhyiwww/aggbug/291448.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/zhyiwww/" target="_blank">zhyiwww</a> 2009-08-17 11:40 <a href="http://www.blogjava.net/zhyiwww/archive/2009/08/17/291448.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>unix2dos dos2unix</title><link>http://www.blogjava.net/zhyiwww/archive/2009/06/18/283056.html</link><dc:creator>zhyiwww</dc:creator><author>zhyiwww</author><pubDate>Thu, 18 Jun 2009 07:11:00 GMT</pubDate><guid>http://www.blogjava.net/zhyiwww/archive/2009/06/18/283056.html</guid><wfw:comment>http://www.blogjava.net/zhyiwww/comments/283056.html</wfw:comment><comments>http://www.blogjava.net/zhyiwww/archive/2009/06/18/283056.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.blogjava.net/zhyiwww/comments/commentRss/283056.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/zhyiwww/services/trackbacks/283056.html</trackback:ping><description><![CDATA[在debian下，<br />可以先安装<br />aptitude install tofrodos -y<br />然后就可以使用了<br /><br />这两个工具，可是实现在dos格式和unix文件格式之间的互相转换。<br /><br />比如：<br />北京市东城区东交民巷2号北京新侨诺富特饭店^M<br />北京市东城区东内大街201号^M<br />北京市东城区东华门柏树胡同23号^M<br />北京市东城区东单三条9号^M<br />北京市东城区东单北大街^M<br />北京市东城区东单北大街1号国旅大厦3楼王府井饭店旁边^M<br />北京市东城区东单北大街45号^M<br />北京市东城区东单北大街53号^M<br />北京市东城区东单北大街63号^M<br /><br />上面的是windows下文件格式<br /><br />$ dos2unix aa.txt<br />转换后，格式如下：<br /><br />北京市东城区东交民巷2号北京新侨诺富特饭店<br />北京市东城区东内大街201号<br />北京市东城区东华门柏树胡同23号<br />北京市东城区东单三条9号<br />北京市东城区东单北大街<br />北京市东城区东单北大街1号国旅大厦3楼王府井饭店旁边<br />北京市东城区东单北大街45号<br />北京市东城区东单北大街53号<br /><br /><br /><img src ="http://www.blogjava.net/zhyiwww/aggbug/283056.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/zhyiwww/" target="_blank">zhyiwww</a> 2009-06-18 15:11 <a href="http://www.blogjava.net/zhyiwww/archive/2009/06/18/283056.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>JVM terminated. Exit code=127</title><link>http://www.blogjava.net/zhyiwww/archive/2009/06/18/282993.html</link><dc:creator>zhyiwww</dc:creator><author>zhyiwww</author><pubDate>Thu, 18 Jun 2009 02:43:00 GMT</pubDate><guid>http://www.blogjava.net/zhyiwww/archive/2009/06/18/282993.html</guid><wfw:comment>http://www.blogjava.net/zhyiwww/comments/282993.html</wfw:comment><comments>http://www.blogjava.net/zhyiwww/archive/2009/06/18/282993.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.blogjava.net/zhyiwww/comments/commentRss/282993.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/zhyiwww/services/trackbacks/282993.html</trackback:ping><description><![CDATA[在debian上安装Jbuilder 2007 ，正常安装成功，启动时候出现了下面的异常<br /><br />JVM terminated. Exit code=127<br />/zy/green/JBuilder2007/./jre/bin/java<br />-Xms80M<br />-Xmx512M<br />-XX:MaxPermSize=128M<br />-jar /zy/green/JBuilder2007/./startup.jar<br />-os linux<br />-ws gtk<br />-arch x86<br />-launcher /zy/green/JBuilder2007/JBuilder.bin<br />-name JBuilder.bin<br />-showsplash 600<br />-exitdata 9000c<br />-configuration /zy/green/JBuilder2007/configuration_JBuilder<br />-vm /zy/green/JBuilder2007/jre/bin/java<br />-vmargs<br />-Xms80M<br />-Xmx1024M<br />-XX:MaxPermSize=128M<br />-jar /zy/green/JBuilder2007/startup.jar<br />~                                                                                                                                                                                   <br /><br />错误输出如下：<br /><br />zhangyi@debian:/zy/green/JBuilder2007$ ./JBuilder.bin<br />[INFO] HibernatePlugin - HibernatePlugin Started<br />/zy/green/JBuilder2007/./jre/bin/java: symbol lookup error: /zy/green/JBuilder2007/configuration_JBuilder/org.eclipse.osgi/bundles/766/1/.cp/libswt-mozilla-gtk-3236.so: undefined symbol: _ZN4nsID5ParseEPKc<br /><br />(JBuilder.bin:5743): Gdk-CRITICAL **: gdk_x11_atom_to_xatom_for_display: assertion `atom != GDK_NONE' failed<br />zhangyi@debian:/zy/green/JBuilder2007$ <br /><br /><br />从网上找了不少的资料，解决方案如下：<br /><br />aptitude install xulrunner-dev -y<br /><br />安装完毕，再重新启动，就可以了<br /><br /><br /><br /><br /><img src ="http://www.blogjava.net/zhyiwww/aggbug/282993.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/zhyiwww/" target="_blank">zhyiwww</a> 2009-06-18 10:43 <a href="http://www.blogjava.net/zhyiwww/archive/2009/06/18/282993.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>如何在debian上使用QQ</title><link>http://www.blogjava.net/zhyiwww/archive/2009/03/24/261723.html</link><dc:creator>zhyiwww</dc:creator><author>zhyiwww</author><pubDate>Tue, 24 Mar 2009 08:25:00 GMT</pubDate><guid>http://www.blogjava.net/zhyiwww/archive/2009/03/24/261723.html</guid><wfw:comment>http://www.blogjava.net/zhyiwww/comments/261723.html</wfw:comment><comments>http://www.blogjava.net/zhyiwww/archive/2009/03/24/261723.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.blogjava.net/zhyiwww/comments/commentRss/261723.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/zhyiwww/services/trackbacks/261723.html</trackback:ping><description><![CDATA[
		<br />环境 debian<br />用pidge登录QQ<br />[1]安装或者更新最新的pidge<br />    aptitude install pidge<br />[2]配置pidge中的QQ登录服务器<br /><img src="http://www.blogjava.net/images/blogjava_net/zhyiwww/img/pidge_qq_config.png" alt="pidge_qq_config.png" border="0" height="498" width="398" /><br /><br />里面的服务器一定要配置对。<br />关于 QQ服务器，请参看<a target="_blank" href="http://zhidao.baidu.com/question/73573422.html">http://zhidao.baidu.com/question/73573422.html</a><br /><img src ="http://www.blogjava.net/zhyiwww/aggbug/261723.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/zhyiwww/" target="_blank">zhyiwww</a> 2009-03-24 16:25 <a href="http://www.blogjava.net/zhyiwww/archive/2009/03/24/261723.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>vim目录树插件NERD tree的安装方法</title><link>http://www.blogjava.net/zhyiwww/archive/2009/03/18/260408.html</link><dc:creator>zhyiwww</dc:creator><author>zhyiwww</author><pubDate>Wed, 18 Mar 2009 03:37:00 GMT</pubDate><guid>http://www.blogjava.net/zhyiwww/archive/2009/03/18/260408.html</guid><wfw:comment>http://www.blogjava.net/zhyiwww/comments/260408.html</wfw:comment><comments>http://www.blogjava.net/zhyiwww/archive/2009/03/18/260408.html#Feedback</comments><slash:comments>1</slash:comments><wfw:commentRss>http://www.blogjava.net/zhyiwww/comments/commentRss/260408.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/zhyiwww/services/trackbacks/260408.html</trackback:ping><description><![CDATA[系统 Debian 4.0<br />[1]下载NERD tree<br />wget http://www.vim.org/scripts/download_script.php?src_id=9870 -O NERDTree.zip<br /><br />[2]添加.vim配置<br />查看~/.vim目录，如果不存在，创建此目录<br /><br />[3]copy NERDTree.zip to ~/.vim<br /><br />[4]unzip NERDTree.zip<br /><br />ok .<br /><br />使用方法和效果如图：<br /><img src="http://www.blogjava.net/images/blogjava_net/zhyiwww/linux/nerd_tree.png" alt="nerd_tree.png" border="0" height="584" width="727" /><br /><img src ="http://www.blogjava.net/zhyiwww/aggbug/260408.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/zhyiwww/" target="_blank">zhyiwww</a> 2009-03-18 11:37 <a href="http://www.blogjava.net/zhyiwww/archive/2009/03/18/260408.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>Keyboard shortcuts for firefox(转载)</title><link>http://www.blogjava.net/zhyiwww/archive/2008/12/25/248249.html</link><dc:creator>zhyiwww</dc:creator><author>zhyiwww</author><pubDate>Thu, 25 Dec 2008 05:38:00 GMT</pubDate><guid>http://www.blogjava.net/zhyiwww/archive/2008/12/25/248249.html</guid><wfw:comment>http://www.blogjava.net/zhyiwww/comments/248249.html</wfw:comment><comments>http://www.blogjava.net/zhyiwww/archive/2008/12/25/248249.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.blogjava.net/zhyiwww/comments/commentRss/248249.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/zhyiwww/services/trackbacks/248249.html</trackback:ping><description><![CDATA[&nbsp;&nbsp;&nbsp;&nbsp; 摘要: This is a list of keyboard shortcuts in Mozilla Firefox. Ifyou have enabled Emacs-style text editing shortcuts in GNOME, they willalso work in Firefox. When an Emacs text editing shortcut conflict...&nbsp;&nbsp;<a href='http://www.blogjava.net/zhyiwww/archive/2008/12/25/248249.html'>阅读全文</a><img src ="http://www.blogjava.net/zhyiwww/aggbug/248249.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/zhyiwww/" target="_blank">zhyiwww</a> 2008-12-25 13:38 <a href="http://www.blogjava.net/zhyiwww/archive/2008/12/25/248249.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>foxmail不能发送邮件</title><link>http://www.blogjava.net/zhyiwww/archive/2008/12/02/243980.html</link><dc:creator>zhyiwww</dc:creator><author>zhyiwww</author><pubDate>Tue, 02 Dec 2008 09:44:00 GMT</pubDate><guid>http://www.blogjava.net/zhyiwww/archive/2008/12/02/243980.html</guid><wfw:comment>http://www.blogjava.net/zhyiwww/comments/243980.html</wfw:comment><comments>http://www.blogjava.net/zhyiwww/archive/2008/12/02/243980.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.blogjava.net/zhyiwww/comments/commentRss/243980.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/zhyiwww/services/trackbacks/243980.html</trackback:ping><description><![CDATA[
		<span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Arial; font-size: 14px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 22px; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;">我的foxmail能收邮件但是不能发送邮件，问题解决：<br />Network Associates 就是这个软件的问题！<span class="Apple-converted-space"> </span><br />打开控制台，选择访问保护，里面有个25端口，就是禁止发邮件的设置，把勾去掉就OK了！<br /><br /></span>
<img src ="http://www.blogjava.net/zhyiwww/aggbug/243980.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/zhyiwww/" target="_blank">zhyiwww</a> 2008-12-02 17:44 <a href="http://www.blogjava.net/zhyiwww/archive/2008/12/02/243980.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>用forfiles或者where实现文件查找</title><link>http://www.blogjava.net/zhyiwww/archive/2008/12/02/243936.html</link><dc:creator>zhyiwww</dc:creator><author>zhyiwww</author><pubDate>Tue, 02 Dec 2008 07:11:00 GMT</pubDate><guid>http://www.blogjava.net/zhyiwww/archive/2008/12/02/243936.html</guid><wfw:comment>http://www.blogjava.net/zhyiwww/comments/243936.html</wfw:comment><comments>http://www.blogjava.net/zhyiwww/archive/2008/12/02/243936.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.blogjava.net/zhyiwww/comments/commentRss/243936.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/zhyiwww/services/trackbacks/243936.html</trackback:ping><description><![CDATA[
		<br />
forfiles 也可以用来查找文件<br />
forfiles /p . /s  /m  *.html /c  "cmd /c echo @path"<br /><br />
这样可以显示你找到的文件的全路径。<br />
相当于<br />
where /R .  *.html<br /><br /><br />
如果用<br />
dir /s . | grep *.html <br />
就只能看到文件的名称，不能看到文件的全路径。<br /><br />两个命令的不同：<br />用forfiles查找到文件后，可以用/c参数实现对文件的操作，比如重命名、移动、删除等操作<br />用where实现查找就不能实现此功能，仅能告诉我们要查找的文件存不存在。<br /><br />两个命令的相同点：<br />都可以查找文件，并且可以看到文件的全路径。<br /><br />用dir + grep 就不能看到查到文件的全路径。<br /><br />在linux下面，用find也可以实现文件查找，功能类似于forfiles<br /><img src ="http://www.blogjava.net/zhyiwww/aggbug/243936.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/zhyiwww/" target="_blank">zhyiwww</a> 2008-12-02 15:11 <a href="http://www.blogjava.net/zhyiwww/archive/2008/12/02/243936.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>让你的vim在启动的时候默认显示行号</title><link>http://www.blogjava.net/zhyiwww/archive/2008/11/20/241546.html</link><dc:creator>zhyiwww</dc:creator><author>zhyiwww</author><pubDate>Thu, 20 Nov 2008 01:30:00 GMT</pubDate><guid>http://www.blogjava.net/zhyiwww/archive/2008/11/20/241546.html</guid><wfw:comment>http://www.blogjava.net/zhyiwww/comments/241546.html</wfw:comment><comments>http://www.blogjava.net/zhyiwww/archive/2008/11/20/241546.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.blogjava.net/zhyiwww/comments/commentRss/241546.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/zhyiwww/services/trackbacks/241546.html</trackback:ping><description><![CDATA[如果你用vim，那么默认的情况下是不显示行号的，如果需要显示行号的话，可以通过下面的命令来显示行号<br />set nu<br />但是，每一次你都需要执行此命令才能显示行号。<br />所以，如果你想默认的在启动vim的时候就显示行号，你可以编辑VIM安装目录下面的_vimrc文件<br />在开头添加 <br />set nu<br />就可以了。以后每次在启动vim的时候，就会自动地显示行号。<br /><img src ="http://www.blogjava.net/zhyiwww/aggbug/241546.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/zhyiwww/" target="_blank">zhyiwww</a> 2008-11-20 09:30 <a href="http://www.blogjava.net/zhyiwww/archive/2008/11/20/241546.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>利用Eclipse和Tomcat进行远程调试</title><link>http://www.blogjava.net/zhyiwww/archive/2008/10/21/235744.html</link><dc:creator>zhyiwww</dc:creator><author>zhyiwww</author><pubDate>Tue, 21 Oct 2008 10:34:00 GMT</pubDate><guid>http://www.blogjava.net/zhyiwww/archive/2008/10/21/235744.html</guid><wfw:comment>http://www.blogjava.net/zhyiwww/comments/235744.html</wfw:comment><comments>http://www.blogjava.net/zhyiwww/archive/2008/10/21/235744.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.blogjava.net/zhyiwww/comments/commentRss/235744.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/zhyiwww/services/trackbacks/235744.html</trackback:ping><description><![CDATA[1 编辑tomcat\bin\catalina.bat  ,添加<br /><br />rem ===========================================================================<br />rem this is  added for remoting debug<br />SET JPDA_ADDRESS=8000（注意，此端口一定不能和你的tomcat监听端口一样，比如，你的tomcat如果是8080，此端口，就不能是8080）<br />SET JPDA_TRANSPORT=dt_socket<br />rem ===========================================================================<br /><br />2 在eclipse中添加远程调试<br />打开调试配置窗口，添加一个Remote Java Application<br />配置例子如下：<img src="http://www.blogjava.net/images/blogjava_net/zhyiwww/Eclipse/eclipse_remote_debug.PNG" alt="eclipse_remote_debug.PNG" border="0" width="901" height="631" /><br /><br />注意，配置Port的时候一定和你刚才添加的端口一致。<br /><br />3 启动tomcat，命令如下：catalina jpda start<br />4 启动remote debug,也就是你刚才配置好的要调试的远程程序。就可以看到远程调试的结果了。如下图：<br /><img src="http://www.blogjava.net/images/blogjava_net/zhyiwww/Eclipse/eclipse_remote_debug_1.PNG" alt="eclipse_remote_debug_1.PNG" border="0" width="720" height="549" /><br /><br /><br />补充：<br />这种方法，在启动tomcat的时候，需要用catalina.bat jpda start 来实现。<br />如果不想每一次都这样，可以修改startup.bat文件，以后启动，就和你通常启动tomcat的方法一样。<br /><br />:setArgs<br />if ""%1""=="""" goto doneSetArgs<br />set CMD_LINE_ARGS=%CMD_LINE_ARGS% %1<br />shift<br />goto setArgs<br />:doneSetArgs<br /><br />call "%EXECUTABLE%"<font color="#ff0000" size="5"> jpda </font>start %CMD_LINE_ARGS%<br /><br />:en<br /><br />看到那个红色字体的部分，是你需要添加的。之后，你就可以直接startup.bat,默认就已经启动了远程调试了。<br /><br /><img src ="http://www.blogjava.net/zhyiwww/aggbug/235744.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/zhyiwww/" target="_blank">zhyiwww</a> 2008-10-21 18:34 <a href="http://www.blogjava.net/zhyiwww/archive/2008/10/21/235744.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>The Concrete Architecture of the Apache Web Server(zhuan zai)</title><link>http://www.blogjava.net/zhyiwww/archive/2008/05/09/199548.html</link><dc:creator>zhyiwww</dc:creator><author>zhyiwww</author><pubDate>Fri, 09 May 2008 08:39:00 GMT</pubDate><guid>http://www.blogjava.net/zhyiwww/archive/2008/05/09/199548.html</guid><wfw:comment>http://www.blogjava.net/zhyiwww/comments/199548.html</wfw:comment><comments>http://www.blogjava.net/zhyiwww/archive/2008/05/09/199548.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.blogjava.net/zhyiwww/comments/commentRss/199548.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/zhyiwww/services/trackbacks/199548.html</trackback:ping><description><![CDATA[&nbsp;&nbsp;&nbsp;&nbsp; 摘要: http://www.cs.ucsb.edu/~tve/cs290i-sp01/papers/Concrete_Apache_Arch.htm																																																																The Concrete Architecture of the Apache Web S...&nbsp;&nbsp;<a href='http://www.blogjava.net/zhyiwww/archive/2008/05/09/199548.html'>阅读全文</a><img src ="http://www.blogjava.net/zhyiwww/aggbug/199548.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/zhyiwww/" target="_blank">zhyiwww</a> 2008-05-09 16:39 <a href="http://www.blogjava.net/zhyiwww/archive/2008/05/09/199548.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>The Conceptual Architecture of the Apache Web Server(zhuan zai)</title><link>http://www.blogjava.net/zhyiwww/archive/2008/05/09/199541.html</link><dc:creator>zhyiwww</dc:creator><author>zhyiwww</author><pubDate>Fri, 09 May 2008 08:30:00 GMT</pubDate><guid>http://www.blogjava.net/zhyiwww/archive/2008/05/09/199541.html</guid><wfw:comment>http://www.blogjava.net/zhyiwww/comments/199541.html</wfw:comment><comments>http://www.blogjava.net/zhyiwww/archive/2008/05/09/199541.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.blogjava.net/zhyiwww/comments/commentRss/199541.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/zhyiwww/services/trackbacks/199541.html</trackback:ping><description><![CDATA[
		<center>
				<div align="left">
						<a href="http://www.cs.ucsb.edu/%7Etve/cs290i-sp01/papers/Concept_Apache_Arch.htm">
								<font size="+3">
										<b>
												<i>
														<font size="2">http://www.cs.ucsb.edu/~tve/cs290i-sp01/papers/Concept_Apache_Arch.htm</font>
												</i>
										</b>
								</font>
						</a>
						<br />
				</div>
				<font size="+3">
						<b>
								<i>The Conceptual Architecture of the Apache Web 
Server</i>
						</b>
				</font>
				<p>
				</p>
		</center>
		<table border="0" height="115" width="747">
				<tbody>
						<tr>
								<td>
										<p align="left">
												<font size="-0">
														<i>
																<b>Octavian Andrei 
      Dragoi</b>
														</i>,<br />Department of Computer Science,<br />University of 
      Waterloo,<br /><a href="mailto:oadragoi@neumann.uwaterloo.ca">mailto:oadragoi@neumann.uwaterloo.ca</a></font>
										</p>
								</td>
								<td>
										<p align="right">
												<font size="-0">Assignment 1<br />for CS746G <br /><i><b>January 
      26, 1999</b></i><br />  </font>
										</p>
								</td>
						</tr>
				</tbody>
		</table>
		<p>
				<b>
						<i>Abstract:</i>
				</b>
				<br />
		</p>
		<blockquote>
				<font size="-1">This report presents the conceptual (abstract) 
  architecture of the Apache web server. It tries to emphasize the overall 
  structure of the system, without going into implementation details, or 
  requiring such details to be previously known by the reader. The main purpose 
  is to make the architecture "intellectually tractable" (<a href="http://www.math.uwaterloo.ca/%7Eoadragoi/CS746G/a1/apache_conceptual_arch.html#ref_Monroe97">[Monroe97]</a>).<br />The 
  conceptual architecture has been inferred from a number of Apache related 
  documents and from the way source files are grouped and named.<br />At a high 
  level the Apache server architecture is composed of a <i>core</i> that 
  implements the most basic functionality of a web server and a set of standard 
  <i>modules</i> that actually service the phases of handling an HTTP 
  request.<br />The server core accepts a HTTP request and implicitly invokes the 
  appropriate handlers, sequentially, in the appropriate order, to service the 
  request.<br />The report shows that the most similar architectural style (in the 
  sense of <a href="http://www.math.uwaterloo.ca/%7Eoadragoi/CS746G/a1/apache_conceptual_arch.html#ref_Garlan94">([Garlan94])</a>) 
  that can characterize the Apache architecture is <i>"implicit invocation"</i> 
  , although the notion of event does not exist in the architecture.<br />The 
  architecture offers great opportunities for extending or changing the Apache 
  functionality, by the means of adding or replacing modules. 
</font>
		</blockquote>
		<b>
				<i>Keywords: </i>
		</b>
		<blockquote>
				<font size="-1">Apache, conceptual architecture, abstract 
  architecture, web server</font>
		</blockquote>
		<b>
				<i>Available online at:</i>
		</b>
		<blockquote>
				<font size="-1">
						<a href="http://www.grad.math.uwaterloo.ca/%7Eoadragoi/CS746G/a1/apache_conceptual_arch.html">http://www.grad.math.uwaterloo.ca/~oadragoi/CS746G/a1/apache_conceptual_arch.html</a>
				</font>
		</blockquote> 
<p></p><h1><a name="ref_sec1"><font size="+2">1. Introduction</font></a></h1><a name="ref_sec1">The goal of this 
report is to present the conceptual (abstract) architecture of the Apache web 
server. Therefore it leaves aside implementation details and tries to be simple. 
As stated in </a><a href="http://www.math.uwaterloo.ca/%7Eoadragoi/CS746G/a1/apache_conceptual_arch.html#ref_Monroe97">[Monroe97]</a> 
a good architectural description make the architecture "intellectually 
tractable". The paper might, sometimes, simplify the actual architecture order 
to achieved the previously stated desiderata.
<p>The report assumes no previous familiarity with the architecture of the 
Apache web server. So it can serve as an introductory reading on the 
architecture of the server.
</p><p>It should be noted that the architecture described here might not be entirely 
accurate. It has been inferred based on several <a href="http://www.math.uwaterloo.ca/%7Eoadragoi/CS746G/a1/apache_conceptual_arch.html#ref">sources</a>, 
including the overall structure of files and files name. It does not start from 
a previously existing complete design document. 
</p><h2><font size="+1">1.1. About Apache</font></h2>The Apache web server is 
currently the most popular web server, according to a <a href="http://www.netcraft.com/Survey/">NetCraft Survey</a>. It has maintained 
(and improved) its status since mid 1996. Originally, the project was based on 
NCSA httpd 1.3, were from the name ("<b>A PA</b>t<b>CH</b>y Server"). Since then 
the code base was completely rewritten, and evolved into a completely 
independent project.<br />One of the major reasons for the Apache success is the 
fact that is an "open source" project (any one can have access to Apache code 
source, and any one can write its on modules to suits one needs). (<i>source <a href="http://www.apache.org/docs/misc/FAQ.html">Apache FAQ</a></i>).
<p>May be here is the place to mention that Apache is written to be drop-in 
compatible with the NCSA server. This has design consequences due related to 
some configuration commands promoted by NCSA server, which cannot be naturally 
implemented in Apache. These commands are supported in a way that, somehow, is 
not in the general "philosophy" of the system.(<a href="http://www.math.uwaterloo.ca/%7Eoadragoi/CS746G/a1/apache_conceptual_arch.html#ref_Thau96">[Thau96]</a>). 
(more details in the configuration section). 
</p><h2><font size="+1">1.2. Overview</font></h2>The report is organized as follows: 
<a href="http://www.math.uwaterloo.ca/%7Eoadragoi/CS746G/a1/apache_conceptual_arch.html#ref_sec2">Section 
2.</a> offers a high level view on the conceptual architecture of the Apache, 
outlining the main building bricks: the apache core and the apache modules. Next 
<a href="http://www.math.uwaterloo.ca/%7Eoadragoi/CS746G/a1/apache_conceptual_arch.html#ref_sec3">section 
(3.)</a> gives details on the conceptual architecture of the apache core and 
shows what the high level anatomy of a module. It also outlines the phases of 
handling an HTTP request as divided by the Apache architecture. It ends with a 
short description of the most representative standard modules. <a href="http://www.math.uwaterloo.ca/%7Eoadragoi/CS746G/a1/apache_conceptual_arch.html#ref_sec4">Section 
4.</a> gives the conceptual architecture of the Apache server and analyze the 
concurrency in the system. <a href="http://www.math.uwaterloo.ca/%7Eoadragoi/CS746G/a1/apache_conceptual_arch.html#ref_sec5">Section 
5.</a> present some additional issues related to the architecture of the system, 
mainly how configuration fit into the hole picture, how is data passed between 
core and modules and how resources are allocated and managed managed. Next <a href="http://www.math.uwaterloo.ca/%7Eoadragoi/CS746G/a1/apache_conceptual_arch.html#ref_sec6">section 
(6.)</a> comments on the architectural styles (in the sense of <a href="http://www.math.uwaterloo.ca/%7Eoadragoi/CS746G/a1/apache_conceptual_arch.html#ref_Garlan94">[Garlan94]</a>, 
<a href="http://www.math.uwaterloo.ca/%7Eoadragoi/CS746G/a1/apache_conceptual_arch.html#ref_Shaw96">[Shaw96]</a>) 
applicable to the Apache architecture, while the <a href="http://www.math.uwaterloo.ca/%7Eoadragoi/CS746G/a1/apache_conceptual_arch.html#ref_sec7">Section 
7.</a> elaborates on extensibility issues. <a href="http://www.math.uwaterloo.ca/%7Eoadragoi/CS746G/a1/apache_conceptual_arch.html#ref_sec9">Conclusions</a> 
and a <a href="http://www.math.uwaterloo.ca/%7Eoadragoi/CS746G/a1/apache_conceptual_arch.html#ref_sec10">dictionary 
of terms </a>end the report. 
<h1><a name="ref_sec2"><font size="+2">2. High level Conceptual 
Architecture</font></a></h1>The function of a web server is to service requests 
made through HTTP protocol. Typically the server receive a request asking for a 
specific resource and returns the resource as a response. A client might 
reference in its request a file, and then that file is returned or, for example, 
a directory and then the content of that directory (codified in some suitable 
form) is returned. A client might also request a program, and it is the web 
server task to launch that program (CGI script) and to return the output of that 
program to the client. Various other resources might be referenced in client's 
request.<br />To summarize: the web server take a request, decode it, obtains the 
resource and hands it to the client.
<p>Additional concerns related to controlling access authorization and clients 
authorizations are also in the responsibility of the web server. As has been 
said the web server might execute programs as response to clients requests. It 
must ensure that this is not a threat for the host system (were the web server 
runs). In addition, the web server must be capable, not only to respond to a 
high rate of requests, but also to satisfy a request as quickly as possible.
</p><p></p><h2><font size="+1">2.1. Description</font></h2>As opposed to a monolithic server 
architecture in which all the activities are done by a single unit (in which 
different parts of handling a request are poorly delimited), Apache takes a 
modular approach. <a href="http://www.math.uwaterloo.ca/%7Eoadragoi/CS746G/a1/apache_conceptual_arch.html#fig1"><i>Figure 
1</i></a> illustrates the high level conceptual architecture. There is a 
<i>core</i> part of the server that is responsible for defining and following 
the steps in servicing a request and several <i>modules</i> that actually 
implement the different phases of handling the request.<br />As shall be seen 
later <a href="http://www.math.uwaterloo.ca/%7Eoadragoi/CS746G/a1/apache_conceptual_arch.html#fig1"><i>Figure 
1</i></a> does not capture an important characteristic of the architecture, 
namely, the predefined order in which modules are called, based on their 
advertised characteristics. 
<p></p><center><table align="center" border="0"><tbody><tr><td><a name="fig1"><img src="http://www.cs.ucsb.edu/%7Etve/cs290i-sp01/papers/Concept_Apache_Arch_files/fig1.gif" height="381" width="471" /></a></td></tr><tr><td><center><i><b>Figure 1.High level Conceptual 
    Architecture</b></i></center></td></tr></tbody></table></center>The idea is to 
keep the basic server code clean while allowing third-parties to override or 
extend even basic characteristics. 
<h1><a name="ref_sec3"><font size="+2">3. The core and the 
modules</font></a></h1>This section presents in more detail the components of 
the Apache server architecture. It presents the conceptual parts of the Apache 
core and how a request is decomposed in a set of phases. It also describe the 
anatomy of an Apache module (at a conceptual level). 
<h2><font size="+1">3.1. The core</font></h2>The core implements the basic 
functionality of the server. In addition it implements a number of utility 
functions. A worth mentioning utility, is the one that provides resources 
allocation on a per request pool. This facility is offered not only to the 
server core but also to modules.
<p>The following are the components of the core: 
</p><ul><li><code>http_protocol.c</code>: contains routines that directly communicates 
  with the client (through the socket connection), following the HTTP protocol. 
  All data transfers to the client are done using this component. 
  </li><li><code>http_main.c</code>: the component that startup the server and 
  contains the main server loop that waits for and accepts connections. It is 
  also in charge of managing timeouts. 
  </li><li><code>http_request.c</code> the component that handles the flow of the 
  request processing, dispatching control to the modules in the appropriate 
  order. It is also in charge with error handling. 
  </li><li><code>http_core.c</code>: the component implementing the most basic 
  functionality, which is described in a comment from a source file as being 
  <i>"just 'barely' functional enough to serve documents, though not terribly 
  well"</i>. Another interesting quote from a source file comment illustrates 
  very well the function of this component:<i>"this file could almost be 
  mod_core.c"</i>. Meaning that the component behaves like a module but has to 
  access some globals directly (which is not characteristic for a module). 
  </li><li>the component that take care of allocating resource pools, and keeping 
  track of them. (<code>alloc.c</code>) 
  </li><li>other utilities, including reading configuration files and managing the 
  information gathered from those files (<code>http_config.c</code>), as well as 
  support for virtual hosts. An important function of <code>http_config</code> 
  is that form the list of modules that will be called to service different 
  phases of the requests. </li></ul>In the above list the term <i>component 
</i>has been used in order to avoid the term <i>module</i> which will be used 
only to refers to <i>Apache modules</i><center><table align="center" border="0"><tbody><tr><td><a name="fig2"><img src="http://www.cs.ucsb.edu/%7Etve/cs290i-sp01/papers/Concept_Apache_Arch_files/fig2.gif" height="286" width="516" /></a></td></tr><tr><td><center><i><b>Figure 2. Architecture for Apache 
  core</b></i></center></td></tr></tbody></table></center><a href="http://www.math.uwaterloo.ca/%7Eoadragoi/CS746G/a1/apache_conceptual_arch.html#fig1">Figure 
2.</a> depicts the interaction between different components of the core. As all 
components use the different utilities functions, connectors to UTILITIES and 
ALLOC have not been pictured. <i>Interaction</i> is used in a broader sense, 
meaning from calling a component service function to "conceptually" relinquish 
control to that component.
<p>It is interesting to observed that although the components of the core have 
rather distinct functionality, there is not a simple way to depict the 
interactions between them. Most of the architectural information being in the 
<i>names</i> of the modules rather than in the <i>connectors</i> between them.
</p><p>This is due to the considerably effort done by the designers to move 
everything that can be expressed as a separate entity into the modules part of 
the Apache server. What is left in the core are components too interconnected to 
be written as separate modules.
</p><p></p><h2><font size="+1">3.2. Request Phases</font></h2>A module implements only 
portion of the functionality for servicing a client request. More than one 
module are necessary to completely respond to a request. However module does not 
know one about the other. The control is transfered back and forth between the 
core and different modules. This is handled by dividing the handling of the 
request into a set of distinct phases.
<p>The following are the phases of handling a request for the Apache server: 
</p><ul><li>URI to filename translation; 
  </li><li>Check access based on host address, and other available information; 
  </li><li>Get an user id from the HTTP request and validate it; 
  </li><li>Authorize the user; 
  </li><li>Determine the MIME type of the requested object (the content type, the 
  encoding and the language); 
  </li><li>Fix-ups (for example replace aliases by the actual path); 
  </li><li>Send the actual data back to the client; 
  </li><li>Log the request; </li></ul>The phases are "controlled" by the http_request 
component of the core as has been already stated (see <a href="http://www.math.uwaterloo.ca/%7Eoadragoi/CS746G/a1/apache_conceptual_arch.html#fig2">Figure 
2.</a>).
<p></p><h2><font size="+1">3.3. Modules</font></h2>As has been said the role of the 
modules is to implement/override/extend the functionality of the Apache web 
server. All modules has the same interface to the core of the server. Module 
does not interact directly one with another. If they interact it is always 
through the Apache core.(implicit invocation as shall be seen).
<p></p><center><table align="center" border="0"><tbody><tr><td><a name="fig3"><img src="http://www.cs.ucsb.edu/%7Etve/cs290i-sp01/papers/Concept_Apache_Arch_files/fig3.gif" height="376" width="521" /></a></td></tr><tr><td><center><i><b>Figure 3. Architecture of an Apache 
    Module</b></i></center></td></tr></tbody></table></center>Apache (1.3) permits 
loading of modules when they are needed (they are dynamically linked with the 
server) and therefore the initialization and configuration methods might be 
called when the module is loaded as opposed to when the server is initialized.
<p></p><h2><font size="+1">3.4. Handlers</font></h2>A handler is for Apache the action 
that must be performed in some phase of servicing a request. For example when 
the requested object is a file, the handler that returns the the file must open 
the file, read the content of the file and hand the content of the file to the 
client (through apache core).
<p>Handlers are defined by modules, and a module might specify handlers for one, 
many or none of the phases of a request. Handlers are the part of the module 
that is called when the processing of the request enters the phase for which the 
handler is defined.
</p><p>The rationale behind having modules defining handlers for more than one phase 
is that a module might save internally data on the request being processed, and 
when its handlers for a subsequent phase of the request are called they might 
make use of those the data. In theory the module might even save data between 
different request (e.g. it might cash some file content for future use).
</p><p>It should be noted that there are additional functions exported by modules, 
related with configuration, and initialization, They are called in the startup 
phase of the server.
</p><p></p><h2><font size="+1">3.5. Standard Modules</font></h2>Apache comes with a set of 
standard modules for providing the complete functionality of a web server. The 
most representative/relevant among the standard modules are listed below. They 
also illustrate what kind of manipulation can be done at each phase. 
<ul><li>For URI to file name translation phase: 
  <ul><li><code>mod_userdir</code>: translate the user home directories into 
    actual paths mod_rewrite Apache 1.2 and up 
    </li><li><code>mod_rewrite</code>: rewrites URLs based on regular expressions, it 
    has additional handlers for fix-ups and for determining the mime type 
  </li></ul></li><li>For authentication / authorization phases: 
  <ul><li><code>mod_auth, mod_auth_anon,mod_auth_db, mod_auth_dbm </code>: User 
    authentication using text files, anonymous in FTP-style, using Berkeley DB 
    files, using DBM files. 
    </li><li><code>mod_access</code>: host based access control. </li></ul></li><li>For determining the MIME type of the requested object (the content type, 
  the encoding and the language): 
  <ul><li><code>mod_mime</code>: determines document types using file extensions. 
    </li><li><code>mod_mime_magic</code>: determines document types using "magic 
    numbers" (e.g. all gif files start with a certain code) </li></ul></li><li>For fix-ups phase: 
  <ul><li><code>mod_alias</code>: replace aliases by the actual path 
    </li><li><code>mod_env</code>: fix-up the environment (based on information in 
    configuration files) 
    </li><li><code>mod_speling</code>: automatically correct minor typos in URLs 
  </li></ul></li><li>For sending actual data back to the client: to chose the appropriate 
  module for this phase the mime type or the pseudo mime type (e.g. for a 
  CGI-script) is used. 
  <ul><li><code>mod_actions</code>: file type/method-based script execution 
    </li><li><code>mod_asis</code>: send the file as it is 
    </li><li><code>mod_autoindex</code>: send an automatic generated representation 
    of a directory listing 
    </li><li><code>mod_cgi</code>: invokes CGI scripts and returns the result 
    </li><li><code>mod_include</code>: handles server side includes (documents parse 
    by server which includes certain additional data before handing the document 
    to the client) 
    </li><li><code>mod_dir</code>: basic directory handling. 
    </li><li><code>mod_imap</code>: handles image-map file </li></ul></li><li>For logging the request phase: 
  <ul><li><code>mod_log_*</code>: various types of logging modules 
</li></ul></li></ul><h1><a name="ref_sec4"><font size="+2">4. Conceptual Architecture</font></a></h1><a href="http://www.math.uwaterloo.ca/%7Eoadragoi/CS746G/a1/apache_conceptual_arch.html#fig1">Figure 
1</a> has shown which are the main components of the Apache web server and how 
they interact. However it does not illustrate the fact that handlers in modules 
are called in a fixed, predefined order, which is the order of the phases of 
servicing a request. <a href="http://www.math.uwaterloo.ca/%7Eoadragoi/CS746G/a1/apache_conceptual_arch.html#fig3">Figure 
3</a> tries to add the flow information mention above.
<p>For some phases only one module (handler in a module) can be called. Such 
phases are the authorization, the authentication, the return of the actual 
object to the client, and sometimes the URI to filename translation.<br />Other 
phases of servicing a request can have more that one handler called. For example 
there can be more than one module called to implement the logging part of the 
request.
</p><p>In some phases of processing a request all the handlers (in the registered 
modules) might be called until one returns a special code meaning that 
subsequent registered handlers for the current phase should not be called. An 
example is the URI to filename, translation phase.<br />Further more there might 
be the case that a handler returns an error code. In that case the processing of 
the request should stop and an error should be returned to the client (i.e. no 
other handlers are called, from this phase or subsequent phases). 
</p><p></p><center><table align="center" border="0"><tbody><tr><td><a name="fig4"><img src="http://www.cs.ucsb.edu/%7Etve/cs290i-sp01/papers/Concept_Apache_Arch_files/fig4.gif" height="698" width="821" /></a></td></tr><tr><td><center><i><b>Figure 4. Conceptual Architecture of Apache 
      Server</b></i></center></td></tr></tbody></table></center><h2><font size="+1">4.1. Concurrency in Apache</font></h2>Some web sites are 
heavily loaded (many requests per minute or even per second). Traditionally 
TCP/IP servers fork a new child to handle new incoming request from clients. 
However in the situation of a busy web site the overhead of fork-ing a huge 
number of children will simply suffocate the machine.
<p>As a consequence, Apache uses a different technique, namely <i>persistent 
server processes</i>. It forks a fixed number of children, right from the 
beginning. The children service incoming requests independently (different 
address spaces). Concurrency in Apache server is pictured in <a href="http://www.math.uwaterloo.ca/%7Eoadragoi/CS746G/a1/apache_conceptual_arch.html#fig5">Figure 
5.</a><br />Alternatively, when Apache compiles on MS Windows (as opposed to 
UNIX), a fixed number of threads is started from the beginning to service the 
incoming request (due probably to specific characteristic of this operating 
system).
</p><p></p><center><table align="center" border="0"><tbody><tr><td><a name="fig5"><img src="http://www.cs.ucsb.edu/%7Etve/cs290i-sp01/papers/Concept_Apache_Arch_files/fig5.gif" height="282" width="686" /></a></td></tr><tr><td><center><i><b>Figure 5. Concurrency on 
  Apache(UNIX)</b></i></center></td></tr></tbody></table></center>It is 
interesting that Apache server can dynamically control the number of children it 
forks (i.e. increasing or decreasing it), based on current load.
<p>From another point of view one might raise the question if a module is a 
separated process or can be implemented as a separated process. In Apache module 
is not a separated process. However some modules might fork new children in 
order to do their job. A readily example is the <code>mod_cgi</code> module, 
which handles the cgi script. It must fork a new child to execute the actual CGI 
script (after proper redirection of the standard input and output for the child 
process), and wait for it to finish. But this is a characteristic of the 
<code>mod_cgi</code>, many other modules need not to fork children.
</p><p>A different kind of module is the one that although it is not a separate 
process and does not for children it communicate through IPC mechanisms or 
sockets in with a different process (which might, for instance, be located on a 
different machine). An example of such module would be an authorization module 
which communicate with a server that manages users and passwords information. 
Even the CGI module might be implemented in this way (i.e. the actual script 
running as a completely different process not a child) which will result in 
improved security, but will have the communication overhead as a penalty. 
</p><h1><a name="ref_sec5"><font size="+2">5. Additional issues</font></a></h1>Some 
additional issues has been left aside from the description of the conceptual 
architecture and are treated in the next sections. 
<h2><font size="+1">5.1. Configuration of Apache Components</font></h2>One of the 
declared purposes of the Apache server architecture is to make it highly 
customizable. <br />Configuration files permit to customize not only the behavior 
of the server but the one of the modules too. Each module can advertise the 
custom commands it recognize from configuration files and will be called when 
such commands are found. Those commands might be completely new commands (not 
known in by the server core).<br />Apache permits even per directory customization 
via a file call <i>.htaccess</i>. This file also might contain commands 
understand only by modules.
<p>An interesting concept implemented by Apache is the one of <i>Virtual 
Hosts</i>. The server can respond to more than one name (i.e. www.example and 
www2.example), each assigned to one of the multiple IP addresses of the machine. 
The multiple IP addresses can be addresses associated with physical network 
interfaces or can be addresses associated with virtual network interfaces 
(simulated via logical devices by the operating system). Apache is able to 
"tell" under which name the host has been referenced and use different 
configuration options (e.g. allowing more access rights to users accessing the 
host through an interface networked in the local network, as opposed to users 
accessing the web server via an interface networked in the outside-the-company 
network). Modules also have accessed to this information.
</p><p>To summarize, the Apache "philosophy" related to configuration is: each 
component takes care of its own configuration, and configuration commands. The 
server core parse the configuration files and dispatches configuration commands 
to the appropriate modules to be interpreted (executed), or interprets 
(executes) the command itself if in particular was meant for it (i.e. is a 
configuration command for the core not for a module). 
</p><h2><font size="+1">5.2. Compatibility with NCSA server - impact on 
Architecture</font></h2>Starting from the code base of the NCSA server Apache 
was always design to be a drop-in replacement for this server. That means that 
Apache must understand and follow the configuration commands, and recognize the 
configuration files of the NCSA server. However this is not an easy task because 
some of the commands must affect behavior that appear in more than one module. 
Therefore one of the main principle of the Apache configuration machinery, 
namely each module takes care of its own configuration <i>must be broken </i>. 
<p>To "fix" this the problem commands of NCSA server (e.g. Options) are 
interpreted by the Apache core, even when they affect modules. The core make the 
configuration available to modules in the same way it make available the general 
configuration information. 
</p><h2><font size="+2">5.3. Data Flow / Data Structures</font></h2>Data is exchanged 
with various handlers in modules via a special structure called <i>request 
record</i> which includes information about the resource requested (e.g. 
filename), information about the configuration data related to the server, the 
virtual host, and the directory context in which the request is processed.
<p>Another key structure is the one the Apache core uses keep track of various 
modules. It is a linked list of <i>module records</i>, each holding all the 
information related to that module (e.g. handlers, configuration data per 
module). The module record is the mean by which the core calls the module. 
</p><h2><font size="+1">5.4.Resource Allocation - Resource Pool </font></h2>An 
interesting characteristic of the Apache server it the concept of <i>resource 
pool</i>. All resources related to a request (memory, file handlers) are 
allocated and handled through a dedicated resource pool. Further more, modules 
can define their own sub-resource pools if they want to manage private resources 
in a similar manner with general resources.
<p>What is characteristic for the resource pool, is that all resources are freed 
at once, when the resource pool is freed, preventing resource leakage. This is 
particularly important due to use of persistent processes. 
</p><h1><a name="ref_sec6"><font size="+2">6. Architectural Style</font></a></h1>The 
conceptual architecture described above, roughly approximate the style of 
<i>"implicit invocation"</i>. It should be noted however that the architecture 
is not exactly an <i>Event based architecture</i>, as specified in <a href="http://www.math.uwaterloo.ca/%7Eoadragoi/CS746G/a1/apache_conceptual_arch.html#ref_Garlan94">[Garlan94]</a>. 
It is usually the case with software architecture that cannot be clearly 
classified in a predefined style ("Real systems hybridize and amalgamate the 
pure style" - <a hreh="ref_Shaw96">[Shaw96]</a>).<br />To be more specific there 
is no such concept as many events that are announced (broadcast). Instead the 
only event is a request from a HTTP client, which starts a sequence of 
predictable implicit invocations.<br />The core has a fixed order in which will 
call the different handlers and will decide based on configuration information 
which is the order in which the handlers for the same phase are called.
<p>There is, however, something that might be compared with announcing an event, 
namely is the issuing of a sub-request by a module in order to "force" the core 
to perform some of the steps for a request on the sub-request (i.e. calling 
sequentially handlers for each servicing phase). However this is not 
(conceptually) a proper event, because the issuing module does not announce 
something to other (unknown to it) modules. It just a mean of "forcing" an 
implicit invocation.
</p><p>There are other characteristics of event systems (as summarized in <a hreh="ref_Shaw96">[Shaw96]</a>) that does not "fit" the description of the 
core-modules architecture of Apache. For example there is no control asynchrony, 
in the sense that the module issuing a the sub-request waits for the sub-request 
to be completed.<br />Also two phases of the request cannot be handled in parallel 
(one uses the outcome of the precedent one). More over the module is not a 
separate process, although it can fork children for some phases - like running a 
CGI script.
</p><p>So although the connectors between modules are <i>implicit invocations</i> 
and data flow is a tree - with some restrictions (e.g some phases cannot have 
more than one module to handle them, one phase is after the other) the 
architecture does not have other characteristics of the event systems.
</p><p>It can be argued however that as different instances of Apache 
(sub-processes) can handle in the same time request from different HTTP clients 
there is asynchrony. However the different instances are independent and do not 
shared information related to the requests processed.
</p><p>The way a request is serviced, with phases handled one after the other and 
the outcome of a request is used (most of the time) by the next phase, has some 
similarities with the general style of "pipe line" (as in <a hreh="ref_Shaw96">[Shaw96]</a>)). There is no upstream control (i.e. when the 
core invokes the handlers for one phase there is no data or control upstream). 
However, again, there is no asynchrony and more important the core <i>regain 
control</i> after each phase (i.e. after the handler has been invoked, and its 
job is done).
</p><p>Further more, some phases does not provide any change in the conceptual 
data-flow. And more significant, some handlers might be implemented by the same 
module and those handler might exchange information via private data of the 
module, bypassing the main data-flow. For example authorization and 
authentication does not change the request, they can only deny the execution of 
it. To conclude the pipeline is rather poorly reflected by the module 
structures, although conceptually the idea exists, therefore the implicit 
invocation seems more appropriate to characterize the general conceptual 
architectural style.
</p><p></p><h1><a name="ref_sec7"><font size="+2">7. Extensibility of Apache</font></a></h1>As 
it probably became obvious by now, Apache server architecture easily permits 
changes of the existing functionality or adding new functionality.<br />The 
modular approach and the effort made by the designers to move as much as 
possible from the web server functionality into separate modules make the task 
easier. For example if the way URI are translated into file names have to be 
extended, it is not necessary to change the module that does this task. It is 
sufficient to write a different module which will be called before or after the 
standard module has been called.
<p>Further more the ability of dynamically loading modules present in Apache 1.3 
release (no static linking with the server code), make the task of customizing 
the server even easier as there is no need to recompile the entire server. It is 
necessarily only to change some configuration files.<br />Another feature worth 
re-mentioning here is the capability of modules to define their own 
configuration commands, for which they are implicitly called to execute.
</p><p>An important part of the Apache web server that cannot be changed only by 
changing / adding a module is the one that implements the HTTP protocol. On the 
good, side the protocol is implemented as a separate piece of code 
(<code>http_protocol.c</code>), and all communication with the client is done 
through it, so only that part must be changed in order to implement a future 
version of HTTP. However there is no well defined API, as is the case for 
modules. 
</p><h1><a name="ref_sec8"><font size="+2">8. Conclusions</font></a></h1>Apache web 
server has a modular architecture with a core component that defines the most 
basic functionality of a web server (including the HTTP protocol and the reading 
of configuration files) and a number of modules which implements the steps of 
processing a HTTP request, offering handlers for one or more of the phases.
<p>The core is the one that accepts and manages HTTP connections and calls the 
handlers in modules in the appropriate order to service the current request.
</p><p>The architectural style can be characterized <i>implicit invocation</i> made 
by the server core on handlers implemented by the modules. Concurrency exists 
only between a number of persistent identical processes that service incoming 
HTTP requests on the same port. Modules are not implemented as separate process 
although it is possible to fork children or to cooperate with other independent 
process to handle a phase of processing a request.
</p><p>The functionality of Apache can be easily changed by writing new modules 
which complements or replace the existing one. The server is also highly 
configurable, at different levels (virtual host, directory, module) and modules 
can define their own configuration commands. 
</p><h1><a name="ref_sec9"><font size="+2">9. Dictionary of terms</font></a></h1><dt><strong>API</strong></dt><dd>Application Programming Interface
</dd><dd></dd><dt><strong>component</strong></dt><dd>term used throughout this report in order to avoid the term <i>module</i> 
which has been used in connection to (referring) an Apache module. This 
distinction is not a standard terminology, and has the only purpose to avoid 
confusion.
</dd><dd></dd><dt><strong>core (Apache core)</strong></dt><dd>part of the Apache server that defines and manages the steps in answering 
the request and implements the HTTP protocol.
</dd><dd></dd><dt><strong>CGI (CGI script)</strong></dt><dd>Common Gateway Interface, an interface describing how a web server passes 
parameters and receive results form another process on the same machine called 
CGI-script (executed by the web server when it receive a request referencing the 
script). 
</dd><dt><strong>handler</strong></dt><dd>a function of a module that will be implicitly invoked by the core to handle 
the phase of processing the HTTP request for which the handler was designed. 
</dd><dt><strong>HTTP</strong></dt><dd>Hypertext Transport Protocol, the protocol that coordinate how the hypertext 
files are transfered over the Internet. However any files can be transfered via 
HTTP. 
</dd><dt><strong>httpd</strong></dt><dd>the usual name for the web server (stands for HTTP daemon). 
</dd><dt><strong>IPC (IPC mechanisms)</strong></dt><dd>inter process communication mechanisms (e.g. queues, semaphores, shared 
memory) 
</dd><dt><strong>MIME type</strong></dt><dd>MIME stands for Multipurpose Internet Mail Extension. MIME types are the 
types (e.g. gif, html) of the entities defined in MIME request for comments 
</dd><dt><strong>module (Apache module)</strong></dt><dd>part of Apache server that provides some functionality in one or more phases 
of servicing an HTTP request. Its functions (handler) are implicitly invoked by 
the Apache core. It is interfaced with the Apache core by a special API. 
</dd><dt><strong>NCSA web server (NCSA httpd)</strong></dt><dd>the web server provided and maintained by the Development Group of the 
National Center for Super-computing Applications, at the University of Illinois 
at Urbana - Champaign 
</dd><dt><strong>request (HTTP client request)</strong></dt><dd>a message from the client containing information about the resource 
requested and how it is wanted to be delivered. 
</dd><dt><strong>resource (an HTTP resource)</strong></dt><dd>a network data object or service which can be identified by a URI 
</dd><dt><strong>response (HTTP server response)</strong></dt><dd>the response from the web server to an HTTP request, contains a header and 
usually the actual resource. The header contains status information and 
information on the resource (e.g. type, length of the binary representation). 
</dd><dt><strong>resource pool</strong></dt><dd>A large data structure allocated in one step by the Apache core, which holds 
the resources (memory blocks, open files) associated with a given request. When 
the resource pool is no longer needed it is deallocated in one step (memory is 
freed and files ore closed). 
</dd><dt><strong>URI</strong></dt><dd>Universal Resource Identifiers, are formated (fixed syntax) string which 
identify objects via location, and other characteristics. 
</dd><dt><strong>URL</strong></dt><dd>Uniform Resource Locators, a subclass of URI that locates resources based on 
their location and the protocol used to fetch them (e.g. 
http://www.uwaterloo.ca/index.html identifies the home page file of University 
of Waterloo) 
</dd><dt><strong>virtual host</strong></dt><dd>a single physical host might have more than one network interface, each with 
a different IP address and a different host name. For clients it acts as being a 
number of virtual hosts, one for each name. 
<dl></dl><h1><a name="ref_sec10"><font size="+2"></font></a><font size="+2"><a name="ref">10. 
References</a></font></h1></dd><dt><a name="ref_Thau96"><strong>[Thau96]</strong></a></dt><dd><a href="http://www5conf.inria.fr/fich_html/papers/P20/Overview.html"><i>Design 
considerations for the Apache Server API</i></a>, Robert Thau, Fifth 
International World Wide Web Conference, 1996, Paris. 
</dd><dt><a name="ref_APINotes"><strong>[APINotes]</strong></a></dt><dd><a href="http://modules.apache.org/doc/API.html"><i>Apache API notes 
</i></a>, Robert S. Thau. 
</dd><dt><a name="ref_ApacheDocs"><strong>[ApacheDocs]</strong></a></dt><dd><a href="http://www.apache.org/"><i>Apache server documentation</i></a></dd><dt><a name="ref_Garlan94"><strong>[Garlan94]</strong></a></dt><dd><a href="http://www.cs.cmu.edu/afs/cs/project/able/www/paper_abstracts/intro_softarch.html"><i>An 
Introduction to Software Architecture</i></a>, D. Garlan, M.Shaw, Advances in 
Software Engineering and Knowledge Engineering, Vol. I, World Scientific 
Publishing Company, 1993. 
</dd><dt><a name="ref_Monroe97"><strong>[Monroe97]</strong></a></dt><dd><a href="http://pecan.srv.cs.cmu.edu/afs/cs/project/able/www/paper_abstracts/ObjPatternsArch-ieee.html"><i>Architectural 
Styles, Design Patterns, and Objects</i></a>, R. Monroe, D. Kompanek, R. Melton, 
D. Garlan, IEEE Software, January 1997, pp 43-52. 
</dd><dt><a name="ref_Shaw96"><strong>[Shaw96]</strong></a></dt><dd><a href="http://www.cs.cmu.edu/afs/cs.cmu.edu/project/vit/www/paper_abstracts/Boxology.html"><i>A 
Field Guide to Boxology</i></a>, M. Shaw, P. Clementes, 1996 
<dl></dl></dd><img src ="http://www.blogjava.net/zhyiwww/aggbug/199541.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/zhyiwww/" target="_blank">zhyiwww</a> 2008-05-09 16:30 <a href="http://www.blogjava.net/zhyiwww/archive/2008/05/09/199541.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>Eclipse插件</title><link>http://www.blogjava.net/zhyiwww/archive/2008/02/15/180092.html</link><dc:creator>zhyiwww</dc:creator><author>zhyiwww</author><pubDate>Fri, 15 Feb 2008 07:58:00 GMT</pubDate><guid>http://www.blogjava.net/zhyiwww/archive/2008/02/15/180092.html</guid><wfw:comment>http://www.blogjava.net/zhyiwww/comments/180092.html</wfw:comment><comments>http://www.blogjava.net/zhyiwww/archive/2008/02/15/180092.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.blogjava.net/zhyiwww/comments/commentRss/180092.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/zhyiwww/services/trackbacks/180092.html</trackback:ping><description><![CDATA[
		<font size="5">
				<b>
						<font color="#008000">AmaterasUML_1.3.1 </font>
				</b>
		</font>
		<br />主页：<a href="http://unimod.sourceforge.net/index.html" target="_blank">http://unimod.sourceforge.net/index.html</a> (@sourceforge)<br />在线更新地址：<a href="http://unimod.sf.net/update" target="_blank">http://unimod.sf.net/update</a><br />截图：<a href="http://unimod.sourceforge.net/screen-shots.html" target="_blank">http://unimod.sourceforge.net/screen-shots.html</a><br /><br /><h2><b><font color="#008000"><a name="install">To install <span class="Labels">JSEclipse</span> follow the steps below:</a></font></b></h2><ol class="hcp4" type="1"><li class="kadov-p">Open the Eclipse workbench.
</li><li class="kadov-p">To install new software with the Update manager, in the main Eclipse menu, go to Help &gt; Software Updates -&gt;Find and Install.
</li><li class="kadov-p">In the user interface that opens, select the <span class="Labels">Search for new features to install.</span></li><li class="kadov-p"><span class="Labels">In the next step you choose what locations will be searched. If this is the first time installing JSEclipse, you have to add a <span class="Labels">New remote site</span>. If you already have it defined, skip to step 7.</span></li><li class="kadov-p">To define a new site to be searched for available plugins, in the user interface click the <span class="Labels">New Remote Site</span> button.
</li><li class="kadov-p">The New Update Site dialog box opens. It contains two fields that must be completed: 
<ul type="disc"><li class="kadov-p"><span class="Labels">Name</span>: this will be the label displayed in the Install or Update software user interface. You can enter <strong>JSEclipse</strong>.
</li><li class="kadov-p"><span class="Labels">URL</span>: this is the URL to the remote site containing the plugins. Enter:<br /><a title="http://download.macromedia.com/pub/labs/jseclipse/autoinstall/site.xml" href="http://download.macromedia.com/pub/labs/jseclipse/autoinstall/site.xml">http://download.macromedia.com/pub/labs/jseclipse/autoinstall/site.xml</a><?xml:namespace prefix = o /?><o:p></o:p><br /></li></ul></li><li class="kadov-p">Check the newly added entry's checkbox. This will set it as active for the software search. You can disable or enable sites on which the software search is performed by checking, respectively un-checking them in the user interface
</li><li class="kadov-p">Click <span class="Labels">Finish</span> to start searching for software. A new window will appear showing the search progress.
</li><li class="kadov-p">Once the search completes, a list of the features available on the remote site will be displayed, with their respective version, using an hierarchical display
</li><li class="kadov-p">Select the feature to install by checking its checkbox. Click <span class="Labels">Next</span> to continue.
</li><li class="kadov-p">The license agreement for each selected feature is displayed next. You must accept the licence agreement in order to continue with the install process. Click the <span class="Labels">I accept the terms in the license agreement</span> radio button, then <span class="Labels">Next</span> to move on.
</li><li class="kadov-p">Next select where to install the plugin. By default, it is the current folder. Use the default and click <span class="Labels">Finish</span> to install.
</li><li class="kadov-p">If your configuration is set to check plugins for a digital signature, a confirmation window is displayed, warning if the plugin is not digitally signed. Simply click <span class="Labels">Install</span> to close the window and install the plugin
</li><li class="kadov-p">After the installation is completed, and all features have been copied to the desired location, a dialog box will ask for a restart of the workbench. Although some features can be enabled without restarting the workbench, a restart is recommended. Select <span class="Labels">Yes</span>.
</li><li class="kadov-p"><span class="Labels">JSEclipse</span> has been installed.</li></ol><br /><font color="#008000"><b>PropertiesEditor Plugin Install</b></font><br /><br />   1. Please choose from the screen of Eclipse with "Help" -&gt;"Software Updates" -&gt; "Update Manager". An 'Update Manager' opens.<br /><br />   2. In the "Feature Updates" view at the lower left of an 'Update Manager', please carry out the right click of the "Sites to Visit", and create a site bookmark by "New" -&gt; "Site Bookmark...".<br />      - The bookmark to create should input the following "URL" and should push an "Finish" button.<br />      Name: Arbitrary input<br />      URL : http://propedit.sourceforge.jp/eclipse/updates/<br />      Bookmark type: Eclipse update site<br /><br />   3. If a site bookmark is created, the bookmark created at the bottom of "Feature Updates" will appear.<br />      A click of "jp.gr.java_conf.ussiy.app.propedit.eclipse.feature.PropertiesEditorFeature x.x.x" displays a preview on a right window. Since the button "Install Now" is in around the lower right, please click.<br /><br />   4. Since an installation wizard starts, please click a "Next" button rapidly.<br /><br />   5. "You will need to restart the workbench for the changes to take effect. Would you like to restart now?" is displayed. Please reboot Eclipse according to a dialog.<br /><br /><h2><font color="#008000">Implementors feature</font><br /></h2>Alternatively, use the Eclipse update site at: <b>http://eclipse-tools.sourceforge.net/updates/<br /><br /></b><h2><font size="4"><b><font color="#008000">Quantum</font></b></font></h2><p>To install Quantum, start Eclipse, go to <i>Help-&gt;Software Updates-&gt;Find and Install...-&gt;Search for New Features to Install</i>. There create a new site clicking on the "New Remote Site" button. In "Name" In "Name" write "Quantum DB Update Site". In "URL" type " <b>http://quantum.sourceforge.net/update-site</b>". Then click on "Finish". You'll have to get something like this screen, only without the error message (that's if you still haven't installed GEF, and without the marks in the selection boxes. You have to select the features you want (select them all if in doubt) and click on "Finish"</p><br /><div class="postTitle"><a class="postTitle2" id="viewpost1_TitleUrl" href="../../apple0668/archive/2008/04/21/194576.html">eclipse的第一个struts2插件：Alveole Studio MVC Web Project An eclipse plugin for Struts 2</a></div>eclipse第一个struts2插件<br /><br />官方地址：http://mvcwebproject.sourceforge.net<br /><br />一：安装<br />            启动eclipse3.3 在help----&gt;software updates-----&gt;find and install----&gt;install new features----&gt;New remote site-----&gt;输入 http://mvcwebproject.sourceforge.net<br /><br />安装教程地址：<a href="http://mvcwebproject.sourceforge.net/install.html">http://mvcwebproject.sourceforge.net/install.html</a><br /><br />二：使用<br />              使用手把手教程地址：http://mvcwebproject.sourceforge.net/tutorial.html<br /><br />三：使用教程手把手地址中的helloword例子源码：<br />              下载地址：http://mvcwebproject.sourceforge.net/tutorials/HelloWorld2.zip <br /><br /><br /><b>SubVersion plugin<br />   <a href="http://subclipse.tigris.org/install.html">http://subclipse.tigris.org/install.html</a><br /></b><br /><img src ="http://www.blogjava.net/zhyiwww/aggbug/180092.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/zhyiwww/" target="_blank">zhyiwww</a> 2008-02-15 15:58 <a href="http://www.blogjava.net/zhyiwww/archive/2008/02/15/180092.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>我常使用的软件收集</title><link>http://www.blogjava.net/zhyiwww/archive/2007/08/13/136320.html</link><dc:creator>zhyiwww</dc:creator><author>zhyiwww</author><pubDate>Mon, 13 Aug 2007 03:00:00 GMT</pubDate><guid>http://www.blogjava.net/zhyiwww/archive/2007/08/13/136320.html</guid><wfw:comment>http://www.blogjava.net/zhyiwww/comments/136320.html</wfw:comment><comments>http://www.blogjava.net/zhyiwww/archive/2007/08/13/136320.html#Feedback</comments><slash:comments>2</slash:comments><wfw:commentRss>http://www.blogjava.net/zhyiwww/comments/commentRss/136320.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/zhyiwww/services/trackbacks/136320.html</trackback:ping><description><![CDATA[Eclipse<br />    Java开发工具<br />Jbuilder<br />    Java开发工具<br />MindManager<br />    思维导图软件<br />Firefox<br />    浏览器<br />Daemon<br />    一个好用的虚拟光驱<br />EditPlus<br />    文本编辑器,支持正则表达式<br />UltraEditor<br />    文本编辑器,支持正则表达式<br />RegexRubby<br />    正则表达式的搜索和测试工具<br />EditPad<br />    文本编辑器，支持正则表达式<br />PowerGrep<br />    正则表达式的搜索和测试工具<img src ="http://www.blogjava.net/zhyiwww/aggbug/136320.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/zhyiwww/" target="_blank">zhyiwww</a> 2007-08-13 11:00 <a href="http://www.blogjava.net/zhyiwww/archive/2007/08/13/136320.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>如何解决在linux上启动elcipse和myeclipse时出现的问题</title><link>http://www.blogjava.net/zhyiwww/archive/2006/11/24/83249.html</link><dc:creator>zhyiwww</dc:creator><author>zhyiwww</author><pubDate>Fri, 24 Nov 2006 06:36:00 GMT</pubDate><guid>http://www.blogjava.net/zhyiwww/archive/2006/11/24/83249.html</guid><wfw:comment>http://www.blogjava.net/zhyiwww/comments/83249.html</wfw:comment><comments>http://www.blogjava.net/zhyiwww/archive/2006/11/24/83249.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.blogjava.net/zhyiwww/comments/commentRss/83249.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/zhyiwww/services/trackbacks/83249.html</trackback:ping><description><![CDATA[在linux上,如果你刚装完了eclipse,那么在你启动的时候，可能就会抛异常。然后在使用的时候也不能创建新的工程。<br />如何解决这个问题呢？在网上有的朋友也说过这样的问题：自己写一个脚本，然后执行就可以了。<br />其实也可以使用下面的办法：<br />其实，出现异常的原因就是对文件的访问权限的问题。<br />所以我们只需要修改eclipse的文件权限就可以了。<br />方法如下，执行如下命令：<br />chmod 777 -R /program/eclipse （这个命令的意思是要修改eclipse下的每一个目录和文件的属性）<br />/program/eclipse是我的eclipse的安装目录．<br />现在，你在启动使用eclipse就不会有问题了．<br />等你装完了myeclipse,在使用就也没有问题了．<br />如果你没有执行上面的命令的话，那么你在使用Myeclipse也会出现和eclipse一样的异常．<img src ="http://www.blogjava.net/zhyiwww/aggbug/83249.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/zhyiwww/" target="_blank">zhyiwww</a> 2006-11-24 14:36 <a href="http://www.blogjava.net/zhyiwww/archive/2006/11/24/83249.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>MyEclipse的heap大小的设置</title><link>http://www.blogjava.net/zhyiwww/archive/2006/11/23/83055.html</link><dc:creator>zhyiwww</dc:creator><author>zhyiwww</author><pubDate>Thu, 23 Nov 2006 07:36:00 GMT</pubDate><guid>http://www.blogjava.net/zhyiwww/archive/2006/11/23/83055.html</guid><wfw:comment>http://www.blogjava.net/zhyiwww/comments/83055.html</wfw:comment><comments>http://www.blogjava.net/zhyiwww/archive/2006/11/23/83055.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.blogjava.net/zhyiwww/comments/commentRss/83055.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/zhyiwww/services/trackbacks/83055.html</trackback:ping><description><![CDATA[在使用MyEclipse编译程序的时候,提示heap空间不足,所以我们就需要自己设定其使用的heap的空间大小。默认情况下,Eclipse的使用的heap空间大小是64M。<br />出现的问题提示常常是，如图：<br /><img height="654" alt="heap.JPG" src="http://www.blogjava.net/images/blogjava_net/zhyiwww/Eclipse/heap.JPG" width="958" border="0" /><br /><br />解决方案：<br />在eclipse的安装目录下面，新建一个文件eclipse.ini,内容如下：<br />-vmargs<br />-Xms128m<br />-Xmx512m<br /><font color="#000080" size="4">-XX:PermSize=256M</font><br />-XX:MaxPermSize=512M<br /><br />蓝色字体的部分是最主要的配置参数．<br />然后重启eclipse,一切ok．<img src ="http://www.blogjava.net/zhyiwww/aggbug/83055.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/zhyiwww/" target="_blank">zhyiwww</a> 2006-11-23 15:36 <a href="http://www.blogjava.net/zhyiwww/archive/2006/11/23/83055.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>Eclipse的启动参数</title><link>http://www.blogjava.net/zhyiwww/archive/2006/11/23/83039.html</link><dc:creator>zhyiwww</dc:creator><author>zhyiwww</author><pubDate>Thu, 23 Nov 2006 06:48:00 GMT</pubDate><guid>http://www.blogjava.net/zhyiwww/archive/2006/11/23/83039.html</guid><wfw:comment>http://www.blogjava.net/zhyiwww/comments/83039.html</wfw:comment><comments>http://www.blogjava.net/zhyiwww/archive/2006/11/23/83039.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.blogjava.net/zhyiwww/comments/commentRss/83039.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/zhyiwww/services/trackbacks/83039.html</trackback:ping><description><![CDATA[
		<strong>
				<span class="tpc_title">调整Eclipse的启动(转载)</span>
				<br />
		</strong>
		<span class="tpc_content">
				<font size="2">
						<br />
						<br />如果你觉得你的Eclipse在启动的时候很慢（比如说超过20秒钟），也许你要调整一下你的Eclipse启动参数了，以下是一些``小贴士'':<br /><br />1. 检查启动Eclipse的JVM设置。 在Help\About Eclipse SDK\Configuration Detail里面，你可以看到启动Eclipse的JVM。 这个JVM和你在Eclipse中设置的Installed JDK是两回事情。 如果启动Eclipse的JVM还是JDK 1.4的话，那最好改为JDK 5，因为JDK 5的性能比1.4更好。<br /><br />C:\eclipse\eclipse.exe -vm "C:\Program Files\Java\jdk1.5.0_08\ bin\javaw.exe"<br /><br />2. 检查Eclipse所使用的heap的大小。 在C:\eclipse目录下有一个配置文件eclipse.ini，其中配置了Eclipse启动的默认heap大小<br /><br />-vmargs<br />-Xms40M<br />-Xmx256M<br /><br />所以你可以把默认值改为:<br /><br />-vmargs<br />-Xms256M<br />-Xmx512M<br /><br />当然，也可以这样做，把堆的大小改为256 - 512。<br /><br />C:\eclipse\eclipse.exe -vm "C:\Program Files\Java\jdk1.5.0_08\ bin\javaw.exe" -vmargs -Xms256M -Xmx512M<br /><br />3. 其他的启动参数。 如果你有一个双核的CPU，也许可以尝试这个参数:<br /><br />-XX:+UseParallelGC<br /><br />让GC可以更快的执行。（只是JDK 5里对GC新增加的参数）</font>
		</span>
<img src ="http://www.blogjava.net/zhyiwww/aggbug/83039.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/zhyiwww/" target="_blank">zhyiwww</a> 2006-11-23 14:48 <a href="http://www.blogjava.net/zhyiwww/archive/2006/11/23/83039.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>如何在Eclipse中显示行号</title><link>http://www.blogjava.net/zhyiwww/archive/2006/10/27/77622.html</link><dc:creator>zhyiwww</dc:creator><author>zhyiwww</author><pubDate>Fri, 27 Oct 2006 06:35:00 GMT</pubDate><guid>http://www.blogjava.net/zhyiwww/archive/2006/10/27/77622.html</guid><wfw:comment>http://www.blogjava.net/zhyiwww/comments/77622.html</wfw:comment><comments>http://www.blogjava.net/zhyiwww/archive/2006/10/27/77622.html#Feedback</comments><slash:comments>53</slash:comments><wfw:commentRss>http://www.blogjava.net/zhyiwww/comments/commentRss/77622.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/zhyiwww/services/trackbacks/77622.html</trackback:ping><description><![CDATA[
		<h1 style="MARGIN: 17pt 0cm 16.5pt; TEXT-ALIGN: center" align="center">
				<span style="COLOR: green; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">如何在</span>
				<span lang="EN-US" style="COLOR: green">Eclipse</span>
				<span style="COLOR: green; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">中显示行号</span>
				<span lang="EN-US" style="COLOR: green">
						<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /?>
						<o:p>
						</o:p>
				</span>
		</h1>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 21pt">
				<b style="mso-bidi-font-weight: normal">
						<span style="FONT-SIZE: 12pt; FONT-FAMILY: 楷体_GB2312">这个问题，困扰了我好长时间，今天终于找到了。其实很简单，经过以下几步，就一切搞定了：<span lang="EN-US"><o:p></o:p></span></span>
				</b>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt 21pt; TEXT-INDENT: -21pt; mso-list: l0 level1 lfo1; tab-stops: list 21.0pt">
				<b style="mso-bidi-font-weight: normal">
						<span lang="EN-US" style="FONT-SIZE: 12pt; FONT-FAMILY: 楷体_GB2312; mso-bidi-font-family: 楷体_GB2312">
								<span style="mso-list: Ignore">1)<span style="FONT: 7pt 'Times New Roman'">     </span></span>
						</span>
				</b>
				<b style="mso-bidi-font-weight: normal">
						<span style="FONT-SIZE: 12pt; FONT-FAMILY: 楷体_GB2312">先打开一个类，如下图：<span style="COLOR: green; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'"><img style="WIDTH: 585px; HEIGHT: 391px" height="526" alt="class.JPG" src="http://www.blogjava.net/images/blogjava_net/zhyiwww/Eclipse/class.JPG" width="774" border="0" /></span><br /><br /><span lang="EN-US"><o:p></o:p></span></span>
				</b>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt -44.95pt; TEXT-ALIGN: center; mso-para-margin-left: -4.28gd" align="center">
				<b style="mso-bidi-font-weight: normal">
						<span lang="EN-US" style="FONT-SIZE: 12pt; FONT-FAMILY: 楷体_GB2312">
								<?xml:namespace prefix = v ns = "urn:schemas-microsoft-com:vml" /?>
								<v:shapetype id="_x0000_t75" stroked="f" filled="f" path="m@4@5l@4@11@9@11@9@5xe" o:preferrelative="t" o:spt="75" coordsize="21600,21600">
										<v:stroke joinstyle="miter">
										</v:stroke>
										<v:formulas>
												<v:f eqn="if lineDrawn pixelLineWidth 0">
												</v:f>
												<v:f eqn="sum @0 1 0">
												</v:f>
												<v:f eqn="sum 0 0 @1">
												</v:f>
												<v:f eqn="prod @2 1 2">
												</v:f>
												<v:f eqn="prod @3 21600 pixelWidth">
												</v:f>
												<v:f eqn="prod @3 21600 pixelHeight">
												</v:f>
												<v:f eqn="sum @0 0 1">
												</v:f>
												<v:f eqn="prod @6 1 2">
												</v:f>
												<v:f eqn="prod @7 21600 pixelWidth">
												</v:f>
												<v:f eqn="sum @8 21600 0">
												</v:f>
												<v:f eqn="prod @7 21600 pixelHeight">
												</v:f>
												<v:f eqn="sum @10 21600 0">
												</v:f>
										</v:formulas>
										<v:path o:connecttype="rect" gradientshapeok="t" o:extrusionok="f">
										</v:path>
										<o:lock aspectratio="t" v:ext="edit">
										</o:lock>
								</v:shapetype>
								<o:p>
								</o:p>
						</span>
				</b>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt 21pt; TEXT-INDENT: -21pt; mso-list: l0 level1 lfo1; tab-stops: list 21.0pt">
				<b style="mso-bidi-font-weight: normal">
						<span lang="EN-US" style="FONT-SIZE: 12pt; FONT-FAMILY: 楷体_GB2312; mso-bidi-font-family: 楷体_GB2312">
								<span style="mso-list: Ignore">2)<span style="FONT: 7pt 'Times New Roman'">     </span></span>
						</span>
				</b>
				<b style="mso-bidi-font-weight: normal">
						<span style="FONT-SIZE: 12pt; FONT-FAMILY: 楷体_GB2312">然后打开视图，如何打开呢？最能解决问题的也就在此了：<span lang="EN-US"><o:p></o:p></span></span>
				</b>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt 21pt">
				<b style="mso-bidi-font-weight: normal">
						<span style="FONT-SIZE: 12pt; FONT-FAMILY: 楷体_GB2312">按<span lang="EN-US">Ctrl+F10,</span>效果如下图：<br /><img style="WIDTH: 586px; HEIGHT: 354px" height="460" alt="view.JPG" src="http://www.blogjava.net/images/blogjava_net/zhyiwww/Eclipse/view.JPG" width="777" border="0" /><br /><span lang="EN-US"><o:p></o:p></span></span>
				</b>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt -45pt">
				<b style="mso-bidi-font-weight: normal">
						<span lang="EN-US" style="FONT-SIZE: 12pt; FONT-FAMILY: 楷体_GB2312">
								<o:p>
								</o:p>
						</span>
				</b>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt 21pt; TEXT-INDENT: -21pt; mso-list: l0 level1 lfo1; tab-stops: list 21.0pt">
				<b style="mso-bidi-font-weight: normal">
						<span lang="EN-US" style="FONT-SIZE: 12pt; FONT-FAMILY: 楷体_GB2312; mso-bidi-font-family: 楷体_GB2312">
								<span style="mso-list: Ignore">3)<span style="FONT: 7pt 'Times New Roman'">     </span></span>
						</span>
				</b>
				<b style="mso-bidi-font-weight: normal">
						<span style="FONT-SIZE: 12pt; FONT-FAMILY: 楷体_GB2312">然后选择<span lang="EN-US">Show Line Numbers<br /><img style="WIDTH: 585px; HEIGHT: 320px" height="423" alt="select.JPG" src="http://www.blogjava.net/images/blogjava_net/zhyiwww/Eclipse/select.JPG" width="773" border="0" /><br /><o:p></o:p></span></span>
				</b>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt -45.05pt; mso-para-margin-left: -4.29gd">
				<b style="mso-bidi-font-weight: normal">
						<span lang="EN-US" style="FONT-SIZE: 12pt; FONT-FAMILY: 楷体_GB2312">
								<o:p>
								</o:p>
						</span>
				</b>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt 21pt; TEXT-INDENT: -21pt; mso-list: l0 level1 lfo1; tab-stops: list 21.0pt">
				<b style="mso-bidi-font-weight: normal">
						<span lang="EN-US" style="FONT-SIZE: 12pt; FONT-FAMILY: 楷体_GB2312; mso-bidi-font-family: 楷体_GB2312">
								<span style="mso-list: Ignore">4)<span style="FONT: 7pt 'Times New Roman'">     </span></span>
						</span>
				</b>
				<b style="mso-bidi-font-weight: normal">
						<span style="FONT-SIZE: 12pt; FONT-FAMILY: 楷体_GB2312">最后的效果如图：<br /><img style="WIDTH: 578px; HEIGHT: 267px" height="401" alt="Line result.JPG" src="http://www.blogjava.net/images/blogjava_net/zhyiwww/Eclipse/Line%20result.JPG" width="773" border="0" /><br /><span lang="EN-US"><o:p></o:p></span></span>
				</b>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt -44.95pt; mso-para-margin-left: -4.28gd">
				<b style="mso-bidi-font-weight: normal">
						<span lang="EN-US" style="FONT-SIZE: 12pt; FONT-FAMILY: 楷体_GB2312">
								<o:p>
								</o:p>
						</span>
				</b>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt 21pt; TEXT-INDENT: -21pt; mso-list: l0 level1 lfo1; tab-stops: list 21.0pt">
				<b style="mso-bidi-font-weight: normal">
						<span lang="EN-US" style="FONT-SIZE: 12pt; FONT-FAMILY: 楷体_GB2312; mso-bidi-font-family: 楷体_GB2312">
								<span style="mso-list: Ignore">5)<span style="FONT: 7pt 'Times New Roman'">     </span></span>
						</span>
				</b>
				<b style="mso-bidi-font-weight: normal">
						<span lang="EN-US" style="FONT-SIZE: 12pt; FONT-FAMILY: 楷体_GB2312">
								<span style="mso-spacerun: yes"> </span>
						</span>
				</b>
				<b style="mso-bidi-font-weight: normal">
						<span style="FONT-SIZE: 12pt; FONT-FAMILY: 楷体_GB2312">就这样简单，你就可以在编辑器中看到你的代码的行号了。<b style="mso-bidi-font-weight: normal"><span style="FONT-SIZE: 12pt; FONT-FAMILY: 楷体_GB2312">其实最重要的是知道<span lang="EN-US">Ctrl+F10</span>能打开视图菜单就一切搞定了。<span lang="EN-US"><o:p></o:p></span></span></b></span>
				</b>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt">
				<span lang="EN-US">
						<o:p> </o:p>
				</span>
		</p>
<img src ="http://www.blogjava.net/zhyiwww/aggbug/77622.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/zhyiwww/" target="_blank">zhyiwww</a> 2006-10-27 14:35 <a href="http://www.blogjava.net/zhyiwww/archive/2006/10/27/77622.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>Apache配置(转载)</title><link>http://www.blogjava.net/zhyiwww/archive/2006/10/25/77234.html</link><dc:creator>zhyiwww</dc:creator><author>zhyiwww</author><pubDate>Wed, 25 Oct 2006 08:59:00 GMT</pubDate><guid>http://www.blogjava.net/zhyiwww/archive/2006/10/25/77234.html</guid><wfw:comment>http://www.blogjava.net/zhyiwww/comments/77234.html</wfw:comment><comments>http://www.blogjava.net/zhyiwww/archive/2006/10/25/77234.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.blogjava.net/zhyiwww/comments/commentRss/77234.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/zhyiwww/services/trackbacks/77234.html</trackback:ping><description><![CDATA[
		<!-- If you want a menu, uncomment the following lines and
    put (require 'emacs-wiki-menu) in your Emacs setup somewhere.
     -->
		<script type="text/javascript"><![CDATA[
function showToolTip(machaine) {
  if (machaine != "")   {
    document.getElementById('tooltip').innerHTML     = machaine;
    document.getElementById('tooltipbox').style.visibility = 'visible';
  }
}
function hide() {
  document.getElementById('tooltip').innerHTML     = '';
  document.getElementById('tooltipbox').style.visibility = 'hidden';
}
]]&gt;</script>
 
<h1 class="menuitem" align="center">Apache配置</h1><!-- Page published by Emacs Wiki begins here --><dl class="contents"></dl><pre class="example">   <a href="http://grid.tsinghua.edu.cn/home/liulk/publish/computer/ApacheConfig.html">http://grid.tsinghua.edu.cn/home/liulk/publish/computer/ApacheConfig.html

</a>  Linux Apache Web 服务器终极教程作者：佚名 文章来源：internet 

  根据著名的WWW服务器调查公司所作的调查，世界上百分之五十以上的WWW服务
  器都在使用Apache，是世界排名第一的WEB服务器。Apache的诞生极富有戏剧性。
  当NCSA WWW服务器项目停顿后，那些使用NCSA WWW服务器的人们开始交换他们
  用于该服务器的补丁程序，他们也很快认识到成立管理这些补丁程序的论坛是
  必要的。就这样，诞生了Apache Group，后来这个团体在NCSA的基础上创建了
  Apache。

  　　Apache的主要特征是：

  . 　可以运行上所有计算机平台；

  . 　支持最新的HTTP 1.1协议；

  . 　简单而强有力的基于文件的配置；

  . 　支持通用网关接口CGI；

  . 　支持虚拟主机；

  . 　支持HTTP认证；

  . 　集成Perl脚本编程语言；

  . 　集成的代理服务器；

  . 　具有可定制的服务器日志；

  . 　支持服务器端包含命令（SSI）

  . 　支持安全Socket层（SSL）

  . 　用户会话过程的跟踪能力；

  . 　支持FastCGI；

  . 　支持Java Servlets。


  安装Apache


  　　下面我们就开始漫漫征服Apache之旅，通过循序渐进的需求实例，一步步
  地学习使用Apache，从入门到精通。



  系统需求

  　　运行Apache不需要太多的计算资源。它在有6-10MB硬盘空间和8MB RAM的
  Linux系统上运行得很好。然而，只运行Apache可能不是你想做的事情。更可能
  的是，你想运行Apache来提供WWW服务、启动CGI进程以及充分利用所有WWW能够
  提供的令人惊奇的功能。在这种情况下，你需要提供反映负载要求的额外的磁
  盘空间和内存空间。也就是说，如果仅仅是启动WWW服务并不需要太多的系统资
  源，但是想要能为大量的客户提供服务就需要更多的系统资源。

  获取软件

  　　你可以在http://www.apache.org中获得Apache的最新版。而几乎所有的
  Linux发行版中均包含有Apache软件包，你也可以直接使用它。

  需要注意的是，Apache软件包有两种：一种是源代码，下载后需要自己重新编
  译；另一种是可执行文件，下载后只需解压就可以使用。



  安装软件

  　　你可以通过以下三种方法安装Apache服务器。


  　　1．如果你安装的Linux版本中带用Apache的话，就在选择所要安装的服务
  器的时候，将httpd这个服务选上，Linux安装程序将自动完成Apache的安装工
  作，并做好基本的配置。

  　　2．使用可执行文件软件包，这比较适合那些对编译工作不是太熟悉的初级
  用户，因为它相对比较简单。

  　　下载软件包apache_1.2.4.e.tar.gz

  　　tar xvzf apache_1.2.4.e.tar.gz

  　　这就完成了安装工作，简单吧！

  　　如果你使用的是RedHat Linux的话，你也可以下载apache_1.2.4.rpm软件
  安装包，然后使用rpm -ivh 　　apache_1.2.4.rpm命令安装。

  　　3．如果你想把Apache服务器充分利用起来的话，就一定要自己编译
  Apache定制其功能。

  下载包含Apache源代码的软件包apache_1.2.4.tar.gz； 然后用tar命令将它解
  开； 将当前目录改变为Apache源代码发行版的src目录； 将配置样本文件
  （Configuration.tmpl）复制为Configuration文件；

  编辑Configuration文件中的配置选项：

  Makefile配置选项：一些编译选项：

  . "CC="一行指定用什么编译软件编译，一般为"CC=gcc"；

  . 如果需要将额外的标志（参数）指定给C编译软件，可以使用：

  EXTRA_CFLAGS=

  EXTRA_LFLAGS=

  . 如果系统需要特殊的库和包含文件，可以在这里指定它们：

  EXTRA_LIBS=

  EXTRA_INCLUDES=

  . 如果你要改变代码优化设置的话，你须将下面一句去掉注释，然

  后改成你所需要的值：

  #OPTIM=-O2

  Rule配置选项：用来决定需要什么功能，一般情况下无需改变。

  模块配置：模块是Apache的组成部分，它为Apache内核增加新功能。通过使用
  模块配置，可以自定义在Apache服务器中需要什么功能，这个部分也是Apache
  灵活性的表现。模块配置行如下所示：

  AddModule modules/standard/mod_env.o

  如果你需要Apache服务器具备什么功能，就将那个模块用AddModule语句加到配
  置文件Configuration中去。

  下表列出了Apache的模块功能：

  模块名 功能 缺省

  mod_access 提供基于主机的访问控制命令 y

  mod_actions 能够运行基于MIME类型的CGI脚本或HTTP请求方法 y

  mod_alias 能执行URL重定向服务 y

  mod_asis 使文档能在没有HTTP头标的情况下被发送到客户端 y

  mod_auth 支持使用存储在文本文件中的用户名、口令实现认证 y

  mod_auth_dbm 支持使用DBM文件存储基本HTTP认证 n

  mod_auth_mysql 支持使用MySQL数据库实现基本HTTP认证 n

  mod_auth_anon 允许以匿名方式访问需要认证的区域 y

  mod_auth_external支持使用第三方认证 n

  mod_autoindex 当缺少索引文件时，自动生成动态目录列表 y

  mod_cern_meta 提供对元信息的支持 n

  mod_cgi 支持CGI y

  mod_dir 能够重定向任何对不包括尾部斜杠字符命令的请求 y

  mod_env 使你能够将环境变量传递给CGI或SSI脚本 n

  mod_expires 让你确定Apache在服务器响应请求时如何处理Expires y

  mod_headers 能够操作HTTP应答头标 y

  mod_imap 提供图形映射支持 n

  mod_include 使支持SSI n

  mod_info 对服务器配置提供了全面的描述 y

  mod_log_agent 允许在单独的日志文件中存储用户代理的信息 n

  mod_log_config 支持记录日志 y

  mod_log_referer 提供了将请求中的Referer头标写入日志的功能 n

  mod_mime 用来向客户端提供有关文档的元信息 y

  mod_negotiation 提供了对内容协商的支持 y

  mod_setenvif 使你能够创建定制环境变量 y

  mod_speling 使你能够处理含有拼写错误或大小写错误的URL请求 n

  mod_status 允许管理员通过WEB管理Apache y

  mod_unique_id 为每个请求提供在非常特殊的条件下保证是唯一的标识 n


  在src目录下执行：". /configure"；

  编译Apache：执行命令"make"；

  根据机器性能的不同，经历一段5-30分钟的编译，就大功告成了。

  将编译好的可执行文件httpd复制到/etc/httpd/bin目录下；

  将Apache发行版的配置文件：access.conf、httpd.conf、mime.types、
  srm.conf文件复制到/etc/httpd/conf目录下。到此为止，安装完成。


  一些说明

  在Red Hat Linux 6.0中，Apache将自己的所有配置文件和日志文件放在了
  "/etc/httpd"目录下，其中"/etc/httpd/conf"下为配置文
  件，"/etc/httpd/log"下为日志文件。

  同时，它将建立"/home/httpd"目录，并在其下建立三个子目录："html/"：在
  这个目录下存放HTML（主页）文件；"cgi-bin/"：在这个目录下可以存放一些
  CGI程序；"icons/"：在这个目录下是服务器自带的一些图标。

  配置Apache基础篇，让WWW服务器跑起来

  Apache 服务器软件的配置文件主要有："access.conf"：用于设置系统中的存
  取方式和环境；"httpd.conf"：用于设置服务器启动的基本环境；
  "srm.conf"：主要用于做文件资源上的设定；"mime.type"：记录Apache服务器
  所能识别的MIME格式。

  在具体讲解之前，我们必须告诉大家，Apache已经在安装时就采用了一系列的
  缺省值，已经让WWW服务器跑起来了。你只需要将装上Linux+Apache的主机联入
  Internet，然后将主页存放到"/home/httpd"目录下即可。

  下面介绍一些最主要的配置选项的含义，以便大家用最小的精力、最小的配置
  准备好服务器。


  httpd.conf

  tpd.conf是主配置文件。它告诉服务器将如何运行。

  一、最重要的配置选项ServerType standalone | inetd

  　　这个配置选项指定如何运行WEB服务器。Apache可以使用两种方法来运行服
  务器：standalone(独立的)和inetd(由inetd运行的)。standalone参数表示
  WEB服务进程以一个单独的守候进程的方式在后台侦听是否有客户端的请求，如
  果有就生成一个子进程来为其服务。 inetd参数表示WEB服务不是以一个单独的
  守候进程的形式支持。而是由Inetd这个超级服务器守候进程进行代劳，当它收
  到一个客户端的WEB服务请求的时候，再启动一个WEB服务进程为其服务。从功
  能的角度看，这两种方法几乎是相同的。但它们之间实际有很大区别，区别在
  于服务器的性能。一个由 inted运行的服务器进程在它结束对请求服务的同时
  立刻退出。而在standalone模式下，子WWW服务器进程在退出之前要挂起一段时
  间，这就给它们提供了机会，可以重新用来服务新的请求。

  在standalone模式下，不存在对每个请求启动新进程的开销，所以它的效率更
  高；而inetd模式被认为比standalone模式更具安全性。

  standalone模式：

  此种模式下，WWW服务器侦听特定端口的连接请求。当客户机发出到特定端口地
  址的连接请求时，主服务器进程启动子WWW服务进程来服务该请求。另外还需要
  告诉主服务器进程侦听的特定端口地址，使用命令：

  Port [number] （缺省值为80）

  inetd模式

  inetd 是侦听有小于1024的端口连接请求的Internet守护进程(一个服务器进
  程)。与前面的方法不同，当客户系统发出到WWW服务器的连接请求时， inetd
  启动一个WWW服务器进程，由此进程服务此请求，完成服务后即退出。如果选择
  通过inetd服务器来运行Apache，需要编辑 /etc/inetd.conf文件为Apache添加
  一条新的记录：

  httpd stream tcp nowait httpd /etc/httpd/bin/httpd -f
  /etc/httpd/conf/httpd.conf

  修改了/etc/inetd.conf文件后，就需要修改/etc/services中添加一行

  httpd 80/tcp httpd

  做完以上修改后，需要重新启动inetd进程。首先，使用以下命令取得inetd的
  进程ID：

  ps auxw |grep inetd

  然后执行命令：kill -HUP &lt;inetd的进程ID&gt;

  在RedHat Linux中，默认是采用inetd服务器来运行Apache，所以只要你在安装
  时选择了httpd，以上工作在安装时就已经代你完成了。


  二、其它配置选项

  　　Server Admin命令，用来设置WEB管理员的E-Mail地址。这个地址会出现在
  系统连接出错的时候，以便访问者能够将情况及时地告知WEB管理员。

  命令格式: Server Admin [you E-Mail address]

  例：Server Admin admin@xxx.com

  ErrorLog命令，用来指定错误记录文件名称和路径。

  命令格式: ErrorLog [log filename]

  例：ErrorLog /var/httpd/error.log

  Timeout命令，只要客户端超过这里设定的秒数还没有完成一个请求的话，服务
  端将终止这次请求服务。如果网络速度较慢的话，建议在此设置较大的数值。
  以给客户端更多机会。

  命令格式: Timeout [second]

  例：Timeout 120

  ServerRoot命令，它指定在何处保存服务器的配置、错误及日志文件。

  命令格式: ServerRoot [fully qualified path name]

  例：ServerRoot /etc/httpd

  ServerName命令，它配置服务器的Internet主机名

  命令格式: ServerName [host name]

  例：ServerName www.xxx.com


  srm.conf

  srm.conf是资源配置文件，用它来告诉服务器你想在WWW站点上提供什么资源以
  及在哪里和如何提供们。

  DocumentRoot命令，用来指定主文档的地址。

  命令格式: DocumentRoot [Path]

  例：DocumentRoot /home/httpd/html

  UserDir 命令，用来指定个人主页的位置。如果你有一个用户test，那么它主
  目录是"/home/test"，当客户端输入"http: //yourdomain/~test";;，系统就
  会到对应的目录"/home/test/UserDir/"中去寻找。其中"UserDir"就是在
  UserDir命令中设置的指定目录。

  命令格式: UserDir [Path]

  例： UserDir Public_html

  DirectoryIndex 命令，用来声明首页文件名称。一般地，我们使用
  "index.html"或"index.htm"作为首页的文件名。如果这样设置后，那么客户端
  发出 WEB服务请求时，将首先调入的主页是在指定目录下文?quot;index.html"或
  "index.htm"。

  命令格式: DirecotryIndex [filename]

  例：DirecotryIndex index.html index.htm

  ScriptAlias命令，为脚本程序目录起个别名，具体可见4.7小节。

  命令格式: ScriptAlias [/alias/] [fullly qualified path for script
  directory]

  例： ScriptAlias /cgi-bin/ /home/httpd/cgi-bin


  access.conf的配置

  access.conf文件用来设置WWW站点上诸如文件、目录和脚本项目的访问权限。
  该文件的第一段非注释部分如下：

  &lt;Directory /home/httpd/html&gt;

  Option Indexes Includes ExecCGI FollowSymLink

  AllowOverride None

  Order allow , deny

  allow from all

  &lt;/Directory&gt;

  大家应该注意到，这一个部分是以&lt;Directory /home/httpd/html&gt;开始，以
  &lt;/Directory&gt;结束的。这表示在其中间的部分都是针对指定目录
  &amp;#0;&amp;#0;"/home/httpd/html"而言的。

  1．Option命令有很多的参数，各个参数的意义如下所示：

  All 准许以下所有功能（MultiViews除外）；

  MultiViews 准许内容协商的Multiviews；

  Indexes 若该目录下无index文件，则准许显示该目录下的文件以供选择；

  IncludesNOEXEC 准许SSI(Server-side Includes)，但不可使用#exec和
  #include功能；

  Includes 准许SSI；

  FollowSymLinks 准许符号链接到其他目录；

  ExecCGI 准许该目录下可以使用CGI。

  2．而AllowOverride命令则是用来决定是否准许在"access.conf"文件中设定的
  权限是否可以被在文件".htaccess"中设定的权限覆盖。它有两个参数：

  All 准许覆盖；

  None 不准许覆盖。

  3．Order命令：用来设定谁能从这个服务器取得控制。它也有两个参数：


  allow 可以取得控制；

  deny 禁止取得控制。

  现在我们一起来看看关于目录"/home/httpd/html"的设置的含义：它使得这个
  目录，如果不存在index.htm文件时，列出目录信息以供选择，准许SSI，允许
  执行CGI程序，开启了动态连接。它不允许再使用在文件".htaccess"中设定来
  覆盖这里所设置的权限。使所有的人都可以取得控制。

  该文件的第二段非注释部分如下：

  &lt;Directory /home/httpd/cgi-bin&gt;

  Option ExecCGI

  AllowOverride None

  &lt;/Directory&gt;

  这个表示目录"/home/httpd/cgi"的设置为，当前目录下可以执行CGI程序。不
  允许再使用在文件".htaccess"中设定来覆盖这里所设置的权限。

  需要说明的是，不同的LINUX系统中，可以在这个文件中看到的信息不完全相
  同，但是根据这里给出的信息，大家可以参照命令的解释自行理解文件中的设
  置，以及根据自己的需要进行相应的修改。

  4.4 使新的配置生效

  在上面，我们可能已经根据新的需求更改了相应的配置选项，如果我们要使得
  这个新的配置立即生效。我们就必须重新启动WEB服务进程。在LINUX中，我们
  可以十分方便地使用命令行来使得WEB服务进程重启。

  /etc/rc.d/init.d/httpd restart

  五、为用户开辟个人主页空间


  如果我们利用了LINUX系统架设了一台WEB服务器，我们不仅可以存放公司的主
  页，而且还可以为公司的每一个员工提供一块个人主页的空间。

  首先，为需要个人主页空间的员工在LINUX上开设一个帐号。这样，它就拥有了
  一个用户主目录"/home/用户帐号名"。

  addusr 用户帐号名

  passwd 用户帐号名

  在用户主目录下建立一个目录"public_html"，然后为其设置相应的权限。

  cd ~用户帐号名

  mkdir public_html

  chmod 755 public_html

  确认在srm.conf文件中的UserDir命令设置的是public_html目录。让员工将自
  己的个人主页上传到自己用户主目录下的public_html目录中。

  现在就可以使用"http://www.company.com/~用户帐号名"来访问员工的个人主
  页了。

  用Apache实现虚拟主机服务


  　　什么是虚拟主机服务

  　　所谓的虚拟主机服务就是指将一台机器虚拟成多台WEB服务器。举个例子来
  说，一家公司想从事提供主机代管服务，它为其它企业提供WEB服务。那么它肯
  定不是为每一家企业都各准备一台物理上的服务器，而是用一台功能较强大的
  大型服务器，然后用虚拟主机的形式，提供多个企业的WEB服务，虽然所有的
  WEB服务就是这台服务器提供的，但是让访问者看起来却是在不同的服务器上获
  得WEB服务一样。


  　　具体地说，就是，我们可以利用虚拟主机服务将两个不同
  www.company1.comwww.company2.com的主页内容都存放在同一台主机上。而访
  问者只需输入公司的域名就可以访问到它想得到的主页内容。 用Apache设置虚
  拟主机服务通常可以采用两种方案：基于IP地址的虚拟主机和基于名字的虚拟
  主机，下面我们分别介绍一下它们的实现方法。以便大家在具体的应用中能够
  选择最合适的实现方法。


  设置实现基于IP地址的虚拟主机服务实现前提

  　　这种方式需要在机器上设置IP别名，也就是在一台机器的网卡上绑定多个
  IP地址去为多个虚拟主机服务。而且要使用这项功能还要确定在你的LINUX内核
  中必须支持IP别名的设置，否则你还必须重新编译内核。

  　　下面举一个拥有两个虚拟主机的服务设置，以供参考。

  2．配置步骤

  假设，我们用来实现虚拟主机服务的机器，首先已经为自己提供了WEB服务，现
  在将为新的一家www.company1.com提供虚拟主机服务。

  规划IP地址：为虚拟主机申请新的IP地址。（假设本机IP地址为202.101.2.1）

  www.company1.com 202.101.2.2

  2) 让ISP作好相应的域名解析工作。

  3) 为网卡设置IP别名：

  /sbin/ifconfig eth0:0 202.101.2.2 netmask 255.255.255.0

  4) 重新设置"/etc/httpd/conf/httpd.conf",在文件中加入：

  &lt;VirtualHost 202.101.2.2&gt;

  ServerAdmin webmaster@yourdomain.com

  DocumentRoot /home/httpd/www.company1.com

  ServerName www.company1.com

  ErrorLog /var/log/httpd/www.company1.com/error.log

  &lt;/VirtualHost&gt;

  5）建立相应的目录。

  mkdir /home/httpd/www.company1.com

  mkdir /var/log/httpd/www.company1.com/error.log

  6)将相应的主页内容存放在相应的目录中即可。

  3．不利因素

  这种虚拟主机的实现方法有一个严重的不足，那就是，每增加一个虚拟主机，
  就必须增加一个IP地址。而由于IP地址空间已经十分紧张，所以通常情况下是
  无法取得这么多的IP地址的。而且从某种意义上说，这也是一种IP地址浪费。
  设置实现基于名字的虚拟主机服务而基于名字的虚拟主机服务，是比较适合使
  用的一种方案。因为它不需要更多的IP地址，而且配置简单，无须什么特殊的
  软硬件支持。现代的浏览器大都支持这种虚拟主机的实现方法。当然，这也就
  是指一些早期的客户端浏览器也许不支持这种虚拟主机的实现方法。

  　　正是以上原因，我们没有理由不使用基于名字的虚拟主机服务而使用基于
  IP地址的虚拟主机服务。配置基于名字的虚拟主机服务需要修改配置文
  件?quot;/etc/httpd/conf/httpd.conf"，在这个配置文件中增加以下内容。

  NameVirtualHost 202.101.2.1

  &lt;VirtualHost 202.101.2.1&gt;

  ServerAdmin webmaster@yourdomain.com

  DocumentRoot /home/httpd/www.company1.com

  ServerName www.company1.com

  ErrorLog /var/log/httpd/www.company1.com/error.log

  &lt;/VirtualHost&gt;

  &lt;VirtualHost 202.101.2.1&gt;

  ServerAdmin webmaster@yourdomain.com

  DocumentRoot /home/httpd/www.company2.com

  ServerName www.company2.com

  ErrorLog /var/log/httpd/www.company2.com/error.log

  &lt;/VirtualHost&gt;

  　　也就是在基于IP地址的配置基础上增加一句：NameVirtualHost
  202.101.2.1而已。在本例中，为了体现只需要增加一次，所以特别地设置了两
  个虚拟主机服务。

  最后也是建立相应的目录，将主页内容放到相应的目录中去就可以了。


  配置CGI

  1. 什么是CGI

  CGI是独立于语言的网关接口规范，它实际上可以用任何广泛流行的应用程序开
  发语言来实现，包括C、C++、Perl、Shell脚本甚至Java。

  WEB服务器从客户端得到某个URL，它告诉WEB服务器，必须运行一个CGI外部应
  用程序。那么WEB服务器启动这一应用程序，等待它完成并返回输出结果。最
  后，它将此应用程序的输出结果传输给另一端的WEB客户。

  2. 为CGI配置Apache

  那么如何使Apache能处理CGI请求呢？我们必须通过相应的配置过程告知
  Apache在哪里存储CGI程序，指明CGI程序的扩展等，以下我们逐一介绍一下设
  置的内容与步骤。

  创建存储CGI程序的目录

  创建集中的CGI程序目录只是建立CGI环境的开始。如果要考虑提高安全

  性的话，应将集中的CGI程序目录保存在DocumnetRoot目录外，使得访问者不能
  直接访问CGI程序。 第一步：在DocumentRoot目录外创建一个目录，然后将所
  有的CGI程序都集中存放在这个目录下。例如，你可创建一个
  /home/httpd/public/apps的目录作为CGI程序的大本营。

  第二步：为CGI程序目录创建别名，也就是编辑配置文件httpd.conf，加入：

  ScriptAlias /cgi-bin/ /home/httpd/public/apps

  这样做后，当客户www.xxx.com/cgi-bin/li.cgi时，WEB服务器就会自动执行
  WEB服务器上的/home/httpd/public/apps/li.cgi文件。

  第三步：为CGI目录设置合适的权限，一般是只允许Apache有读取和执行的权限
  但没有写的权限。

  允许用户访问cgi-bin

  我们已经在4.5小节中介绍了如何给用户开辟个人主页空间，但如果你的

  用户需要使他的主页更具有活力，往往会向你申请cgi-bin访问服务。下面我们
  就介绍一个Apache服务器为用户提供的两种cgi-bin访问方法。

  1）使用Directory或DirectoryMatch容器

  当在配置文件srm.conf中用UserDir命令被赋值为目录名称时，Apache就

  把它作为用户WWW站点的顶层目录。例如：

  UserDir Public_html

  当Apachewww.xxx.com/~user的请求，就到/home/user/Public_html取出主页发
  送给客户。

  如果要为每个用户添加CGI支持就在Apache的配置文件access.conf中添加下列
  配置：

  &lt;DirectoryMatch "/home/[a-z]+/public_html/cgi-bin"&gt;

  Options ExecCGI

  AddHandler cgi-script .cgi .pl

  &lt;/DirectoryMatch&gt;

  注：将DirectoryMatch换成Directory亦可

  在这种方法中，Apache服务www.xxx.com/~user/cgi-bin请求翻译成为了
  /home/user/Public_html/cgi-bin/，并允许执行任何带有正确扩展名(.cgi
  或.pl)的CGI程序。

  使用ScriptAliasMatch命令

  通过使用ScriptAliasMatch命令，也可以为每个用户添加CGI支持。例如：

  ScriptAliasMatch ~([a-z]+)/cgi-bin/(.*)
  /home/$1/public_html/cgi-bin/$2

  这个命令将用户名与$1相匹配，其中$1与~([a-z]+)相等。将/cgi-bin/后面的
  任何内容与$2相匹配，其中$2与(.*)相等。

  这个设置也就实现www.xxx.com/~user/cgi-bin/xxx.cgi请求解释为：

  /home/user/Public_html/cgi-bin/xxx.cgi

  那么大家想一想，如果你想将这个请求解释为：

  /home/httpd/public/apps/xxx.cgi

  该如何设置呢？对，应该是：

  ScriptAliasMatch ~([a-z]+)/cgi-bin/(.*) /home/httpd/public /apps/$2

  3. Apache为CGI提供的环境变量

  Apache服务器提供了许多环境变量可以用于CGI程序的编写，了解它们也一定有
  助于写出充分利用Apache的CGI程序，所以在此也对此作一简单介绍。


  服务器变量

  服务器变量由Apache设置用来通知CGI程序有关Apache的情况。通过使

  用这些变量，CGI程序能确定有关服务器的不同信息：Apache的版本，管理员的
  E-Mail地址等。


  SERVER_SOFTWARE

  这个变量是WWW服务器Apache的版本号，它的值形如：Apache/Version，如
  Apache/1.3；


  GATEWAY_INTERFACE

  这个变量的值是当前CGI规范的版本号，其值形如：CGI/1.1；

  SERVER_ADMIN

  如果在httpd.conf文件中有设置站点管理员的e-mail地址的话，这个变量就会
  存放着这个e-mail地址；


  DOCUMENT_ROOT

  这个变量存放在是被访问的WWW站点的DocumentRoot命令指定的值。

  客户请求变量

  Apache提供的有关客户请求方的环境变量有许多，以下只是有选择性地介绍一
  些最常见的。


  SERVER_NAME

  此变量可以告诉CGI程序它访问的是哪一个主机。这个值可以是IP地址也可以是
  完整的主机名；


  HTTP_ACCEPT

  此变量被赋值为客户所能接受的MIME类型的列表，如：HTTP_ACCEPT=image/gif；


  HTTP_ACCEPT_CHARSET

  此变量被赋值为客户所能接受的字符集，如：


  HTTP_ACCEPT_CHARASET=iso-8859-1.,*,utf-8；


  HTTP_ACCEPT_LANGUAGE

  此变量被赋值为客户所能接受的语言，如：HTTP_ACCEPT_LANGUAGE=en；


  HTTP_ACCEPT_AGENT

  这个变量指定发出请求的系统正在运行的浏览器类型和操作系统；

   HTTP_PORT：服务端口；

  REMOTE_HOST：客户端的IP地址或IP名称信息；


  REMOTE_PORT：客户端的端口号；

  4. 一点提示

  若干年来，通过网关接口（CGI）已成为服务器端应用程序开发的事实标准。但
  随着时间的推移，发现在沉重的CGI负担下许多WWW服务器系统的表现不尽人意。
  这是因为CGI规范存在瓶颈问题：每当客户系统请求CGI应用程序时，WWW服务器
  就必须启动新的CGI进程，直到完成任务后结束进程。这在负载不高时，会工作
  正常。但是，在高负载时，繁多的进程将成为性能的瓶颈问题。


  所以现在开始出现新的标准来弥补这一不足，其中FastCGI是很有前途的一种新
  的开放式标准。


  你可以在Apache中通过添加mod_fastcgi.c模块来支持FastCGI。


  解读Apache日志


  　　当你一步步地看到这里的时候，相信你的WWW站点已经建好，并且已经在
  Internet上展现出来了。这时你可能就会关心谁造访过你的站点，或者想知道
  你的Apache服务器现在的运行状态与性能如何。下面我们一起通过解读Apache
  的日志来实现这个伟大的愿望。

  一、盯着Apache服务器

  Apache允许通过WWW监视服务器的配置信息与运行状态。


  １．观看配置信息


  如果你的Apache象缺省配置一样加入了mod_info模块的话，你就可以通过访问
  http://localhost/server-info查看服务器信息。

  2.使用状态页

  如果你的Apache象缺省配置一样加入了mod_status模块的话，你就可以

  通过访问http://localhost/apache-status查看服务器的运行状态信息，其中
  包括：

  ¨ 服务器系统的当前时间；

  ¨ 服务器最近一次重启时间；

  ¨ 服务器启动后的运行时间；

  ¨ 到目前为止服务的访问总数；

  ¨ 到目前为止传输的字节总数；

  ¨ 服务请求的子进程数；

  ¨ 空闲子进程数；

  ¨ 每个进程状态、子进程服务的请求数以及该子进程传输的字节总数；

  ¨ 每秒平均请求数、每秒传输的字节数、每次请求平均传输字节数；

  ¨ 目前每个子进程CPU占用及Apache的总的CPU占用率；

  ¨ 当前主机及处理的请求。


  二、什么是日志文件


  日志文件是Apache工作的记录，Apache包括了mod_log_config模块，它用来记
  录日志。在缺省情况下，它用通用日志格式CLF规范来写。CLF日志文件内对每
  个请求均有一个单独行，形如：host ident anthuser date request status
  bytes

  其含义如下：

  ¨ host&amp;#0;&amp;#0;客户端主机的全称域名或IP地址；

  ¨ ident&amp;#0;&amp;#0;存放客户端报告的识别信息；

  ¨ authuser&amp;#0;&amp;#0;如果是基于用户名认证的话，值为用户名；

  ¨ date&amp;#0;&amp;#0;请求的日期与时间；

  ¨ request&amp;#0;&amp;#0;客户端的请求行；

  ¨ status&amp;#0;&amp;#0;返回到客户端的三们数字的HTTP状态码；

  ¨ bytes&amp;#0;&amp;#0;除去HTTP头标外，返回给客户端的字节数。


  三、分析日志文件


  有了日志文件后，我们可以利用UNIX的一些工具和一此专门的日志分析工具对
  日志文件进行分析。


  实例一：列出访问过本网站的主机名或IP：

  对于这个需求，我们可以通过一个Unix的一个脚本语句来完成：

  cat /var/log/httpd/access_log | awk '{print $1}'

  用上面的方法虽然可以得到访问过本网站的主机名或IP，但是由于有些是多次
  访问的，我们希望在上面得到的结果的基础上做一些优化，使得列出的表中，
  每个主机只出现一次。我们可以使用：

  cat /var/log/httpd/access_log | awk '{print $1}' | wc -l

  3. 当然，我们可以根据需要选择第三方提供日志分析工具甚至自己开发一些日
  3. 志分析工具来满足我们的需求。常见的第三方日志分析工具有：WebTrends、
  3. Wusage、wwwstat、http-analyze、pwebstats、WebStat Explorer、
  3. AccessWatch。


  四、一些提示

  日志一方面是我们分析网站的第一手资料，一方面却是吞噬大量磁盘空间的罪
  魁祸首。所以别忘了定期转储或删除一些老的日志文件。

  Apache与代理服务器

  　　代理服务器是位于客户和客户要访问的服务器之间的系统。当客户机使用
  URL请求访问远程资源时，代理服务器接受该请求并取得该资源以满足客户机的
  请求。在通常情况下，代理服务器是客户机的服务器，同时也是远程服务器的
  客户。

  　　代理服务器可以在自己的缓冲区中存储被请求的内容，当这些信息再次被
  请求的时候，代理服务器就无需再从远程服务器上取了，这样代理服务器就减
  轻了网络的瓶颈问题。

  Apache可以配置成为代理服务器。


  一、前向代理服务器和逆向代理服务器

  1．前向代理服务器

  前向代理服务器通常位于用户主机和要访问的远程网络之间。它从远程服务器
  取得所要求的资源，然后返回给用户，同时存在磁盘上，以供下次使用。

  在这种情况下，客户端的主机知道它们正在使用代理服务器，因为每个主机都
  必须配置为使用代理服务器。

  例如，必须告诉WWW浏览器使用代理服务器，它才能使用代理服务器。所有的远
  程请求都通过代理服务器传输。

  这类代理服务器也称为缓冲代理服务器。逆向服务器也可以缓冲数据，但它的
  作用愉好与前向服务器相反。

  2．逆向代理服务器

  逆向代理服务器位于互联网资源前面，逆向服务器从原始服务器找到被请求的
  资源，并反它返回给用户主机。

  与前向代理服务器不同的是，逆向代理服务器的用户并不知道它们连接的是代
  理服务器而不是资源服务器本身。其结构如下图所示：

  二、配置代理服务器


  　　为了允许Apache作为代理服务器，需要将ProxyRequests设为On，然后根据
  你希望代理服务器做什么而增加什么附加配置。无论你希望做什么，你所选的
  代理配置都应该放入一个特殊?lt;Directory&gt;容器中。


  &lt;Directory proxy:*&gt;

  …

  &lt;/Directory&gt;

  实例一：将私有IP网连到互联网

  假设私有网上只有一台计算机被分配了互联网上合法的IP地址，这台计算

  机运行Apache代理服务器，ProxyRequest设置为On，并且不需要附加其他配
  置，所有请求均可由这台代理服务器代理服务。

  实例二：让Apache允当远程WWW站点的缓冲

  第一步：将ProxyRequest设置为On

  第二步：创建配置如下：

  &lt;Directory proxy:*&gt;

  CacheRoot /www/cache

  CacheSize 1024

  CacheMaxExpire 24

  &lt;/Directory&gt;

  这里的意思是设置Cache目录为/www/cache；大小为1024KB，即1MB；缓冲中的
  内容在24小时后失效。

  实例三：建立镜像站点（其实这也就是所谓的逆向代理服务器）

  第一步：将ProxyRequest设置为On

  第二步：创建配置如下：

  &lt;Directory proxy:*&gt;

  ProxyPass / www.mot.com /

  CacheRoot /www/cache

  CacheDefaultExpire 24

  &lt;/Directory&gt;

  10.3 一些提示

  代理服务器，我们将会在后面的章节中详细介绍，这里只是针对Apache的功能
  介绍的。用Apache作代理服务器的性能并不高，效果并不好。不建议使用。

  安裝 Apache+PHP+MySQL+imap+GD+Ldap+opens

  注意事项：

  1.如果妳是用 Redhat based 的 Linux 的话，请执行 ntsysv 将 httpd 和
  1.Mysql 不要执行

  2.将 DOWNLOAD 的档案放到相同的目录，再用 tar zxvf xxxxxxxx.tar.gz 来
  2.解压缩，请依照要安装的软件进入适当的目录。

  3.可以到 http://linuxnews.idv.tw/download/ 来下载所需的程序。

  MySQL:

  ---------------------------------------------------------------

  ./configure --prefix=/usr/local/mysql --with-charset=big5

  make

  make install

  cd scripts

  ./mysql_install_db

  cd /usr/local/mysql/share/mysql/

  chmod 611 mysql.server

  ./mysql.server start

  #编辑 /etc/rc.d/rc.local 加入底下这行以便开机时自动执行 mysql

  /usr/local/mysql/share/mysql/mysql.server start

  imap:

  ---------------------------------------------------------------

  make slx

  cp ipopd/ipop*.* /usr/sbin

  cp imapd/imapd /usr/sbin

  cp c-client/c-client.a /usr/local/lib

  #请确定你有 /usr/local/include 这个目录

  cp c-client/rfc822.h /usr/local/include

  cp c-client/mail.h /usr/local/include

  cp c-client/linkage.h /usr/local/include

  GD:

  ---------------------------------------------------------------

  make

  make install

  Ldap:

  ---------------------------------------------------------------

  ./configure --prefix=/usr/local/ldap

  make

  make depend

  cd tests

  make

  cd ..

  make install

  Apache:

  ---------------------------------------------------------------

  ./configure --prefix=/usr/local/apache

  openssl:

  ---------------------------------------------------------------

  ./config

  make

  make test

  make install

  mod_ssl:

  ---------------------------------------------------------------

  ./configure --with-apache=../apache_1.3.19
  --with-ssl=../openssl-0.9.6 --prefix=../apache_1.3.19

  php:

  ---------------------------------------------------------------

  ./configure --with-mysql=/usr/local/mysql
  --with-apache=../apache_1.3.19 --enable-track-vars
  --with-gd=../gd-1.8.4 --with-imap=../imap-4.7c --enable-ftp
  --with-ldap=/usr/local/ldap

  make

  make install

  Apache:

  ---------------------------------------------------------------

  ./configure --prefix=/usr/local/apache
  --activate-module=src/modules/php4/libphp4.a --enable-module=ssl

  make

  make certificate

  #这时会问你一些问题，就是有关于加密的问题，最后要要求输入启动的密码，
  如果输入密码的话以后启动 httpd 的时候会询问密码，若不输

  #入密码的话启动就不会问了

  #PS.启动http

  #要加密：apachectl startssl

  #不加密：apachectl start

  make install

  修改 /etc/rc.d/rc.local 加入 /usr/local/apache/bin/apachectl start 来
  开机时自动启动 Apache

  再来就是修改 /usr/local/apache/conf/httpd.conf 的设定档，将 php 的支
  持加入

  建立Apache站点的基本安全机制

  对于WWW服务来说，在WWW服务器和WWW浏览器之间并不始终维持对话过程。办要
  WWW服务器完成对一个URL请求的服务，连接就断开了。

  在这种情况下，在WWW上保证可以使用的唯一认证机制是由HTTP本身提供 的。
  在标准的Apache服务器实现了这样的认证，它能控制哪些主机可能访问特定的
  站点或特点的站点的一部分。

  这种认证可以分为两种，一种是基于主机的的认证，另一种是基于用户名/口令
  的认证。由于互联网上的决大多数用户的IP地址是动态获得的，所以基于主机
  的认证方式并不总适用。所以在大多数情况下，传统的基于用户名/口令的认证
  方式更为现实。下面我们就对这两种认证的实现做一简要的介绍。

  1. 基于主机的认证方式

  在种认证模式顾名思义，访问是用主机名或主机IP地址来控制的。支持这种认
  证方式的是Apache的mod_access模块，这个模块缺省状态下是被安装了的。该
  模块用以下几种Apache命令来提供访问控制功能。

  allow命令

  语法：allow from host1 host2 host3 ...

  这个命令定义了允许访问站点或目录的主机清单。主机清单可以用以下几

  种形式表示：

  ALL：代表所有主机；

  主机的全域名，www.mot.com；

  主机的部分域名，如：.mot.com；

  完整的IP地址，如：202.98.2.32；

  部分IP地址，如：202.98

  网络地址/网络掩码对，如：202.98.0.0/255.255.0.0

  网络地址/nn(CIDR定义)，如：202.98.0.1/16

  deny命令

  语法：deny from host1 host2 host3 ...

  这个命令定义了禁止访问站点或目录的主机清单，其他与allow命令相似。

  order命令

  语法：order deny,allow | allow,deny

  这个命令定义评价allow和deny命令的先后顺序。

  例如：

  &lt;Directory /home/httpd/html&gt;

  order deny,allow

  deny from www.mot.com

  allow all

  &lt;/Directory&gt;

  这组命令设置了www.mot.com访问/home/httpd/html目录下的文件。

  请大家注意，顺序是先deny后allow，如果是：order allow,deny 那么，先允
  许所有的主机访问，然后再禁止，这样是无效的，所有主机仍然能够访问。

  2. 基于用户名/口令的认证方式

  这种认证方式其实相当简单，当WWW浏览器请求经此认证模式保护的URL

  时，将会出现一个对话框，要求用户键入用户名和口令。用户输入后，传给
  WWW服务器，WWW服务器验证它的正确性，如果正确，返回页面，否则返回401错
  误。要说明的一点是，这种认证模式是基本的，并不能用于安全性要求极高的
  场合。

  Apache 中有许多模块可以支持这种认证方式，下面我们就介绍一下最基本、最
  标准的mod_auth模块。正如前面提到的一样，mod_auth模块使用存储在文本文
  件中的用户名、组名和口令来实现认证。这种方法非常适合处理少量用户，它
  能工作得很好。如果你需要对大量的用户，如数以千计的用户做认证时，这种
  方法的性能将急剧下降到不可忍受，所以当这种情况下，就需要考虑使用
  mod_dbm模块或mod_mysql模块来获得更好的性能。

  实例一：需要用户名和口令的访问控制

  下面我们就一起来看一下如何建立需要用户名/口令才能进行访问的目录。

  基本情况： www.xxx.com

  的站点有设置为：

  DocumentRoot /home/httpd/html

  AccessFileName .htaccess

  AllowOverride All

  需求：限制/home/httpd/html/backup/目录的访问，只允许用户"super"以口令
  "fill-06"访问此目录。

  实现步骤：

  使用htpasswd建立用户文件

  htpasswd -c /home/httpd/secr/.htpasswd super

  此程序会询问用户"super"的口令，你输入"fill-06"，两次生效。

  建立.htaccess文件

  用vi在/home/httpd/html/backup/目录下建立一个文件.htaccess，写入

  以下几行：

  AuthName My Friend Only (注：这个名字是任取的)

  AuthType Basic

  AuthUserFile /home/httpd/secr/.htpasswd

  require user super

  设置文件权限，确保Apache用户有读的权限

  这样就完成了设置工作，你可以试一试效果了。

  实例二：允许一组用户访问一个目录

  假设，www.xxx.com想让myfriend组中的mf1与mf2两个用户分别能

  使用口令"mf001-1""mf002-2"访问/home/httpd/html/backup/目录。

  实现步骤：

  使用htpasswd建立用户文件

  htpasswd -c /home/httpd/secr/.htpasswd mf1

  htpasswd -c /home/httpd/secr/.htpasswd mf2

  建立组文件

  用vi/home/httpd/secr/目录下建立一个文件.htgroup，写入：

  myfriend:mf1 mf2

  建立.htaccess文件

  用vi在/home/httpd/html/backup/目录下建立一个文件.htaccess，写入

  以下几行：

  AuthName My Friend Only

  AuthType Basic

  AuthUserFile /home/httpd/secr/.htpasswd

  AuthGroupFile /home/httpd/secr/.htgroup

  require group myfriend

  配置工作到此结束，试一试吧！

  实例三：混合使用基于主机与基于用户名/口令的认证方式

  如果你除了只允许让mf1与mf2两个用户访问外，还想禁www.mot.com

  外的主机访问这个目录的话，就将/home/httpd/html/backup/.htaccess修改成
  为：

  AuthName My Friend Only

  AuthType Basic

  AuthUserFile /home/httpd/secr/.htpasswd

  AuthGroupFile /home/httpd/secr/.htgroup

  require group myfriend

  order deny,allow

  deny from all

  allow from www.mot.com


  不行，这不是我想要找的，我要再搜一搜声明：本站部分文章收集于网络，仅
  供个人学习之用，绝无任何商业目的；
</pre><pre class="example">本节将针对Apache中有关安全方面的设置做出详细的叙述，涉及到Apache的配置文件、Apache的目录访问控制、在Apache上运行CGI等安全方面的设置。
4.5.1  Apache的配置文件

对于RedHat Linux系统，Apache的配置文件放在/etc/httpd/conf/目录下。如果是自行编译安装的Apache，则视编译时指定的目录路径而定，默认是/usr/local/apache/conf。

在conf目录下有3个Apache的配置文件：

          httpd.conf

          access.conf

          srm.conf

Apache启动时先调用httpd.conf，然后调用srm.conf，最后调用access.conf。但现代版本的Apache为避免管理和维护的混乱，已经改为将所有Apache的相关配置命令放在httpd.conf文件中，不再使用srm.conf和access.conf文件。虽然这两个文件仍然存在，但内容中没有任何配置命令，形同虚设。

httpd.conf文件分为以下3部分：

          Global Environment

          'Main' server configuration

          Virtual Hosts 

下面将讲述这3部分的用法和与安全相关的注意点。
4.5.1.1  Global Environment

          ServerType standalone

用来指定Apache的启动方式：standalone和inetd。standalone模式是Apache独立运行，也是默认的启动方式。inetd模式是守护进程监听http的连接请求才启动httpd进程，请求完毕后就结束httpd进程，这样服务器负担很重。

          ServerRoot "/etc/httpd"

Apache的目录，此处是存放配置、出错记录、日志文件的根目录。目录后面不要加“/”字符。

          LockFile /var/lock/httpd.lock

保留默认值，不要更改。

          PidFile /var/run/httpd.pid

指定记录Apache的父进程id的文件名及路径。

          ScoreBoard /var/run/httpd.scoreboard

指定用于储存服务器进程处理信息的文件名和路径。

          #ResourceConfig conf/srm.conf

          #AccessConfig conf/access.conf

在标准的配置中，服务器启动时会处理这两个文件。因为现在的Apache只使用httpd.conf文件，摒弃了srm.conf和access.conf文件，所以这两行用“#”注释掉。

           Timeout 300

设置超时时间。如果远程客户端超过300秒还没连上Apache Server，或者Apache Server超过300秒没有传送字节给客户端，就立即断开连接。

           KeepAlive On

KeepAlive允许客户端的每个连接有多个请求，设为Off时此项无效。

           MaxKeepAliveRequests 100

设置每次连接期间所允许的最大请求数目。设为0时表示允许无限制数目。设置数字越大，则服务器性能越高。

           KeepAliveTimeout 15

设置等待同一个客户端的同一个连接发出下一个连接请求超过一定的时间就断线。

           MinSpareServers 5

          MaxSpareServers 20

设置最小的闲置服务处理程序的数目和最大的闲置服务处理程序的数目。如果实际数目少于MinSpareServers，则将增加处理程序；反之，如果实际数目超过MaxSpareServers，一些多余的处理程序将被杀掉。

           StartServers 8

设置启动并初始化后启动服务进程的数目。

           MaxClient 150

设置服务运行的总数量。一旦达到此数目，新来的客户端就被拒绝，所以该限制数目不能设得太小。

           MaxRequestsPerChild 100

设置每个子程序处理结果前的要求数目，设为0表示不限制。

           #Listen 3000

#Listen 12.34.56.78:80

Listen 80

设置Apache监听的连接端口或IP地址及端口，默认是80。

           #BindAddress *

该选项用来支持虚拟主机，并告知服务器监听哪个IP地址。可以使用“*”，或具体的IP地址和完整的域名。

           #LoadModule foo_module libexec/mod_foo.so

DSO（Dynamic Shared Object）支持。DSO模块的概念和作用与Windows的DLL文件极其相似。

           #ExtendedStatus On

当“server-status”管理程序被执行时，检查Apache的运行状态信息。默认是Off。
4.5.1.2  'Main' Server Configuration

如果在第一部分“Global Environment”中的ServerType命令设为inetd的话，那么这部分就没有任何效果，直接跳到ServerAdmin命令。

           Port 80

设置Standalone服务器监听的连接端口，也可以设为其他端口，必须小于1 023。必须以root身份才能更改端口。

           User apache

           Group apache

指定运行httpd的用户和用户组。必须首先以root身份指派。

           ServerAdmin root@localhost

设置管理员的电子邮件地址，当Apache有问题时会自动发E-mail通知管理员。

           #ServerName localhost

设置主机名称，可以用域名和IP地址。

           DocumentRoot "/var/www/html"

设置Apache放置网页的目录路径。

           &lt;Directory/&gt;

Options FollowSymLinks

AllowOverride None

&lt;Directory/&gt;

设置Apache能够访问的每一个目录被访问时所执行的动作。本章后面将详细叙述Apache的目录存取方法。

           &lt;Directory "/car/www/html"&gt;

Options Indexes Include FollowSymLinks

AllowOverride None

Order allow, deny

Allow from all

&lt;/Directory&gt;

此处设置Apache的网页目录的执行动作。本章节后面将详细叙述目录的存取方法。

           &lt;Directory/&gt;

AllowOverride None

Options None

Allow from all

&lt;/Directory&gt;

此处可以防止用户创建自己的.htaccess文件。在这个文件中可以改变全局参数，以致会影响到整个系统的安全。可以在httpd.conf文件中加入的命令中都加上上面的代码。

           UserDir public_html

设置用户在自己的目录下建立public_html放置网页，即/home/*/public_html/。这样在浏览器地址栏输入“http://Apache服务器/用户名/”就能显示网页。设置的目录必须告知用户，否则他们不知道网页放在什么地方。

           DirectoryIndex index.html index.htm index.shtml index.php index.php4 index.php3 index.cgi

设置Apache的默认首页文档。

           AccessFileName .htacess

指定控制存取的文件名称。Apache默认的是.htaccess。本章将在后面详细叙述该文件的用法。

           &lt;Files ~ "^\.ht&gt;

Order allow,deny

Deny from all

&lt;/Files&gt;

防止用户端看到ht开头的文件内容。因为.htaccess记载了相关信息，.htpasswd记载了密码信息，不允许其他人访问这些文件。

           #CacheNegotiatedDocs

指定Proxy服务器是否将交互产生的文件存在Cache中。将该命令注释掉则是不指定。

           UseCanonicalName On

设置是否使用标准的名称，默认是On。

           TypeConfig /etc/mime.types

指定存放MIME文件类型的文件。

           Default Type text/plain

如果Apache不能识别此文件类型时，则按照预设的格式显示，一般以文本文件显示。

           &lt;IfModule mod_mine_magic.c&gt;

MIMEMagicFile conf/magic

&lt;/ifModule&gt;

mod_mime_magic模块可以让Apache由文件内容决定其MIME类型。如果存在该模块，才会处理MIMEMagicFile这一段。上面3行是当没有该模块时就处理这一段。

           HostnameLookups off

设置Apache是否向名称服务器解析该IP地址，记录此链接的名称（如Hacker.com.cn）。因为DNS解析要花一定时间，所以默认设为off，仅记录IP。

           ErrorLog /var/log/httpd/error_log

指定Apache发生错误时记录文件的位置。如果在&lt;VirtualHost&gt;中没有指定记录文件，则用/var/log/httpd/error_log，否则使用&lt;VirtualHost&gt;指定的文件。

           LogLevel warn

指定记录的详细等级，有8个等级：debug、info、notice、warn、error、crit、alert和emerg。按从详细到简略排列。

           LogFormat "%h %l %u %t\"%r"\"%&gt;s%b\"{Referer}I"\"%{UserAgent}I\""combind

Logformat"%h%l%u%t\"%r"\"%&gt;s%b"common

Logformat "%{Referer}I-&gt;%U"referer

LogFormat"%{User-agent}I"agint

定义4种格式的别名：combind、commen、referer和agint。

           #CustomLog /var/log/httpd/access_log common

CustomLog /var/log.httpd/access_log combind

指定记录文件使用哪种自定义的格式。其他不使用的自定义格式将被注释掉。

以上是关于日志文件的，将在后面的Apache日志文件中详细叙述。

           ServerSignature On

设为On，当Apache产生错误时，就在网页上显示Apache的版本信息、主机名称、端口等一行信息。设为Off，就不显示相关的信息。设为E-mail时，就有“mailto:”给管理员的超链接。

           Alias/icons /"var/www/icons/"

使用较短的别名，其格式为：Alias 别名 原名。可以无限制地建立别名。注意别名的后面如果有“/”，那么在使用URL时也得有“/”。

           ScriptAlias /cgi-bin/ "/var/www/cgi-bin/"

和Alias类似，设置服务器脚本目录。

应该强制性地使用ScriptAlias命令来限定CGI程序位于某个或者某几个特定的位置。一般可以设置多个ScriptAlias。必须保证cgi-bin目录不在html目录下，这一点非常重要，这样可以防止黑客通过浏览它们而查看CGI程序。

           IndexOptions FancyIndexing

以特定的图形显示文件清单。

           AddIconByEncoding (CMP, /icons/compressed.gif) x-compress x-gzip

……

DefaultIcon /icons/unknown.gif

指定显示文件清单时各种文件类型的对应图形。
4.5.1.3  Virtual Hosts

这部分是设置虚拟主机的。所谓虚拟主机，就是指一台服务器作为多域名的Web服务器。ISP经常通过一台服务器为其客户提供Web服务。而客户通常希望主页以自己的名字出现，而不是在该ISP的名字后面，因为使用单独的域名和根网址可以看起来更正式一些。传统上，用户必须自己设立一台服务器才能达到拥有单独域名的目的，然而这需要维护一个单独的服务器。很多小单位缺乏足够的维护能力，更为合适的方式是租用别人维护的服务器。ISP也没有必要为一个机构提供一个单独的服务器，完全可以使用虚拟主机的能力，使服务器为多个域名提供Web服务，而且不同的服务互不干扰，对外就表现为多个不同的服务器。虚拟主机就是解决这种问题的方案，使客户的域名实际指向ISP的同一台服务器。
1．Apache支持虚拟主机的方式

Apache有两种支持虚拟主机的方式。一是为每一个虚拟主机设置单独的httpd进程，二是为所有的主机设置一个单独的httpd进程。

           为每一个虚拟机设置单独的httpd进程

在httpd.conf文件的第一部分Global Environment中的BindAddress命令或Listen命令就是用来指定虚拟主机的地址和端口的。

BindAddress命令用来指定单一的地址，可以使用域名或IP地址。该命令在httpd.conf文件中只能出现一次。

Listen命令可以让httpd进程监听多个地址或端口。反复使用Listen命令就能实现这个要求。

           为所有的主机设置一个单独的httpd进程

这是一个常用的方法。用户只要维护一个httpd.conf文件。在此文件的第三部分Virtual Host中，用&lt;VirtualHost&gt;&lt;/VirtualHost&gt;命令来为所有的虚拟主机进行配置。有多个虚拟主机就有多个&lt;VirtualHost&gt;段。在不同的虚拟主机的&lt;VirtualHost&gt;段中可以指定不同的ServerAdmin、ServerName、DocumentRoot、ErrorLog和TransferLog。
2．虚拟主机的实现方式

虚拟主机有三种实现方式：以主机名称的方式虚拟、以IP的方式虚拟、以端口的方式虚拟。下面就举一个在httpd.conf的第三部分Virtual Host中实现上面提及的方式的例子。

           以主机名称的方式虚拟

如果用户的一台服务器有多个域名，Virtual Host文件举例如下：

NameVirtualHost 210.12.195.6

&lt;VirtualHost hacker.con.cn&gt;

ServerAdmin bright@hacker.com.cn

DocumentRoot /var/www/html/hacker

ServerName hacker.com.cn

&lt;/VirtualHost&gt;

&lt;VirtualHost pcfrient.com.cn&gt;

ServerAdmin admin@pcfrient.com.cn

DocumentRoot /var/www/html/pcfrient

Servername pcfrient.com.cn

&lt;/VirtualHost&gt;

           以IP的方式虚拟

注册域名是要花一笔费用的。解决方案是可以用IP的方式来虚拟。在Linux中可以为一个网卡捆绑两个IP地址。如服务器的地址是210.12.195.6，现在有一个IP地址210.12.195.9没有使用。将210.12.195.9捆绑到服务器的网卡中，执行下列命令：

#ifconfig eth0:0 210.12.195.9

这样，服务器就有两个IP地址了。以IP的方式虚拟和以主机名称的方式虚拟类似，请看下面的例子：

NameVirtualHost 210.12.195.6

&lt;VirtualHost 210.12.192.6&gt;

ServerAdmin bright@hacker.com.cn

DocumentRoot /var/www/html/hacker

&lt;/VirtualHost&gt;

&lt;VirtualHost 210.12.192.9&gt;

ServerAdmin bright@hacker.com.cn

DocumentRoot /var/www/html/pcfrient

&lt;/VirtualHost&gt;

以IP的方式虚拟不用NameVirtualHost命令。

           以主机名称和IP的方式虚拟

就是上面的两个方式的结合。看下面的例子：

NameVirtualHost 210.12.195.6

&lt;VirtualHost hacker.con.cn&gt;

ServerAdmin bright@hacker.com.cn

DocumentRoot /var/www/html/hacker

ServerName hacker.com.cn

&lt;/VirtualHost&gt;

&lt;VirtualHost 210.12.195.6&gt;

ServerAdmin bright@hacker.com.cn

DocumentRoot /var/www/html/pcfrient

&lt;/VirtualHost&gt;

           以端口的方式虚拟

http默认的端口是80，如果用户要开设另一个端口443作为另一个虚拟主机，举例如下：

Listen 80

Listen 443

&lt;VirtualHost 210.12.192.6:80&gt;

ServerAdmin bright@hacker.com.cn

DocumentRoot /var/www/html/hacker

&lt;/VirtualHost&gt;

&lt;VirtualHost 210.12.195.6:443&gt;

ServerAdmin suying@hacker.com.cn

DocumentRoot /var/www/html/pcfrient

&lt;/VirtualHost&gt;

           以不同的IP和端口的方式虚拟

该方式是以IP的方式虚拟和以端口的方式虚拟的结合。假设服务器捆绑了两个IP地址，210.12.192.6和210.12.195.9，后面的IP地址用端口443。举例如下：

Listen 210.12.192.6：80

Listen 210.12.195.9：443

&lt;VirtualHost 210.12.192.6:80&gt;

ServerAdmin bright@hacker.com.cn

DocumentRoot /var/www/html/hacker

&lt;/VirtualHost&gt;

&lt;VirtualHost 210.12.195.9:443&gt;

ServerAdmin suying@hacker.com.cn

DocumentRoot /var/www/html/pcfrient

&lt;/VirtualHost&gt;
</pre><!-- Page published by Emacs Wiki ends here --><div class="navfoot"><hr /><table cellspacing="0" cellpadding="3" width="100%" summary="Footer navigation" border="0"><colgroup><col width="33%" /><col width="34%" /><col width="33%" /></colgroup><tbody><tr><td align="left"><span class="footdate">Updated: 2006-04-29</span></td><td align="middle"><span class="foothome"><a href="http://grid.tsinghua.edu.cn/home/liulk/publish/computer/WelcomePage.html">Home</a> / <a href="http://grid.tsinghua.edu.cn/home/liulk/publish/computer/index.html">Index</a></span></td><td align="right"></td></tr></tbody></table></div><img src ="http://www.blogjava.net/zhyiwww/aggbug/77234.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/zhyiwww/" target="_blank">zhyiwww</a> 2006-10-25 16:59 <a href="http://www.blogjava.net/zhyiwww/archive/2006/10/25/77234.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>Eclipse快捷键(转载)</title><link>http://www.blogjava.net/zhyiwww/archive/2006/10/24/76959.html</link><dc:creator>zhyiwww</dc:creator><author>zhyiwww</author><pubDate>Tue, 24 Oct 2006 06:06:00 GMT</pubDate><guid>http://www.blogjava.net/zhyiwww/archive/2006/10/24/76959.html</guid><wfw:comment>http://www.blogjava.net/zhyiwww/comments/76959.html</wfw:comment><comments>http://www.blogjava.net/zhyiwww/archive/2006/10/24/76959.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.blogjava.net/zhyiwww/comments/commentRss/76959.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/zhyiwww/services/trackbacks/76959.html</trackback:ping><description><![CDATA[
		<p style="TEXT-INDENT: 2em">
				<a href="http://java.ccidnet.com/art/3737/20040710/523567_1.html">http://java.ccidnet.com/art/3737/20040710/523567_1.html<br /><br /></a>本文档从<a href="http://dev.21tx.com/java/base/eclipse/" target="_blank">Eclipse</a>软件上整理，是列出了标准的快捷键，未列出Emacs快捷键。转贴请注明作者和出处。<br /></p>
		<p style="TEXT-INDENT: 2em">
				<br />
		</p>
		<p style="TEXT-INDENT: 2em">编辑<br /></p>
		<p style="TEXT-INDENT: 2em">作用域 功能 快捷键 <br /></p>
		<p style="TEXT-INDENT: 2em">全局 查找并替换 Ctrl+F <br /></p>
		<p style="TEXT-INDENT: 2em">文本编辑器 查找上一个 Ctrl+Shift+K <br /></p>
		<p style="TEXT-INDENT: 2em">文本编辑器 查找下一个 Ctrl+K <br /></p>
		<p style="TEXT-INDENT: 2em">全局 撤销 Ctrl+Z <br /></p>
		<p style="TEXT-INDENT: 2em">全局 复制 Ctrl+C <br /></p>
		<p style="TEXT-INDENT: 2em">全局 恢复上一个选择 Alt+Shift+↓ <br /></p>
		<p style="TEXT-INDENT: 2em">全局 剪切 Ctrl+X <br /></p>
		<p style="TEXT-INDENT: 2em">全局 快速修正 Ctrl1+1 <br /></p>
		<p style="TEXT-INDENT: 2em">全局 内容辅助 Alt+/ <br /></p>
		<p style="TEXT-INDENT: 2em">全局 全部选中 Ctrl+A <br /></p>
		<p style="TEXT-INDENT: 2em">全局 删除 Delete <br /></p>
		<p style="TEXT-INDENT: 2em">全局 上下文信息 Alt+？<br /></p>
		<p style="TEXT-INDENT: 2em">Alt+Shift+?<br /></p>
		<p style="TEXT-INDENT: 2em">Ctrl+Shift+Space <br /></p>
		<p style="TEXT-INDENT: 2em">
				<a href="http://dev.21tx.com/java/" target="_blank">Java</a>编辑器 显示工具提示描述 F2 <br /></p>
		<p style="TEXT-INDENT: 2em">Java编辑器 选择封装元素 Alt+Shift+↑ <br /></p>
		<p style="TEXT-INDENT: 2em">Java编辑器 选择上一个元素 Alt+Shift+← <br /></p>
		<p style="TEXT-INDENT: 2em">Java编辑器 选择下一个元素 Alt+Shift+→ <br /></p>
		<p style="TEXT-INDENT: 2em">文本编辑器 增量查找 Ctrl+J <br /></p>
		<p style="TEXT-INDENT: 2em">文本编辑器 增量逆向查找 Ctrl+Shift+J <br /></p>
		<p style="TEXT-INDENT: 2em">全局 粘贴 Ctrl+V <br /></p>
		<p style="TEXT-INDENT: 2em">全局 重做 Ctrl+Y <br /></p>
		<p style="TEXT-INDENT: 2em">
				<br />
		</p>
		<p style="TEXT-INDENT: 2em">?<br /></p>
		<p style="TEXT-INDENT: 2em">查看<br /></p>
		<p style="TEXT-INDENT: 2em">作用域 功能 快捷键 <br /></p>
		<p style="TEXT-INDENT: 2em">全局 放大 Ctrl+= <br /></p>
		<p style="TEXT-INDENT: 2em">全局 缩小 Ctrl+- <br /></p>
		<p style="TEXT-INDENT: 2em">
				<br />
		</p>
		<p style="TEXT-INDENT: 2em">?<br /></p>
		<p style="TEXT-INDENT: 2em">窗口<br /></p>
		<p style="TEXT-INDENT: 2em">作用域 功能 快捷键 <br /></p>
		<p style="TEXT-INDENT: 2em">全局 激活编辑器 F12 <br /></p>
		<p style="TEXT-INDENT: 2em">全局 切换编辑器 Ctrl+Shift+W <br /></p>
		<p style="TEXT-INDENT: 2em">全局 上一个编辑器 Ctrl+Shift+F6 <br /></p>
		<p style="TEXT-INDENT: 2em">全局 上一个视图 Ctrl+Shift+F7 <br /></p>
		<p style="TEXT-INDENT: 2em">全局 上一个透视图 Ctrl+Shift+F8 <br /></p>
		<p style="TEXT-INDENT: 2em">全局 下一个编辑器 Ctrl+F6 <br /></p>
		<p style="TEXT-INDENT: 2em">全局 下一个视图 Ctrl+F7 <br /></p>
		<p style="TEXT-INDENT: 2em">全局 下一个透视图 Ctrl+F8 <br /></p>
		<p style="TEXT-INDENT: 2em">文本编辑器 显示标尺上下文菜单 Ctrl+W <br /></p>
		<p style="TEXT-INDENT: 2em">全局 显示视图菜单 Ctrl+F10 <br /></p>
		<p style="TEXT-INDENT: 2em">全局 显示系统菜单 Alt+- <br /></p>
		<p style="TEXT-INDENT: 2em">
				<br />
		</p>
		<p style="TEXT-INDENT: 2em">?<br /></p>
		<p style="TEXT-INDENT: 2em">导航<br /></p>
		<p style="TEXT-INDENT: 2em">作用域 功能 快捷键 <br /></p>
		<p style="TEXT-INDENT: 2em">Java编辑器 打开结构 Ctrl+F3 <br /></p>
		<p style="TEXT-INDENT: 2em">全局 打开类型 Ctrl+Shift+T <br /></p>
		<p style="TEXT-INDENT: 2em">全局 打开类型层次结构 F4 <br /></p>
		<p style="TEXT-INDENT: 2em">全局 打开声明 F3 <br /></p>
		<p style="TEXT-INDENT: 2em">全局 打开外部javadoc Shift+F2 <br /></p>
		<p style="TEXT-INDENT: 2em">全局 打开资源 Ctrl+Shift+R <br /></p>
		<p style="TEXT-INDENT: 2em">全局 后退历史记录 Alt+← <br /></p>
		<p style="TEXT-INDENT: 2em">全局 前进历史记录 Alt+→ <br /></p>
		<p style="TEXT-INDENT: 2em">全局 上一个 Ctrl+, <br /></p>
		<p style="TEXT-INDENT: 2em">全局 下一个 Ctrl+. <br /></p>
		<p style="TEXT-INDENT: 2em">Java编辑器 显示大纲 Ctrl+O <br /></p>
		<p style="TEXT-INDENT: 2em">全局 在层次结构中打开类型 Ctrl+Shift+H <br /></p>
		<p style="TEXT-INDENT: 2em">全局 转至匹配的括号 Ctrl+Shift+P <br /></p>
		<p style="TEXT-INDENT: 2em">全局 转至上一个编辑位置 Ctrl+Q <br /></p>
		<p style="TEXT-INDENT: 2em">Java编辑器 转至上一个成员 Ctrl+Shift+↑ <br /></p>
		<p style="TEXT-INDENT: 2em">Java编辑器 转至下一个成员 Ctrl+Shift+↓ <br /></p>
		<p style="TEXT-INDENT: 2em">文本编辑器 转至行 Ctrl+L <br /></p>
		<p style="TEXT-INDENT: 2em">
				<br />
		</p>
		<p style="TEXT-INDENT: 2em">
				<br />
		</p>
		<p style="TEXT-INDENT: 2em">搜索<br /></p>
		<p style="TEXT-INDENT: 2em">作用域 功能 快捷键 <br /></p>
		<p style="TEXT-INDENT: 2em">全局 出现在文件中 Ctrl+Shift+U <br /></p>
		<p style="TEXT-INDENT: 2em">全局 打开搜索对话框 Ctrl+H <br /></p>
		<p style="TEXT-INDENT: 2em">全局 工作区中的声明 Ctrl+G <br /></p>
		<p style="TEXT-INDENT: 2em">全局 工作区中的引用 Ctrl+Shift+G <br /></p>
		<p style="TEXT-INDENT: 2em">
				<br />
		</p>
		<p style="TEXT-INDENT: 2em">?<br /></p>
		<p style="TEXT-INDENT: 2em">文本编辑<br /></p>
		<p style="TEXT-INDENT: 2em">作用域 功能 快捷键 <br /></p>
		<p style="TEXT-INDENT: 2em">文本编辑器 改写切换 Insert <br /></p>
		<p style="TEXT-INDENT: 2em">文本编辑器 上滚行 Ctrl+↑ <br /></p>
		<p style="TEXT-INDENT: 2em">文本编辑器 下滚行 Ctrl+↓ <br /></p>
		<p style="TEXT-INDENT: 2em">
				<br />
		</p>
		<p style="TEXT-INDENT: 2em">?<br /></p>
		<p style="TEXT-INDENT: 2em">文件<br /></p>
		<p style="TEXT-INDENT: 2em">作用域 功能 快捷键 <br /></p>
		<p style="TEXT-INDENT: 2em">全局 保存 Ctrl+X <br /></p>
		<p style="TEXT-INDENT: 2em">Ctrl+S <br /></p>
		<p style="TEXT-INDENT: 2em">全局 打印 Ctrl+P <br /></p>
		<p style="TEXT-INDENT: 2em">全局 关闭 Ctrl+F4 <br /></p>
		<p style="TEXT-INDENT: 2em">全局 全部保存 Ctrl+Shift+S <br /></p>
		<p style="TEXT-INDENT: 2em">全局 全部关闭 Ctrl+Shift+F4 <br /></p>
		<p style="TEXT-INDENT: 2em">全局 属性 Alt+Enter <br /></p>
		<p style="TEXT-INDENT: 2em">全局 新建 Ctrl+N <br /></p>
		<p style="TEXT-INDENT: 2em">
				<br />
		</p>
		<p style="TEXT-INDENT: 2em">
				<br />
		</p>
		<p style="TEXT-INDENT: 2em">项目<br /></p>
		<p style="TEXT-INDENT: 2em">作用域 功能 快捷键 <br /></p>
		<p style="TEXT-INDENT: 2em">全局 全部构建 Ctrl+B <br /></p>
		<p style="TEXT-INDENT: 2em">
				<br />
		</p>
		<p style="TEXT-INDENT: 2em">
				<br />
		</p>
		<p style="TEXT-INDENT: 2em">源代码<br /></p>
		<p style="TEXT-INDENT: 2em">作用域 功能 快捷键 <br /></p>
		<p style="TEXT-INDENT: 2em">Java编辑器 格式化 Ctrl+Shift+F <br /></p>
		<p style="TEXT-INDENT: 2em">Java编辑器 取消注释 Ctrl+\ <br /></p>
		<p style="TEXT-INDENT: 2em">Java编辑器 注释 Ctrl+/ <br /></p>
		<p style="TEXT-INDENT: 2em">Java编辑器 添加导入 Ctrl+Shift+M <br /></p>
		<p style="TEXT-INDENT: 2em">Java编辑器 组织导入 Ctrl+Shift+O <br /></p>
		<p style="TEXT-INDENT: 2em">Java编辑器 使用try/catch块来包围 未设置，太常用了，所以在这里列出,建议自己设置。<br /></p>
		<p style="TEXT-INDENT: 2em">也可以使用Ctrl+1自动修正。 <br /></p>
		<p style="TEXT-INDENT: 2em">
				<br />
		</p>
		<p style="TEXT-INDENT: 2em">?<br /></p>
		<p style="TEXT-INDENT: 2em">运行<br /></p>
		<p style="TEXT-INDENT: 2em">作用域 功能 快捷键 <br /></p>
		<p style="TEXT-INDENT: 2em">全局 单步返回 F7 <br /></p>
		<p style="TEXT-INDENT: 2em">全局 单步跳过 F6 <br /></p>
		<p style="TEXT-INDENT: 2em">全局 单步跳入 F5 <br /></p>
		<p style="TEXT-INDENT: 2em">全局 单步跳入选择 Ctrl+F5 <br /></p>
		<p style="TEXT-INDENT: 2em">全局 调试上次启动 F11 <br /></p>
		<p style="TEXT-INDENT: 2em">全局 继续 F8 <br /></p>
		<p style="TEXT-INDENT: 2em">全局 使用过滤器单步执行 Shift+F5 <br /></p>
		<p style="TEXT-INDENT: 2em">全局 添加/去除断点 Ctrl+Shift+B <br /></p>
		<p style="TEXT-INDENT: 2em">全局 显示 Ctrl+D <br /></p>
		<p style="TEXT-INDENT: 2em">全局 运行上次启动 Ctrl+F11 <br /></p>
		<p style="TEXT-INDENT: 2em">全局 运行至行 Ctrl+R <br /></p>
		<p style="TEXT-INDENT: 2em">全局 执行 Ctrl+U <br /></p>
		<p style="TEXT-INDENT: 2em">
				<br />
		</p>
		<p style="TEXT-INDENT: 2em">
				<br />
		</p>
		<p style="TEXT-INDENT: 2em">重构<br /></p>
		<p style="TEXT-INDENT: 2em">作用域 功能 快捷键 <br /></p>
		<p style="TEXT-INDENT: 2em">全局 撤销重构 Alt+Shift+Z <br /></p>
		<p style="TEXT-INDENT: 2em">全局 抽取方法 Alt+Shift+M <br /></p>
		<p style="TEXT-INDENT: 2em">全局 抽取局部变量 Alt+Shift+L <br /></p>
		<p style="TEXT-INDENT: 2em">全局 内联 Alt+Shift+I <br /></p>
		<p style="TEXT-INDENT: 2em">全局 移动 Alt+Shift+V <br /></p>
		<p style="TEXT-INDENT: 2em">全局 重命名 Alt+Shift+R <br /></p>
		<p style="TEXT-INDENT: 2em">全局 重做 Alt+Shift+Y <br /></p>
<img src ="http://www.blogjava.net/zhyiwww/aggbug/76959.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/zhyiwww/" target="_blank">zhyiwww</a> 2006-10-24 14:06 <a href="http://www.blogjava.net/zhyiwww/archive/2006/10/24/76959.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>UML 主流工具(转载) </title><link>http://www.blogjava.net/zhyiwww/archive/2006/06/01/49639.html</link><dc:creator>zhyiwww</dc:creator><author>zhyiwww</author><pubDate>Thu, 01 Jun 2006 07:45:00 GMT</pubDate><guid>http://www.blogjava.net/zhyiwww/archive/2006/06/01/49639.html</guid><wfw:comment>http://www.blogjava.net/zhyiwww/comments/49639.html</wfw:comment><comments>http://www.blogjava.net/zhyiwww/archive/2006/06/01/49639.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.blogjava.net/zhyiwww/comments/commentRss/49639.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/zhyiwww/services/trackbacks/49639.html</trackback:ping><description><![CDATA[
		<div id="pagecell1">
				<div id="breadCrumb"> </div>
				<div id="pageName">
						<h2>UML 主流工具 </h2>
				</div>
				<!-- end pageName -->
				<div id="col2">
						<div class="story">
								<p>
										<a href="http://www.artisansw.com/" target="_blank">ARTiSAN</a>
								</p>
								<p>Real-Time Studio </p>
								<p>
										<a href="http://www.borland.com/" target="_blank">Borland</a>
								</p>
								<p>
										<a href="http://www.borland.com/together/designerce/index.html" target="_blank">Together Designer 2005</a> 第 15 届 Productivity Winner</p>
								<p>
										<a href="http://www.computas.com/websolution/L2_default.asp?WebID=201&amp;SystemID=2&amp;folderID=(c8)&amp;ServiceURL=WebComputas/ComputasPage.asp?PageID=1&amp;Frameset=20&amp;OpenList=0" target="_blank">Computas'Metis</a>
								</p>
								<p>
										<a href="http://www.compuware.com/" target="_blank">Compuware</a>
								</p>
								<p>
										<a href="http://www.compuware.com/products/optimalj/default.htm" target="_blank">OptimalJ</a> (MDA) </p>
								<p>Embarcadero</p>
								<p>
										<a href="http://www.embarcadero.com/products/describe/dedatasheet.html" target="_blank">Describe</a>
								</p>
								<p>I-Logix</p>
								<p>
										<a href="http://www.ilogix.com/rhapsody/rhapsody.cfm" target="_blank">Rphapsody</a>
								</p>
								<p>IBM </p>
								<p>
										<a href="http://www-306.ibm.com/software/rational/" target="_blank">Rational Software Architect</a> 第 15 届 Productivity Winner</p>
								<p>and Modeler</p>
								<p>Interactive Objects</p>
								<p>
										<a href="http://www.arcstyler.com/" target="_blank">ArcStyler</a> (MDA) </p>
								<p>MetaMatrix</p>
								<p>
										<a href="http://www.metamatrix.com/l3_eval.html" target="_blank">MetaBase Modeler</a>
								</p>
								<p>Microsoft</p>
								<p>
										<a href="http://office.microsoft.com/" target="_blank">Visio</a>
								</p>
								<p>No Magic </p>
								<p>
										<a href="http://www.magicdraw.com/" target="_blank">MagicDraw UML 9.0</a> 第 15 届 Productivity Winner</p>
								<p>
										<a href="http://www.oracle.com/" target="_blank">Oracle</a>
								</p>
								<p>JDeveloper</p>
								<p>
										<a href="http://www.sparxsystems.com/" target="_blank">Sparx Systems</a>
								</p>
								<p>Enterprise Architect </p>
								<p>
										<a href="http://www.sybase.com/" target="_blank">Sybase</a>
								</p>
								<p>PowerDesigner</p>
								<p>Telelogic</p>
								<p>
										<a href="http://www.telelogic.com/products/tau/developer/index.cfm" target="_blank">TAU Developer</a>
										<a href="http://www.telelogic.com/products/tau/architect/index.cfm" target="_blank">TAU Architect</a>
								</p>
								<p>
										<a href="http://www.visual-paradigm.com/" target="_blank">Visual Paradigm International</a>
										<br />
										<br />Smart Development Environment 2.0 第 15 届 Jolt Winner </p>
								<h2>参考资源</h2>
								<p>
										<a href="http://www.objectsbydesign.com/tools/umltools_byCompany.html" target="_blank">UML Products by Company (Objects by Design)<br /></a>
										<a href="http://www.objectsbydesign.com/tools/modeling_tools.html" target="_blank">Choosing a UML Modeling Tool (Objects by Design)<br /></a>
										<a href="http://www.jeckle.de/umltools.htm" target="_blank">UML Tools (Mario Jeckle)<br /></a>
										<a href="http://dmoz.org/Computers/Programming/Methodologies/Object-Oriented/UML/Tools/" target="_blank">UML-Tools (Open directory</a>)</p>
								<p> </p>
						</div>
				</div>
		</div>
<img src ="http://www.blogjava.net/zhyiwww/aggbug/49639.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/zhyiwww/" target="_blank">zhyiwww</a> 2006-06-01 15:45 <a href="http://www.blogjava.net/zhyiwww/archive/2006/06/01/49639.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item></channel></rss>