<?xml version="1.0" encoding="UTF-8" ?>
<rss version="2.0">
  <channel>
    <title>HiLlmOvEr</title>
    <description></description>
    <link>http://hillmover.javaeye.com</link>
    <language>UTF-8</language>
    <copyright>Copyright 2003-2008, JavaEye.com</copyright>
    <docs>http://blogs.law.harvard.edu/tech/rss</docs>
    <generator>JavaEye - 做最棒的软件开发交流社区</generator>
      <item>
        <title>凭什么我不能跑？</title>
        <author>hillmover</author>
        <description>
          <![CDATA[
          <br/>
          作者: <a href="http://hillmover.javaeye.com">hillmover</a>&nbsp;
          链接：<a href="http://hillmover.javaeye.com/blog/206812" style="color:red;">http://hillmover.javaeye.com/blog/206812</a>&nbsp;
          发表时间: 2008年06月22日
          <br/><br/>
          声明：本文系JavaEye网站发布的原创博客文章，未经作者书面许可，严禁任何网站转载本文，否则必将追究法律责任！
          <br/><br/>
          <p>汶川地震期间，四川某地某教室，某北大出来的教授正在给学生上课。发现地震时，没管他的学生，自己先从教师楼跑出来。</p>
<p>&nbsp;</p>
<p>最近媒体在谈论此事，众人给他起了个&ldquo;范跑跑&ldquo;的绰号。哈，更有人在电视节目上，当着全国人的面，骂他无耻。那个人，也被大家起了个绰号--郭道德。</p>
<p>&nbsp;</p>
<p>大家都有家室，大家都是人，逃跑是人的本能. 他身为老师，就必须当圣人？</p>
<p>在8级地震时，仅因为他没选择做英雄，就要批评他吗？ 他影响学生逃跑了吗?</p>
<p>&nbsp;</p>
<p>某些标榜&ldquo;道德&ldquo;的卫士们，你们不要太愚昧，太自欺欺人了。</p>
<p>&nbsp;</p>
<p>某些媒体们，你们不要找一个百姓揪住不放了。中国有多少反面教材？那么多贪官，那么多腐败的事，你们不敢访问，怕丢了饭碗，怕砸了公司，就骚扰百姓吗？</p>
<p>&nbsp;</p>
<p>事后，当媒体问&ldquo;范跑跑&ldquo;，你是否为你的行为后悔呢？ 他依然回答，不后悔。</p>
<p>这是真正的人，一个不愿自欺欺人的人，一个坦然的君子！</p>
<p>&nbsp;</p>
<p>英雄毕竟是少数，比起某些愚昧的英雄，我们更需要这些君子。一个敢当着全国人的面，坦然地回答自己的想法，不屈服所谓&ldquo;郭道德&ldquo;们的压力的&ldquo;范跑跑&ldquo;， 其实是英雄！</p>
<p>&nbsp;</p>
<p>媒体应该做出正确的导向. 去表扬那些在困难面前舍我就人的英雄,但不要再如此批评不愿做英雄的正常人了.</p>
<p>&nbsp;</p>
<p>补：</p>
<p>&ldquo;跑跑&ldquo;最终丢了饭碗, 还给全国人民道了歉。</p>
          <br/>
          <span style="color:red;">
            <a href="http://hillmover.javaeye.com/blog/206812#comments" style="color:red;">本文的讨论也很精彩，浏览讨论>></a>
          </span>
          <br/><br/><br/>
          <span style="color:#E28822;">JavaEye推荐</span>
          <br/>
          <ul class='adverts'><li><a href='/adverts/97' target='_blank'><span style="color:blue;font-weight:bold;">Oracle专区上线，有Oracle最新文章，重要下载及知识库等精彩内容，欢迎访问。</span></a></li><li><a href='/adverts/42' target='_blank'><span style="color:red;font-weight:bold;">搜狐网站诚聘Java、PHP和C++工程师</span></a></li><li><a href='/adverts/41' target='_blank'><span style="color:red;font-weight:bold;">北京: 千橡集团暨校内网诚聘软件研发工程师</span></a></li><li><a href='/adverts/106' target='_blank'><span style="color:blue;font-weight:bold;">JavaEye问答大赛开始了！ 从6月23日 至 7月6日，奖品丰厚 ！</span></a></li><li><a href='/adverts/92' target='_blank'><span style="color:red;font-weight:bold;">快来参加7月17日在成都举行的SOA中国技术论坛</span></a></li></ul>
          <br/><br/><br/>
          ]]>
        </description>
        <pubDate>Sun, 22 Jun 2008 10:27:39 +0800</pubDate>
        <link>http://hillmover.javaeye.com/blog/206812</link>
        <guid>http://hillmover.javaeye.com/blog/206812</guid>
      </item>
      <item>
        <title>Apache httpd command line options</title>
        <author>hillmover</author>
        <description>
          <![CDATA[
          <br/>
          作者: <a href="http://hillmover.javaeye.com">hillmover</a>&nbsp;
          链接：<a href="http://hillmover.javaeye.com/blog/193504" style="color:red;">http://hillmover.javaeye.com/blog/193504</a>&nbsp;
          发表时间: 2008年05月16日
          <br/><br/>
          声明：本文系JavaEye网站发布的原创博客文章，未经作者书面许可，严禁任何网站转载本文，否则必将追究法律责任！
          <br/><br/>
          <p>Usage: ./httpd [-D name] [-d directory] [-f file]<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; [-C "directive"] [-c "directive"]<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; [-k start|restart|graceful|stop]<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; [-v] [-V] [-h] [-l] [-L] [-t] [-S]<br />Options:<br />&nbsp; -D name&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; : define a name for use in &lt;IfDefine name&gt; directives<br />&nbsp; -d directory&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; : specify an alternate initial ServerRoot<br />&nbsp; -f file&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; : specify an alternate ServerConfigFile<br />&nbsp; -C "directive"&nbsp;&nbsp;&nbsp; : process directive before reading config files<br />&nbsp; -c "directive"&nbsp;&nbsp;&nbsp; : process directive after reading config files<br />&nbsp; -e level&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; : show startup errors of level (see LogLevel)<br />&nbsp; -E file&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; : log startup errors to file<br />&nbsp; -v&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; : show version number<br />&nbsp; -V&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; : show compile settings<br />&nbsp; -h&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; : list available command line options (this page)<br />&nbsp; -l&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; : list compiled in modules<br />&nbsp; -L&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; : list available configuration directives<br />&nbsp; -t -D DUMP_VHOSTS : show parsed settings (currently only vhost settings)<br />&nbsp; -S&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; : a synonym for -t -D DUMP_VHOSTS<br />&nbsp; -t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; : run syntax check for config files</p>
          <br/>
          <span style="color:red;">
            <a href="http://hillmover.javaeye.com/blog/193504#comments" style="color:red;">本文的讨论也很精彩，浏览讨论>></a>
          </span>
          <br/><br/><br/>
          <span style="color:#E28822;">JavaEye推荐</span>
          <br/>
          <ul class='adverts'><li><a href='/adverts/97' target='_blank'><span style="color:blue;font-weight:bold;">Oracle专区上线，有Oracle最新文章，重要下载及知识库等精彩内容，欢迎访问。</span></a></li><li><a href='/adverts/42' target='_blank'><span style="color:red;font-weight:bold;">搜狐网站诚聘Java、PHP和C++工程师</span></a></li><li><a href='/adverts/41' target='_blank'><span style="color:red;font-weight:bold;">北京: 千橡集团暨校内网诚聘软件研发工程师</span></a></li><li><a href='/adverts/92' target='_blank'><span style="color:red;font-weight:bold;">快来参加7月17日在成都举行的SOA中国技术论坛</span></a></li><li><a href='/adverts/106' target='_blank'><span style="color:blue;font-weight:bold;">JavaEye问答大赛开始了！ 从6月23日 至 7月6日，奖品丰厚 ！</span></a></li></ul>
          <br/><br/><br/>
          ]]>
        </description>
        <pubDate>Fri, 16 May 2008 03:15:18 +0800</pubDate>
        <link>http://hillmover.javaeye.com/blog/193504</link>
        <guid>http://hillmover.javaeye.com/blog/193504</guid>
      </item>
      <item>
        <title>Parser and Optimizer</title>
        <author>hillmover</author>
        <description>
          <![CDATA[
          <br/>
          作者: <a href="http://hillmover.javaeye.com">hillmover</a>&nbsp;
          链接：<a href="http://hillmover.javaeye.com/blog/192192" style="color:red;">http://hillmover.javaeye.com/blog/192192</a>&nbsp;
          发表时间: 2008年05月12日
          <br/><br/>
          声明：本文系JavaEye网站发布的原创博客文章，未经作者书面许可，严禁任何网站转载本文，否则必将追究法律责任！
          <br/><br/>
          <p>The MySQL server receives queries in the SQL format. Once a query is received, it first needs to be parsed, which involves translating it from what is essentially a textual format into a combination of internal binary structures that can be easily manipulated by the optimizer.</p>
<p><span style="color: #0000ff;"><strong>MySQL's optimizer has several important tasks:<br /></strong></span>. Determine which keys can be used to retrieve the records from tables, and choose the best one for each table.<br />. For each table, decide whether a table scan is better than reading on a key. If there are a lot of records that match the key value, the advantages of the key are reduced and the table scan becomes faster.<br />. Determine the order in which tables should be joined when more than one table is present in the query.<br />. Rewrite the WHERE clause to eliminate dead code, reducing the unnecessary computations and changing the constraints whenever possible to open the way for using keys.<br />. Eliminate unused tables from the join.<br />. Determine whether keys can be&nbsp; used for ORDER BY and GROUP BY.<br />. Attempt to replace an outer join with an inner join.<br />. Attempt to simplify subqueries, as well as determine to what extent their results can be cached.<br />. Merge views.</p>
<p><strong><span style="color: #0000ff;">Using EXPLAIN to Understand the Optimizer</span></strong><br />The MySQL EXPLAIN command tells the optimizer to show its query plan.<br />E.g,<br />EXPLAIN SELECT ... \G<br /><span style="color: #0000ff;"><strong>Understanding the output of EXPLAIN</strong></span></p>
<p>
<table border="1" width="658" style="height: 224px;">
<tbody>
<tr>
<td><strong>EXPLAIN FIELD</strong></td>
<td><strong>DESCRIPTION</strong></td>
<td>&nbsp;</td>
</tr>
<tr>
<td>
<p>id</p>
</td>
<td>
<p>QueryID. Meaningful only when subqueries are used.</p>
<p align="left">&nbsp;</p>
</td>
<td>
<p>&nbsp;</p>
</td>
</tr>
<tr>
<td>
<p>select_type</p>
</td>
<td>
<p>Indicates what happens with the result set retrieved from the table. A join not involving subqueries or UNION will have this value set to simple. See the upcoming section "Select types" for details.</p>
</td>
<td>&nbsp;</td>
</tr>
<tr>
<td>table</td>
<td>The alias the table is referenced by in the query. If no alias is used, the real name of this table.</td>
<td>&nbsp;</td>
</tr>
<tr>
<td>type</td>
<td>The method used for retrieving the records from the table. See the upcoming section "Record access types" for details.</td>
<td>&nbsp;</td>
</tr>
<tr>
<td>possible_keys</td>
<td>A list of keys that can be used in conjunction with the WHERE clause to retrieve the records from this table.</td>
<td>&nbsp;</td>
</tr>
<tr>
<td>key</td>
<td>The name of the key used for retrieving the records. When index_merge optimization is used, contains a list of keys.</td>
<td>&nbsp;</td>
</tr>
<tr>
<td>key_len</td>
<td>The length of the key used in a query. This does not have to be the full length of the key - it is possible to use only a key prefix.</td>
<td>&nbsp;</td>
</tr>
<tr>
<td>ref</td>
<td>A list of fields from other tables whose values are involved in an index lookup in this table.</td>
<td>&nbsp;</td>
</tr>
<tr>
<td>rows</td>
<td>Average estimated number of records in this table to be retrieved on each join iteration.</td>
<td>&nbsp;</td>
</tr>
<tr>
<td>Extra</td>
<td>Additional comments on the optimization strategy. See the section "Extra field" for details.</td>
<td>&nbsp;</td>
</tr>
</tbody>
</table>
</p>
          <br/>
          <span style="color:red;">
            <a href="http://hillmover.javaeye.com/blog/192192#comments" style="color:red;">本文的讨论也很精彩，浏览讨论>></a>
          </span>
          <br/><br/><br/>
          <span style="color:#E28822;">JavaEye推荐</span>
          <br/>
          <ul class='adverts'><li><a href='/adverts/106' target='_blank'><span style="color:blue;font-weight:bold;">JavaEye问答大赛开始了！ 从6月23日 至 7月6日，奖品丰厚 ！</span></a></li><li><a href='/adverts/41' target='_blank'><span style="color:red;font-weight:bold;">北京: 千橡集团暨校内网诚聘软件研发工程师</span></a></li><li><a href='/adverts/92' target='_blank'><span style="color:red;font-weight:bold;">快来参加7月17日在成都举行的SOA中国技术论坛</span></a></li><li><a href='/adverts/97' target='_blank'><span style="color:blue;font-weight:bold;">Oracle专区上线，有Oracle最新文章，重要下载及知识库等精彩内容，欢迎访问。</span></a></li><li><a href='/adverts/42' target='_blank'><span style="color:red;font-weight:bold;">搜狐网站诚聘Java、PHP和C++工程师</span></a></li></ul>
          <br/><br/><br/>
          ]]>
        </description>
        <pubDate>Mon, 12 May 2008 13:00:58 +0800</pubDate>
        <link>http://hillmover.javaeye.com/blog/192192</link>
        <guid>http://hillmover.javaeye.com/blog/192192</guid>
      </item>
      <item>
        <title>High-level view of MySQL modules</title>
        <author>hillmover</author>
        <description>
          <![CDATA[
          <br/>
          作者: <a href="http://hillmover.javaeye.com">hillmover</a>&nbsp;
          链接：<a href="http://hillmover.javaeye.com/blog/192088" style="color:red;">http://hillmover.javaeye.com/blog/192088</a>&nbsp;
          发表时间: 2008年05月12日
          <br/><br/>
          声明：本文系JavaEye网站发布的原创博客文章，未经作者书面许可，严禁任何网站转载本文，否则必将追究法律责任！
          <br/><br/>
          <p><img src="../../upload/picture/pic/14211/1fe46e7d-5809-3ad6-aea4-f814b76f857d.jpg" height="701" alt="High-level view of MySQL modules" style="vertical-align: middle;" width="607" /></p>
<p style="text-align: center;">High-level view of MySQL modules</p>
          <br/>
          <span style="color:red;">
            <a href="http://hillmover.javaeye.com/blog/192088#comments" style="color:red;">本文的讨论也很精彩，浏览讨论>></a>
          </span>
          <br/><br/><br/>
          <span style="color:#E28822;">JavaEye推荐</span>
          <br/>
          <ul class='adverts'><li><a href='/adverts/42' target='_blank'><span style="color:red;font-weight:bold;">搜狐网站诚聘Java、PHP和C++工程师</span></a></li><li><a href='/adverts/97' target='_blank'><span style="color:blue;font-weight:bold;">Oracle专区上线，有Oracle最新文章，重要下载及知识库等精彩内容，欢迎访问。</span></a></li><li><a href='/adverts/92' target='_blank'><span style="color:red;font-weight:bold;">快来参加7月17日在成都举行的SOA中国技术论坛</span></a></li><li><a href='/adverts/106' target='_blank'><span style="color:blue;font-weight:bold;">JavaEye问答大赛开始了！ 从6月23日 至 7月6日，奖品丰厚 ！</span></a></li><li><a href='/adverts/41' target='_blank'><span style="color:red;font-weight:bold;">北京: 千橡集团暨校内网诚聘软件研发工程师</span></a></li></ul>
          <br/><br/><br/>
          ]]>
        </description>
        <pubDate>Mon, 12 May 2008 08:51:48 +0800</pubDate>
        <link>http://hillmover.javaeye.com/blog/192088</link>
        <guid>http://hillmover.javaeye.com/blog/192088</guid>
      </item>
      <item>
        <title>Concurrent Access and Locking</title>
        <author>hillmover</author>
        <description>
          <![CDATA[
          <br/>
          作者: <a href="http://hillmover.javaeye.com">hillmover</a>&nbsp;
          链接：<a href="http://hillmover.javaeye.com/blog/192077" style="color:red;">http://hillmover.javaeye.com/blog/192077</a>&nbsp;
          发表时间: 2008年05月12日
          <br/><br/>
          声明：本文系JavaEye网站发布的原创博客文章，未经作者书面许可，严禁任何网站转载本文，否则必将追究法律责任！
          <br/><br/>
          <p>1. A proper locking mechanism is necessary to ensure data consistency when there is a possibility of multiple clients accessing and possibly modifying the same data at the same time.<br />2. table-level locks, page-level locks, and row-level locks<br />3. MyISAM and MEMORY storage engines can only work with table-level locks. InnoDB supports row-level locks, and Berkeley DB supports page-level locks.<br />4. MyISAM - If the insert operation results in writing the record at the end of the datafile, reading can be done without a lock.<br />5. InnoDB Locking<br />There are two types of row-level locks: shared and exclusive.<br />InnoDB also uses so-called intension locks on a table. There are also two types of intension table locks, shared and exclusive.<br /><strong><span style="color: #0000ff;">Rocord locking</span><br /></strong>What InnoDB actually locks is the index entry, the space before it, and the space after the last record. This method is called <span style="color: #0000ff;">next-key locking</span>.<br />The next-key locking is necessary to avoid the phantom row problem in transactions. If we did not lock the space before the record, it would be possible for another transaction to insert another record in between. Thus, if we were to run the same query again, we would see the record that was not there the first time we ran the query. This would make it impossible to meet the requirement of the serializable read transaction isolation level.<br />InnoDB has an automatic deadlock detection lagorithm. It will usually roll back the last transaction involed in a deadlock.&nbsp; Additionally, some transactions may be considered to be in a<span style="color: #0000ff;"> virtual deadlock</span>. For example, if a query is written is such a way that it examines several billion records, it may not release its locks for weeks, although from a theoretical point of view it eventually will. For such situations InnoDB uses a lock timeout, which is controlled by the configuration variable <span style="color: #0000ff;">innodb_lock_wait_timeout</span>.</p>
<p>&nbsp;Accessing records always in the same index order, writing properly optimized queries, and commiting transactions frequently are some of techniques that help prevent potential deadlocks.</p>
          <br/>
          <span style="color:red;">
            <a href="http://hillmover.javaeye.com/blog/192077#comments" style="color:red;">本文的讨论也很精彩，浏览讨论>></a>
          </span>
          <br/><br/><br/>
          <span style="color:#E28822;">JavaEye推荐</span>
          <br/>
          <ul class='adverts'><li><a href='/adverts/97' target='_blank'><span style="color:blue;font-weight:bold;">Oracle专区上线，有Oracle最新文章，重要下载及知识库等精彩内容，欢迎访问。</span></a></li><li><a href='/adverts/92' target='_blank'><span style="color:red;font-weight:bold;">快来参加7月17日在成都举行的SOA中国技术论坛</span></a></li><li><a href='/adverts/41' target='_blank'><span style="color:red;font-weight:bold;">北京: 千橡集团暨校内网诚聘软件研发工程师</span></a></li><li><a href='/adverts/106' target='_blank'><span style="color:blue;font-weight:bold;">JavaEye问答大赛开始了！ 从6月23日 至 7月6日，奖品丰厚 ！</span></a></li><li><a href='/adverts/42' target='_blank'><span style="color:red;font-weight:bold;">搜狐网站诚聘Java、PHP和C++工程师</span></a></li></ul>
          <br/><br/><br/>
          ]]>
        </description>
        <pubDate>Mon, 12 May 2008 08:00:50 +0800</pubDate>
        <link>http://hillmover.javaeye.com/blog/192077</link>
        <guid>http://hillmover.javaeye.com/blog/192077</guid>
      </item>
      <item>
        <title>Linux Command - File System</title>
        <author>hillmover</author>
        <description>
          <![CDATA[
          <br/>
          作者: <a href="http://hillmover.javaeye.com">hillmover</a>&nbsp;
          链接：<a href="http://hillmover.javaeye.com/blog/191877" style="color:red;">http://hillmover.javaeye.com/blog/191877</a>&nbsp;
          发表时间: 2008年05月11日
          <br/><br/>
          声明：本文系JavaEye网站发布的原创博客文章，未经作者书面许可，严禁任何网站转载本文，否则必将追究法律责任！
          <br/><br/>
          <p>&gt; dfisk -l<br />&gt; df -T -h<br />&gt; mount<br />&gt;&nbsp;cat /etc/fstab</p>
          <br/>
          <span style="color:red;">
            <a href="http://hillmover.javaeye.com/blog/191877#comments" style="color:red;">本文的讨论也很精彩，浏览讨论>></a>
          </span>
          <br/><br/><br/>
          <span style="color:#E28822;">JavaEye推荐</span>
          <br/>
          <ul class='adverts'><li><a href='/adverts/42' target='_blank'><span style="color:red;font-weight:bold;">搜狐网站诚聘Java、PHP和C++工程师</span></a></li><li><a href='/adverts/41' target='_blank'><span style="color:red;font-weight:bold;">北京: 千橡集团暨校内网诚聘软件研发工程师</span></a></li><li><a href='/adverts/92' target='_blank'><span style="color:red;font-weight:bold;">快来参加7月17日在成都举行的SOA中国技术论坛</span></a></li><li><a href='/adverts/106' target='_blank'><span style="color:blue;font-weight:bold;">JavaEye问答大赛开始了！ 从6月23日 至 7月6日，奖品丰厚 ！</span></a></li><li><a href='/adverts/97' target='_blank'><span style="color:blue;font-weight:bold;">Oracle专区上线，有Oracle最新文章，重要下载及知识库等精彩内容，欢迎访问。</span></a></li></ul>
          <br/><br/><br/>
          ]]>
        </description>
        <pubDate>Sun, 11 May 2008 08:22:50 +0800</pubDate>
        <link>http://hillmover.javaeye.com/blog/191877</link>
        <guid>http://hillmover.javaeye.com/blog/191877</guid>
      </item>
      <item>
        <title>linux commands</title>
        <author>hillmover</author>
        <description>
          <![CDATA[
          <br/>
          作者: <a href="http://hillmover.javaeye.com">hillmover</a>&nbsp;
          链接：<a href="http://hillmover.javaeye.com/blog/191844" style="color:red;">http://hillmover.javaeye.com/blog/191844</a>&nbsp;
          发表时间: 2008年05月11日
          <br/><br/>
          声明：本文系JavaEye网站发布的原创博客文章，未经作者书面许可，严禁任何网站转载本文，否则必将追究法律责任！
          <br/><br/>
          <p>mkfifo<br />&nbsp;&nbsp;&nbsp; &gt; mkfifo my_pipe<br />&nbsp;&nbsp;&nbsp; &gt; cat a.txt &gt; my_pipe<br />&nbsp;&nbsp;&nbsp; &gt; cat my_pipe</p>
<p>ldd<br />&nbsp;&nbsp;&nbsp; &gt; ldd /usr/java/jre1.5.0_11/bin/java</p>
<p>xmlwf<br />&nbsp;&nbsp;&nbsp; &gt; curl -s 'http://bashcurescancer.com' &gt; bcc.html<br />&nbsp;&nbsp;&nbsp; &gt; xmlwf bcc.html</p>
<p><strong><span style="color: #0000ff;">删除文件的恢复</span></strong></p>
<p><span style="color: #000000;">lsof<br />&nbsp;&nbsp;&nbsp; &gt; cp ~/code/demo.cpp /tmp/workspace/test.cpp<br />&nbsp;&nbsp;&nbsp; &gt; cd /tmp/workspace<br />&nbsp;&nbsp;&nbsp; &gt; less test.cpp<br />&nbsp;&nbsp;&nbsp; &gt; rm -f test.cpp<br />&nbsp;&nbsp;&nbsp; &gt; lsof | grep test.cpp<br />&nbsp;&nbsp;&nbsp; less&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 6173&nbsp; dirkxu&nbsp;&nbsp;&nbsp; 4r&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; REG&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 253,0&nbsp;&nbsp;&nbsp;&nbsp; 2876&nbsp;&nbsp;&nbsp;&nbsp; 669315 /tmp/workspace/test.cpp (deleted)<br />&nbsp;&nbsp;&nbsp; &gt; cat /proc/6173/fd/4 &gt; recover.cpp<br />&nbsp;&nbsp;&nbsp; &gt; cmp ~/code/demo.cpp recover.cpp</span></p>
<p><span style="color: #0000ff;"><strong>文件的分割、合并、校验</strong></span></p>
<p>split [OPTION] [INPUT [PREFIX]]<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; -b, --bytes=SIZE<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; put SIZE bytes per output file</p>
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; -C, --line-bytes=SIZE<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; put at most SIZE bytes of lines per output file</p>
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; -d, --numeric-suffixes<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; use numeric suffixes instead of alphabetic</p>
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; -l, --lines=NUMBER<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; put NUMBER lines per output file<br />&nbsp;&nbsp;&nbsp; &gt; split -b 3k larger.txt small<br />&nbsp;&nbsp;&nbsp; &gt; ls -lh /etc | split -l 40 - small_line</p>
<p>&nbsp;&nbsp;&nbsp; #combine multi files into one file<br />&nbsp;&nbsp;&nbsp; &gt; cat smalla smallb smallc &gt; new_larger<br />&nbsp;&nbsp;&nbsp; &gt; cat small_linea small_lineb &gt;&gt; history</p>
<p>&nbsp;&nbsp;&nbsp; #validate whether the new file equals the old file<br />&nbsp;&nbsp;&nbsp; &gt; md5sum larger new_larger</p>
          <br/>
          <span style="color:red;">
            <a href="http://hillmover.javaeye.com/blog/191844#comments" style="color:red;">本文的讨论也很精彩，浏览讨论>></a>
          </span>
          <br/><br/><br/>
          <span style="color:#E28822;">JavaEye推荐</span>
          <br/>
          <ul class='adverts'><li><a href='/adverts/97' target='_blank'><span style="color:blue;font-weight:bold;">Oracle专区上线，有Oracle最新文章，重要下载及知识库等精彩内容，欢迎访问。</span></a></li><li><a href='/adverts/106' target='_blank'><span style="color:blue;font-weight:bold;">JavaEye问答大赛开始了！ 从6月23日 至 7月6日，奖品丰厚 ！</span></a></li><li><a href='/adverts/41' target='_blank'><span style="color:red;font-weight:bold;">北京: 千橡集团暨校内网诚聘软件研发工程师</span></a></li><li><a href='/adverts/92' target='_blank'><span style="color:red;font-weight:bold;">快来参加7月17日在成都举行的SOA中国技术论坛</span></a></li><li><a href='/adverts/42' target='_blank'><span style="color:red;font-weight:bold;">搜狐网站诚聘Java、PHP和C++工程师</span></a></li></ul>
          <br/><br/><br/>
          ]]>
        </description>
        <pubDate>Sun, 11 May 2008 06:34:39 +0800</pubDate>
        <link>http://hillmover.javaeye.com/blog/191844</link>
        <guid>http://hillmover.javaeye.com/blog/191844</guid>
      </item>
      <item>
        <title>Linux 进程管理</title>
        <author>hillmover</author>
        <description>
          <![CDATA[
          <br/>
          作者: <a href="http://hillmover.javaeye.com">hillmover</a>&nbsp;
          链接：<a href="http://hillmover.javaeye.com/blog/191842" style="color:red;">http://hillmover.javaeye.com/blog/191842</a>&nbsp;
          发表时间: 2008年05月11日
          <br/><br/>
          声明：本文系JavaEye网站发布的原创博客文章，未经作者书面许可，严禁任何网站转载本文，否则必将追究法律责任！
          <br/><br/>
          <p><a href="http://www.linuxsir.org/main/?q=node/210">http://www.linuxsir.org/main/?q=node/210</a>&nbsp;<strong>作者：</strong>北南南北 <strong>来自：</strong>LinuxSir.Org</p>
<p>统计Apache进程数的时候，一般使用命令：<br />ps aux | grep httpd | grep -v grep | wc -l&nbsp; 等价于 pgrep httpd |wc -l</p>
          <br/>
          <span style="color:red;">
            <a href="http://hillmover.javaeye.com/blog/191842#comments" style="color:red;">本文的讨论也很精彩，浏览讨论>></a>
          </span>
          <br/><br/><br/>
          <span style="color:#E28822;">JavaEye推荐</span>
          <br/>
          <ul class='adverts'><li><a href='/adverts/92' target='_blank'><span style="color:red;font-weight:bold;">快来参加7月17日在成都举行的SOA中国技术论坛</span></a></li><li><a href='/adverts/106' target='_blank'><span style="color:blue;font-weight:bold;">JavaEye问答大赛开始了！ 从6月23日 至 7月6日，奖品丰厚 ！</span></a></li><li><a href='/adverts/41' target='_blank'><span style="color:red;font-weight:bold;">北京: 千橡集团暨校内网诚聘软件研发工程师</span></a></li><li><a href='/adverts/42' target='_blank'><span style="color:red;font-weight:bold;">搜狐网站诚聘Java、PHP和C++工程师</span></a></li><li><a href='/adverts/97' target='_blank'><span style="color:blue;font-weight:bold;">Oracle专区上线，有Oracle最新文章，重要下载及知识库等精彩内容，欢迎访问。</span></a></li></ul>
          <br/><br/><br/>
          ]]>
        </description>
        <pubDate>Sun, 11 May 2008 05:13:28 +0800</pubDate>
        <link>http://hillmover.javaeye.com/blog/191842</link>
        <guid>http://hillmover.javaeye.com/blog/191842</guid>
      </item>
      <item>
        <title>Installaction - Httpd</title>
        <author>hillmover</author>
        <description>
          <![CDATA[
          <br/>
          作者: <a href="http://hillmover.javaeye.com">hillmover</a>&nbsp;
          链接：<a href="http://hillmover.javaeye.com/blog/189909" style="color:red;">http://hillmover.javaeye.com/blog/189909</a>&nbsp;
          发表时间: 2008年05月05日
          <br/><br/>
          声明：本文系JavaEye网站发布的原创博客文章，未经作者书面许可，严禁任何网站转载本文，否则必将追究法律责任！
          <br/><br/>
          <p><span style="color: #0000ff;"><strong># Install apache</strong></span></p>
<p>&gt; groupadd apache</p>
<p>&gt; useradd -g apache apache</p>
<p>&gt; ./configure --prefix=/usr/local/apache2 --enable-mods-shared=most --enable-ssl --enable-so</p>
<p>&gt; make &amp;&amp; make install</p>
<p>&gt; cd /usr/local/apache2/bin</p>
<p>&gt; cp apachectl /etc/rc.d/init.d/httpd</p>
<p>&gt; vi /etc/rc.d.init.d/httpd</p>
<p># chkconfig: 2345 70 30<br /># description: Apache is a World Wide Web server.&nbsp; It is used to serve \<br />#&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; HTML files and CGI.<br /># processname: httpd&nbsp;</p>
<p>...</p>
<p>case $ARGV in<br />start|stop|restart|graceful)<br />&nbsp;&nbsp;&nbsp; $HTTPD -k $ARGV -DSSL<br />&nbsp;&nbsp;&nbsp; ERROR=$?<br />&nbsp;&nbsp;&nbsp; ;;</p>
<p>&gt; /sbin/chkconfig --add httpd</p>
<p>&gt; chown -R root .</p>
<p>&gt; chgrp -R apache .</p>
<p>&gt; chown -R apache error logs</p>
<p>&gt; vi conf/httpd.conf</p>
<p>&lt;DocumentRoot "" ...</p>
<p>User apache</p>
<p>Group apache</p>
<p>...</p>
<p>&nbsp;</p>
<p><span style="color: #0000ff;"><strong># Customize the ssl</strong></span> </p>
<p>&gt; cd /tmp<br />&gt; mkdir ssl<br />&gt; cd /tmp<br />&gt; mkdir ssl<br />&gt; openssl req -new -out ssl/server.csr</p>
<p style="padding-left: 30px;">Enter PEM pass phrase: abc123<br />Verifying - Enter PEM pass phrase: abc123<br />Country Name (2 letter code) [GB]: ALL PRESS ENTER TO SKIP FROM HERE</p>
<p><br />&gt; openssl rsa -in privkey.pem -out ssl/server.key</p>
<p style="padding-left: 30px;"><br />Enter pass phrase for privkey.pem: abc123</p>
<p><br />&gt; openssl x509 -in ssl/server.csr -out ssl/server.crt -req -signkey ssl/server.key -days 365<br />&gt; mkdir /usr/local/apache2/conf/ssl.crt<br />&gt; mkdir /usr/local/apache2/conf/ssl.key<br />&gt; cp ssl/server.crt /usr/local/apache2/conf/ssl.crt<br />&gt; cp ssl/server.key /usr/local/apache2/conf/ssl.key<br />&gt; rm -rf privkey.pem ssl</p>
          <br/>
          <span style="color:red;">
            <a href="http://hillmover.javaeye.com/blog/189909#comments" style="color:red;">本文的讨论也很精彩，浏览讨论>></a>
          </span>
          <br/><br/><br/>
          <span style="color:#E28822;">JavaEye推荐</span>
          <br/>
          <ul class='adverts'><li><a href='/adverts/42' target='_blank'><span style="color:red;font-weight:bold;">搜狐网站诚聘Java、PHP和C++工程师</span></a></li><li><a href='/adverts/41' target='_blank'><span style="color:red;font-weight:bold;">北京: 千橡集团暨校内网诚聘软件研发工程师</span></a></li><li><a href='/adverts/92' target='_blank'><span style="color:red;font-weight:bold;">快来参加7月17日在成都举行的SOA中国技术论坛</span></a></li><li><a href='/adverts/97' target='_blank'><span style="color:blue;font-weight:bold;">Oracle专区上线，有Oracle最新文章，重要下载及知识库等精彩内容，欢迎访问。</span></a></li><li><a href='/adverts/106' target='_blank'><span style="color:blue;font-weight:bold;">JavaEye问答大赛开始了！ 从6月23日 至 7月6日，奖品丰厚 ！</span></a></li></ul>
          <br/><br/><br/>
          ]]>
        </description>
        <pubDate>Mon, 05 May 2008 21:08:46 +0800</pubDate>
        <link>http://hillmover.javaeye.com/blog/189909</link>
        <guid>http://hillmover.javaeye.com/blog/189909</guid>
      </item>
      <item>
        <title>Installation - ActiveMQ CPP Library 2.1.3</title>
        <author>hillmover</author>
        <description>
          <![CDATA[
          <br/>
          作者: <a href="http://hillmover.javaeye.com">hillmover</a>&nbsp;
          链接：<a href="http://hillmover.javaeye.com/blog/189891" style="color:red;">http://hillmover.javaeye.com/blog/189891</a>&nbsp;
          发表时间: 2008年05月05日
          <br/><br/>
          声明：本文系JavaEye网站发布的原创博客文章，未经作者书面许可，严禁任何网站转载本文，否则必将追究法律责任！
          <br/><br/>
          <p><span style="color: #0000ff;"><strong>ActiveMQ CPP Library 2.1.3</strong></span></p>
<p style="padding-left: 30px;"><span style="color: #0000ff;"><strong># Install dependencies</strong></span></p>
<p style="padding-left: 30px;">1. libuuid</p>
<p style="padding-left: 30px;">&nbsp; <span style="color: #800080;"><em>&gt; sudo yum install e2fsprogs-devel</em></span></p>
<p style="padding-left: 30px;"><br />2. CppUnit</p>
<p style="padding-left: 30px;">&nbsp; <span style="color: #800080;"><em>&gt; sudo yum install cppunit cppunit-devel</em></span></p>
<p style="padding-left: 30px;"><br />3. GNU Build System</p>
<p style="padding-left: 30px;">Tool&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Recommended Version<br />autoconf&nbsp;&nbsp;&nbsp; &gt;= 2.60<br />automake&nbsp;&nbsp;&nbsp; &gt;= 1.10<br />libtool&nbsp;&nbsp;&nbsp;&nbsp; &gt;= 1.5.24</p>
<p style="padding-left: 30px;"><span style="color: #0000ff;"><strong>#&nbsp;Building on Unix/Linux</strong></span></p>
<p style="padding-left: 30px;"><span style="color: #800080;"><em>&nbsp; &gt; ./autogen.sh</em></span></p>
<p style="padding-left: 30px;"><span style="color: #800080;"><em>&nbsp; &gt; ./configure</em></span></p>
<p style="padding-left: 30px;"><span style="color: #800080;"><em>&nbsp; &gt; make</em></span></p>
<p style="padding-left: 30px;"><span style="color: #800080;"><em>&nbsp; &gt; make install</em></span></p>
<p style="padding-left: 30px;"><span style="color: #0000ff;"><strong># To generate the doxygen documentation for the project</strong></span></p>
<p style="padding-left: 30px;">&nbsp; <span style="color: #800080;"><em>&gt; make doxygen-run</em></span></p>
<p>&nbsp;</p>
<p><span style="color: #0000ff;"><strong>Troubleshooting:</strong></span></p>
<p>The above offical instruction is just woks on paper. Actually, I cannot install activemq cpp well base on it. I got the following error messages:</p>
<p style="padding-left: 30px;"><span style="color: #0000ff;"><strong>Error:</strong></span></p>
<p style="padding-left: 30px;"><span style="color: #800080;"><em>&gt; ./autogen.sh<br />configure.ac:173: error: AC_SUBST: `DX_FLAG_[]DX_CURRENT_FEATURE' is not a valid<br />m4/ac_doxygen.m4:95: DX_REQUIRE_PROG is expanded from...<br />m4/ac_doxygen.m4:167: DX_ARG_ABLE is expanded from...<br />m4/ac_doxygen.m4:324: DX_INIT_DOXYGEN is expanded from...<br />configure.ac:173: the top level<br />autom4te: /usr/bin/m4 failed with exit status: 1<br />aclocal: autom4te failed with exit status: 1<br />autoreconf: aclocal failed with exit status: 1</em></span></p>
<p>The error is related to Doxygen. </p>
<p>Currently, I have no&nbsp;other ways except to disable all configurations&nbsp;about Doxygen.&nbsp; Actually, it does not affect the main activemq work.</p>
<p style="padding-left: 30px;"><span style="color: #0000ff;"><strong>Solution:</strong></span></p>
<p style="padding-left: 30px;">1. &gt; vi configure.ac</p>
<p style="padding-left: 30px;">Comment on the following lines:</p>
<p style="padding-left: 30px;"><em>## Execute Doxygen macros<br /><span style="color: #800080;"><span>#</span> DX_HTML_FEATURE(ON)<br /><span>#</span>&nbsp;DX_CHM_FEATURE(OFF)<br /><span>#</span>&nbsp;DX_CHI_FEATURE(OFF)<br /><span>#</span>&nbsp;DX_MAN_FEATURE(OFF)<br /><span>#</span>&nbsp;DX_RTF_FEATURE(OFF)<br /><span>#</span>&nbsp;DX_XML_FEATURE(OFF)<br /><span>#</span>&nbsp;DX_PDF_FEATURE(OFF)<br /><span>#</span>&nbsp;DX_PS_FEATURE(OFF)<br /><span>#</span>&nbsp;DX_INIT_DOXYGEN(activemq-cpp, doxygen.cfg, doc)</span></em></p>
<p>&nbsp;</p>
<p style="padding-left: 30px;">2. &gt; vi Mikefile.am</p>
<p style="padding-left: 30px;">Comment on the following lines:</p>
<p style="padding-left: 30px;"><em><span style="color: #800080;"><span>#</span> include doxygen-include.am</span></em></p>
<p style="padding-left: 30px;"><br /><em><span style="color: #800080;"><span>#</span> EXTRA_DIST=autogen.sh $(DX_CONFIG) doc/html</span></em></p>
<p>&nbsp;</p>
<p>OK. Please do autogen.sh, ./configure, make, and make install. It works fine now.</p>
<p>&nbsp;</p>
<p><strong><span style="color: #0000ff;">Start/Stop ActiveMQ</span></strong></p>
<p style="padding-left: 30px;">1. startup.sh </p>
<p style="padding-left: 30px;"><em><span style="color: #800080;">&nbsp;if [ -e /tmp/smlog ]; then<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; mv /tmp/smlog /tmp/smlog.bak;<br />&nbsp;fi<br />&nbsp;nohup bin/activemq &gt; /tmp/smlog 2&gt;&amp;1 &amp;<br />&nbsp;echo "[INFO] ActiveMQ is running..."</span></em></p>
<p>&nbsp;</p>
<p style="padding-left: 30px;">2. shutdown.sh</p>
<p style="padding-left: 30px;"><em><span style="color: #800080;">&nbsp;pid=`sudo ps -ef | grep "activemq" | awk ' { print $2 } '`<br />&nbsp;kill $pid;<br />&nbsp;echo "[INFO] ActiveMQ is stopped..."</span></em></p>
          <br/>
          <span style="color:red;">
            <a href="http://hillmover.javaeye.com/blog/189891#comments" style="color:red;">本文的讨论也很精彩，浏览讨论>></a>
          </span>
          <br/><br/><br/>
          <span style="color:#E28822;">JavaEye推荐</span>
          <br/>
          <ul class='adverts'><li><a href='/adverts/97' target='_blank'><span style="color:blue;font-weight:bold;">Oracle专区上线，有Oracle最新文章，重要下载及知识库等精彩内容，欢迎访问。</span></a></li><li><a href='/adverts/42' target='_blank'><span style="color:red;font-weight:bold;">搜狐网站诚聘Java、PHP和C++工程师</span></a></li><li><a href='/adverts/41' target='_blank'><span style="color:red;font-weight:bold;">北京: 千橡集团暨校内网诚聘软件研发工程师</span></a></li><li><a href='/adverts/92' target='_blank'><span style="color:red;font-weight:bold;">快来参加7月17日在成都举行的SOA中国技术论坛</span></a></li><li><a href='/adverts/106' target='_blank'><span style="color:blue;font-weight:bold;">JavaEye问答大赛开始了！ 从6月23日 至 7月6日，奖品丰厚 ！</span></a></li></ul>
          <br/><br/><br/>
          ]]>
        </description>
        <pubDate>Mon, 05 May 2008 19:05:56 +0800</pubDate>
        <link>http://hillmover.javaeye.com/blog/189891</link>
        <guid>http://hillmover.javaeye.com/blog/189891</guid>
      </item>
      <item>
        <title>Bash配置文件</title>
        <author>hillmover</author>
        <description>
          <![CDATA[
          <br/>
          作者: <a href="http://hillmover.javaeye.com">hillmover</a>&nbsp;
          链接：<a href="http://hillmover.javaeye.com/blog/189870" style="color:red;">http://hillmover.javaeye.com/blog/189870</a>&nbsp;
          发表时间: 2008年05月05日
          <br/><br/>
          声明：本文系JavaEye网站发布的原创博客文章，未经作者书面许可，严禁任何网站转载本文，否则必将追究法律责任！
          <br/><br/>
          <p class="a1">表2-6&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Bash配置文件</p>
<table class="a8Table" cellspacing="0" border="1" width="561" cellpadding="0" style="MARGIN-LEFT: 5.4pt; WIDTH: 420.65pt; BORDER-TOP-STYLE: none; BORDER-RIGHT-STYLE: none; BORDER-LEFT-STYLE: none; BORDER-COLLAPSE: collapse; BORDER-BOTTOM-STYLE: none">
<tbody>
<tr>
<td valign="top" width="120" style="BORDER-RIGHT: windowtext 1pt solid; PADDING-RIGHT: 5.4pt; BORDER-TOP: windowtext 1pt solid; PADDING-LEFT: 5.4pt; BORDER-LEFT-WIDTH: 1pt; BORDER-LEFT-COLOR: windowtext; PADDING-BOTTOM: 0cm; WIDTH: 90pt; PADDING-TOP: 0cm; BORDER-BOTTOM: windowtext 1pt solid">
<p class="a2">文件</p>
</td>
<td valign="top" width="441" style="PADDING-RIGHT: 5.4pt; BORDER-TOP: windowtext 1pt solid; PADDING-LEFT: 5.4pt; PADDING-BOTTOM: 0cm; WIDTH: 330.65pt; PADDING-TOP: 0cm; BORDER-BOTTOM: windowtext 1pt solid; BORDER-RIGHT-STYLE: none; BORDER-LEFT-STYLE: none">
<p class="a2">描述</p>
</td>
</tr>
<tr>
<td valign="top" width="120" style="BORDER-RIGHT: windowtext 1pt solid; PADDING-RIGHT: 5.4pt; PADDING-LEFT: 5.4pt; PADDING-BOTTOM: 0cm; WIDTH: 90pt; BORDER-TOP-STYLE: none; PADDING-TOP: 0cm; BORDER-BOTTOM: windowtext 1pt solid; BORDER-LEFT-STYLE: none">
<p class="a2">/etc/profile</p>
</td>
<td valign="top" width="441" style="PADDING-RIGHT: 5.4pt; PADDING-LEFT: 5.4pt; PADDING-BOTTOM: 0cm; WIDTH: 330.65pt; BORDER-TOP-STYLE: none; PADDING-TOP: 0cm; BORDER-BOTTOM: windowtext 1pt solid; BORDER-RIGHT-STYLE: none; BORDER-LEFT-STYLE: none">
<p class="a2">为所有用户设置用户环境信息。第一次登录时就执行该文件。该文件提供了路径的值，同时为某些内容设置环境变量，如邮箱的位置或历史文件的大小。最后，/etc/profile从/etc/profile.d目录中的配置文件收集shell设置</p>
</td>
</tr>
<tr>
<td valign="top" width="120" style="BORDER-RIGHT: windowtext 1pt solid; PADDING-RIGHT: 5.4pt; PADDING-LEFT: 5.4pt; PADDING-BOTTOM: 0cm; WIDTH: 90pt; BORDER-TOP-STYLE: none; PADDING-TOP: 0cm; BORDER-BOTTOM: windowtext 1pt solid; BORDER-LEFT-STYLE: none">
<p class="a2">/etc/bashrc</p>
</td>
<td valign="top" width="441" style="PADDING-RIGHT: 5.4pt; PADDING-LEFT: 5.4pt; PADDING-BOTTOM: 0cm; WIDTH: 330.65pt; BORDER-TOP-STYLE: none; PADDING-TOP: 0cm; BORDER-BOTTOM: windowtext 1pt solid; BORDER-RIGHT-STYLE: none; BORDER-LEFT-STYLE: none">
<p class="a2">每次打开bash shell时，会为每个运行bash shell的用户执行该文件。它设置默认提示符，可以添加一个或更多别名。可以用每个用户~/.bashrc文件中的信息改写该文件中的值</p>
</td>
</tr>
<tr>
<td valign="top" width="120" style="BORDER-RIGHT: windowtext 1pt solid; PADDING-RIGHT: 5.4pt; PADDING-LEFT: 5.4pt; PADDING-BOTTOM: 0cm; WIDTH: 90pt; BORDER-TOP-STYLE: none; PADDING-TOP: 0cm; BORDER-BOTTOM: windowtext 1pt solid; BORDER-LEFT-STYLE: none">
<p class="a2">~/.bash_profile</p>
</td>
<td valign="top" width="441" style="PADDING-RIGHT: 5.4pt; PADDING-LEFT: 5.4pt; PADDING-BOTTOM: 0cm; WIDTH: 330.65pt; BORDER-TOP-STYLE: none; PADDING-TOP: 0cm; BORDER-BOTTOM: windowtext 1pt solid; BORDER-RIGHT-STYLE: none; BORDER-LEFT-STYLE: none">
<p class="a2">每个用户使用它来输入针对他们自己使用的shell信息。用户登录时仅执行它一次。在默认情况下，它设置一些环境变量，并且执行用户的.bashrc文件</p>
</td>
</tr>
<tr>
<td valign="top" width="120" style="BORDER-RIGHT: windowtext 1pt solid; PADDING-RIGHT: 5.4pt; PADDING-LEFT: 5.4pt; PADDING-BOTTOM: 0cm; WIDTH: 90pt; BORDER-TOP-STYLE: none; PADDING-TOP: 0cm; BORDER-BOTTOM: windowtext 1pt solid; BORDER-LEFT-STYLE: none">
<p class="a2">~/.bashrc</p>
</td>
<td valign="top" width="441" style="PADDING-RIGHT: 5.4pt; PADDING-LEFT: 5.4pt; PADDING-BOTTOM: 0cm; WIDTH: 330.65pt; BORDER-TOP-STYLE: none; PADDING-TOP: 0cm; BORDER-BOTTOM: windowtext 1pt solid; BORDER-RIGHT-STYLE: none; BORDER-LEFT-STYLE: none">
<p class="a2">包含特定于bash shell的信息。在登录和每次打开一个新的bash shell时都会读取该文件。这是添加环境变量和别名的最好位置，这样shell就能够找到它们</p>
</td>
</tr>
<tr>
<td valign="top" width="120" style="BORDER-RIGHT: windowtext 1pt solid; PADDING-RIGHT: 5.4pt; PADDING-LEFT: 5.4pt; PADDING-BOTTOM: 0cm; WIDTH: 90pt; BORDER-TOP-STYLE: none; PADDING-TOP: 0cm; BORDER-BOTTOM: windowtext 1pt solid; BORDER-LEFT-STYLE: none">
<p class="a2">~/.bash_logout</p>
</td>
<td valign="top" width="441" style="PADDING-RIGHT: 5.4pt; PADDING-LEFT: 5.4pt; PADDING-BOTTOM: 0cm; WIDTH: 330.65pt; BORDER-TOP-STYLE: none; PADDING-TOP: 0cm; BORDER-BOTTOM: windowtext 1pt solid; BORDER-RIGHT-STYLE: none; BORDER-LEFT-STYLE: none">
<p class="a2">每次注销时执行（退出最后一个bash shell时）。在默认情况下，它只是清空屏幕</p>
</td>
</tr>
</tbody>
</table>
<p class="a8">添加环境变量</p>
<p class="a8">PATH=.:$PATH ; export PATH</p>
<p class="a8">M=/work/time/files/info/memos ; export M</p>
<p class="a8">&nbsp;</p>
<p class="a8">添加别名</p>
<p class="a8">alias p='pwd ; ls &ndash;CF'</p>
          <br/>
          <span style="color:red;">
            <a href="http://hillmover.javaeye.com/blog/189870#comments" style="color:red;">本文的讨论也很精彩，浏览讨论>></a>
          </span>
          <br/><br/><br/>
          <span style="color:#E28822;">JavaEye推荐</span>
          <br/>
          <ul class='adverts'><li><a href='/adverts/106' target='_blank'><span style="color:blue;font-weight:bold;">JavaEye问答大赛开始了！ 从6月23日 至 7月6日，奖品丰厚 ！</span></a></li><li><a href='/adverts/97' target='_blank'><span style="color:blue;font-weight:bold;">Oracle专区上线，有Oracle最新文章，重要下载及知识库等精彩内容，欢迎访问。</span></a></li><li><a href='/adverts/92' target='_blank'><span style="color:red;font-weight:bold;">快来参加7月17日在成都举行的SOA中国技术论坛</span></a></li><li><a href='/adverts/41' target='_blank'><span style="color:red;font-weight:bold;">北京: 千橡集团暨校内网诚聘软件研发工程师</span></a></li><li><a href='/adverts/42' target='_blank'><span style="color:red;font-weight:bold;">搜狐网站诚聘Java、PHP和C++工程师</span></a></li></ul>
          <br/><br/><br/>
          ]]>
        </description>
        <pubDate>Mon, 05 May 2008 17:53:03 +0800</pubDate>
        <link>http://hillmover.javaeye.com/blog/189870</link>
        <guid>http://hillmover.javaeye.com/blog/189870</guid>
      </item>
      <item>
        <title>Installation - MySQL (with embedded server)</title>
        <author>hillmover</author>
        <description>
          <![CDATA[
          <br/>
          作者: <a href="http://hillmover.javaeye.com">hillmover</a>&nbsp;
          链接：<a href="http://hillmover.javaeye.com/blog/189715" style="color:red;">http://hillmover.javaeye.com/blog/189715</a>&nbsp;
          发表时间: 2008年05月05日
          <br/><br/>
          声明：本文系JavaEye网站发布的原创博客文章，未经作者书面许可，严禁任何网站转载本文，否则必将追究法律责任！
          <br/><br/>
          <p>Downloads install package: mysql-5.1.24-rc.tar.tar</p>
<p><span style="color: #0000ff;"><strong># Add user/group for MySQL</strong></span></p>
<p>&gt; groupadd mysql</p>
<p>&gt; useradd -g mysql mysql</p>
<p>&gt; &nbsp;tar zxf mysql-5.1.24-rc.tar.tar</p>
<p>&gt; cd mysql-5.1.24-rc</p>
<p><span style="color: #0000ff;"><strong># check, compile, and install</strong></span></p>
<p>&gt; ./configure --prefix=/usr/local/mysql5.1.24 --with-embedded-server&nbsp;</p>
<p>&gt; make</p>
<p>&gt; make install</p>
<p><span style="color: #0000ff;"><strong># configure modifier, db info</strong></span></p>
<p>&gt; cp support-files/my-medium.cnf /etc/my.cnf</p>
<p>&gt; cd /usr/local/mysql5.1.24 </p>
<p>&gt; chown -R mysql .</p>
<p>&gt; chgrp -R mysql .</p>
<p>&gt; bin/mysql_install_db --user=mysql</p>
<p>&gt; chown -R root .</p>
<p>&gt; chown -R mysql var</p>
<p>&gt; bin/mysqld_safe --user=mysql &amp;</p>
<p><span style="color: #0000ff;"><strong># as service</strong></span></p>
<p>&gt; rm -f /etc/rc.d/init.d/mysqld</p>
<p>&gt; cp support-files/mysql.server /etc/rc.d/init.d/mysqld</p>
<p>&gt; chmod +755 /etc/rc.d/init.d/mysqld</p>
<p>&gt; /sbin/chkconfig --add mysqld</p>
<p>&gt; /sbin/chkconfig --level 345 mysqld on</p>
<p><span style="color: #0000ff;"><strong># as lib</strong></span></p>
<p>&gt; vi /etc/ld.so.conf</p>
<p>/usr/local/mysql5.1.24/lib/mysql</p>
<p>&gt; ldconfig /etc/ld.so.conf</p>
<p>&gt; ldconfig　－v | grep mysql&nbsp; (Optional)</p>
<p>&nbsp;</p>
          <br/>
          <span style="color:red;">
            <a href="http://hillmover.javaeye.com/blog/189715#comments" style="color:red;">本文的讨论也很精彩，浏览讨论>></a>
          </span>
          <br/><br/><br/>
          <span style="color:#E28822;">JavaEye推荐</span>
          <br/>
          <ul class='adverts'><li><a href='/adverts/106' target='_blank'><span style="color:blue;font-weight:bold;">JavaEye问答大赛开始了！ 从6月23日 至 7月6日，奖品丰厚 ！</span></a></li><li><a href='/adverts/42' target='_blank'><span style="color:red;font-weight:bold;">搜狐网站诚聘Java、PHP和C++工程师</span></a></li><li><a href='/adverts/97' target='_blank'><span style="color:blue;font-weight:bold;">Oracle专区上线，有Oracle最新文章，重要下载及知识库等精彩内容，欢迎访问。</span></a></li><li><a href='/adverts/41' target='_blank'><span style="color:red;font-weight:bold;">北京: 千橡集团暨校内网诚聘软件研发工程师</span></a></li><li><a href='/adverts/92' target='_blank'><span style="color:red;font-weight:bold;">快来参加7月17日在成都举行的SOA中国技术论坛</span></a></li></ul>
          <br/><br/><br/>
          ]]>
        </description>
        <pubDate>Mon, 05 May 2008 14:46:58 +0800</pubDate>
        <link>http://hillmover.javaeye.com/blog/189715</link>
        <guid>http://hillmover.javaeye.com/blog/189715</guid>
      </item>
      <item>
        <title>yum 命令</title>
        <author>hillmover</author>
        <description>
          <![CDATA[
          <br/>
          作者: <a href="http://hillmover.javaeye.com">hillmover</a>&nbsp;
          链接：<a href="http://hillmover.javaeye.com/blog/189699" style="color:red;">http://hillmover.javaeye.com/blog/189699</a>&nbsp;
          发表时间: 2008年05月05日
          <br/><br/>
          声明：本文系JavaEye网站发布的原创博客文章，未经作者书面许可，严禁任何网站转载本文，否则必将追究法律责任！
          <br/><br/>
          <p><span style="color: #0000ff;">使用yum之前，请切换为<strong>root</strong>用户。</span></p>
<p>&nbsp;</p>
<p><span style="color: #0000ff;"><strong>添加/删除/更新软件</strong></span></p>
<p>1.仅安装指定的软件<br />命令：yum install &lt;package_name&gt;</p>
<p>yum会查询数据库，有无这一软件包，如果有，则检查其依赖冲突关系，如果没有依赖冲突，那么最好，下载安装;如果有，则会给出提示，询问是否要同时安装依赖，或删除冲突的包，你可以自己作出判断。</p>
<p>2.用YUM删除软件包<br />命令：yum remove &lt;package_name&gt;</p>
<p>同安装一样，yum也会查询数据库，给出解决依赖关系的提示。</p>
<p>3.列出所有可更新的软件清单<br />命令：yum check-update</p>
<p>4.更新所有已安装软件<br />命令：yum update</p>
<p>5.仅更新指定的软件<br />命令：yum update &lt;package_name&gt;</p>
<p>&nbsp;</p>
<p><span style="color: #0000ff;"><strong>用YUM查询软件信息</strong></span><br />1.使用YUM查找软件包<br />命令：yum search &lt;keyword&gt;</p>
<p>比如我们要安装一个Instant Messenger，但又不知到底有哪些，这时不妨用 yum search messenger这样的指令进行搜索，yum会搜索所有可用rpm的描述，列出所有描述中和messeger有关的rpm包，于 是我们可能得到gaim，kopete等等，并从中选择。 <br />有时我们还会碰到安装了一个包，但又不知道其用途，我们可以用yum info packagename这个指令来获取信息。</p>
<p>2.列出所有可安裝的软件清单<br />命令：yum list</p>
<p>3.列出所有可更新的软件包<br />命令：yum list updates</p>
<p>4.列出所有已安装的软件包<br />命令：yum list installed</p>
<p>5.列出所有已安装但不在 Yum Repository 內的软件包<br />命令：yum list extras</p>
<p>6.列出所指定的软件包<br />命令：yum list &lt;package_name&gt;</p>
<p>7.使用YUM获取软件包信息<br />命令：yum info &lt;package_name&gt;</p>
<p>8.列出所有软件包的信息<br />命令：yum info</p>
<p>9.列出所有可更新的软件包信息<br />命令：yum info updates</p>
<p>10.列出所有已安裝的软件包信息<br />命令：yum info installed</p>
<p>11.列出所有已安裝但不在 Yum Repository 內的软件包信息<br />命令：yum info extras</p>
<p>12.列出软件包提供哪些文件<br />命令：yum provides &lt;package_name&gt;</p>
<p>&nbsp;</p>
<p><span style="color: #0000ff;"><strong>清除YUM缓存<br /></strong></span>yum 会把下载的软件包和header存储在cache中，而不会自动删除。如果我们觉得它们占用了磁盘空间，可以使用yum&nbsp;clean指令进行清除。</p>
<p><br />1.清除缓存目录(/var/cache/yum)下的软件包<br />命令：yum clean packages</p>
<p>2.清除缓存目录(/var/cache/yum)下的 headers<br />命令：yum clean headers</p>
<p>3.清除缓存目录(/var/cache/yum)下旧的 headers<br />命令：yum clean oldheaders</p>
<p>4.清除缓存目录(/var/cache/yum)下的软件包及旧的headers<br />命令：yum clean, yum clean all (= yum clean packages; yum clean oldheaders) </p>
<p>&nbsp;</p>
<p><span style="color: #0000ff;"><strong>举例：</strong></span></p>
<p>yum groupinstall "GNOME Desktop Environment"</p>
          <br/>
          <span style="color:red;">
            <a href="http://hillmover.javaeye.com/blog/189699#comments" style="color:red;">本文的讨论也很精彩，浏览讨论>></a>
          </span>
          <br/><br/><br/>
          <span style="color:#E28822;">JavaEye推荐</span>
          <br/>
          <ul class='adverts'><li><a href='/adverts/106' target='_blank'><span style="color:blue;font-weight:bold;">JavaEye问答大赛开始了！ 从6月23日 至 7月6日，奖品丰厚 ！</span></a></li><li><a href='/adverts/92' target='_blank'><span style="color:red;font-weight:bold;">快来参加7月17日在成都举行的SOA中国技术论坛</span></a></li><li><a href='/adverts/97' target='_blank'><span style="color:blue;font-weight:bold;">Oracle专区上线，有Oracle最新文章，重要下载及知识库等精彩内容，欢迎访问。</span></a></li><li><a href='/adverts/41' target='_blank'><span style="color:red;font-weight:bold;">北京: 千橡集团暨校内网诚聘软件研发工程师</span></a></li><li><a href='/adverts/42' target='_blank'><span style="color:red;font-weight:bold;">搜狐网站诚聘Java、PHP和C++工程师</span></a></li></ul>
          <br/><br/><br/>
          ]]>
        </description>
        <pubDate>Mon, 05 May 2008 14:08:00 +0800</pubDate>
        <link>http://hillmover.javaeye.com/blog/189699</link>
        <guid>http://hillmover.javaeye.com/blog/189699</guid>
      </item>
  </channel>
</rss>