<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>haohtml&#039;s blog</title>
	<atom:link href="http://blog.haohtml.com/feed" rel="self" type="application/rss+xml" />
	<link>http://blog.haohtml.com</link>
	<description>haohtml&#039;s life and works</description>
	<lastBuildDate>Sun, 05 Feb 2012 12:34:56 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>在安装php的make时候,出现错误&quot;chmod: cannot access `ext/phar/phar.phar&#039;: No such file or directory&quot;的解决办法</title>
		<link>http://blog.haohtml.com/archives/12482</link>
		<comments>http://blog.haohtml.com/archives/12482#comments</comments>
		<pubDate>Sun, 05 Feb 2012 06:45:56 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[服务器类]]></category>
		<category><![CDATA[php]]></category>

		<guid isPermaLink="false">http://blog.haohtml.com/?p=12482</guid>
		<description><![CDATA[在对php进行configure的时候,只需要在./configure的后面加上--without-pear 即可.<table class="wumii-related-items" cellspacing="0" cellpadding="3" border="0"  style="clear: both;">
    
    <tr>
        <td colspan="4"><b><font size="-1"  style="display: block !important; padding: 20px 0 5px !important;">您可能也喜欢：</font></b></td>
    </tr>
    
        <tr>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important;">
                    <a target="_blank" title="50个非常有用的PHP工具" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fblog.haohtml.com%2Farchives%2F7059&from=http%3A%2F%2Fblog.haohtml.com%2Farchives%2F12482">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/site_images/2011/08/02/20541028.png" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">50个非常有用的PHP工具</font>
                    </a>
                </td>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;">
                    <a target="_blank" title="采用curl库在PHP程序之间传递数组[原创]" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fblog.haohtml.com%2Farchives%2F3223&from=http%3A%2F%2Fblog.haohtml.com%2Farchives%2F12482">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/site_images/2011/03/22/4027629.gif" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">采用curl库在PHP程序之间传递数组[原创]</font>
                    </a>
                </td>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;">
                    <a target="_blank" title="php Safe_mode影响参数" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fblog.haohtml.com%2Farchives%2F8824&from=http%3A%2F%2Fblog.haohtml.com%2Farchives%2F12482">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/images/blogWidget/wordpress_default.gif" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">php Safe_mode影响参数</font>
                    </a>
                </td>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;">
                    <a target="_blank" title="MVC模式的PHP实现" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fblog.haohtml.com%2Farchives%2F455&from=http%3A%2F%2Fblog.haohtml.com%2Farchives%2F12482">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/site_images/2011/09/15/31169095.gif" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">MVC模式的PHP实现</font>
                    </a>
                </td>
        </tr>
    
    <tr>
        <td colspan="4" align="right">
            <a style="text-decoration: none !important;" href="http://www.wumii.com/widget/relatedItems.htm" target="_blank" title="无觅相关文章插件">
                <font size="-1" color="#bbbbbb" style="display: block !important; font-family: arial !important; padding: 5px 0 !important; font-size: 12px !important; color: #bbb !important;">无觅</font>
            </a>
        </td>
    </tr>
</table>]]></description>
			<content:encoded><![CDATA[<p>在对php进行configure的时候,只需要在./configure的后面加上<span style="color: #0000ff;">--without-pear</span> 即可.</p>
<table class="wumii-related-items" cellspacing="0" cellpadding="3" border="0"  style="clear: both;">
    
    <tr>
        <td colspan="4"><b><font size="-1"  style="display: block !important; padding: 20px 0 5px !important;">您可能也喜欢：</font></b></td>
    </tr>
    
        <tr>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important;">
                    <a target="_blank" title="50个非常有用的PHP工具" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fblog.haohtml.com%2Farchives%2F7059&from=http%3A%2F%2Fblog.haohtml.com%2Farchives%2F12482">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/site_images/2011/08/02/20541028.png" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">50个非常有用的PHP工具</font>
                    </a>
                </td>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;">
                    <a target="_blank" title="采用curl库在PHP程序之间传递数组[原创]" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fblog.haohtml.com%2Farchives%2F3223&from=http%3A%2F%2Fblog.haohtml.com%2Farchives%2F12482">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/site_images/2011/03/22/4027629.gif" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">采用curl库在PHP程序之间传递数组[原创]</font>
                    </a>
                </td>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;">
                    <a target="_blank" title="php Safe_mode影响参数" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fblog.haohtml.com%2Farchives%2F8824&from=http%3A%2F%2Fblog.haohtml.com%2Farchives%2F12482">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/images/blogWidget/wordpress_default.gif" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">php Safe_mode影响参数</font>
                    </a>
                </td>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;">
                    <a target="_blank" title="MVC模式的PHP实现" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fblog.haohtml.com%2Farchives%2F455&from=http%3A%2F%2Fblog.haohtml.com%2Farchives%2F12482">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/site_images/2011/09/15/31169095.gif" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">MVC模式的PHP实现</font>
                    </a>
                </td>
        </tr>
    
    <tr>
        <td colspan="4" align="right">
            <a style="text-decoration: none !important;" href="http://www.wumii.com/widget/relatedItems.htm" target="_blank" title="无觅相关文章插件">
                <font size="-1" color="#bbbbbb" style="display: block !important; font-family: arial !important; padding: 5px 0 !important; font-size: 12px !important; color: #bbb !important;">无觅</font>
            </a>
        </td>
    </tr>
</table>]]></content:encoded>
			<wfw:commentRss>http://blog.haohtml.com/archives/12482/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>编译php出错：error while loading shared libraries: libmysqlclient.so.18: cannot open shared object f</title>
		<link>http://blog.haohtml.com/archives/12479</link>
		<comments>http://blog.haohtml.com/archives/12479#comments</comments>
		<pubDate>Sun, 05 Feb 2012 06:38:16 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[服务器类]]></category>
		<category><![CDATA[php]]></category>

		<guid isPermaLink="false">http://blog.haohtml.com/?p=12479</guid>
		<description><![CDATA[近日在编译php，make的时候出错： /root/dev/php-5.3.6/sapi/cli/php: error while loading shared libraries:  libmysqlclient.so.18: cannot open shared object file: No such file or  directory make: *** [ext/phar/phar.php] Error 127 =================================================== 网上找到的解决办法是: ln -s /usr/local/mysql/lib/libmysqlclient.so.18  /usr/lib/ 照做后仍然报错，原因是该方法适用于32位系统，64位系统应使用下面的这行 ln -s /usr/local/mysql/lib/libmysqlclient.so.18  /usr/lib64/ 另外：在编译的时候，不写mysql的路径，而使用mysqlnd代替，也可解决该问题的出现。<table class="wumii-related-items" cellspacing="0" cellpadding="3" border="0"  style="clear: both;">
    
    <tr>
        <td colspan="4"><b><font size="-1"  style="display: block !important; padding: 20px 0 5px !important;">您可能也喜欢：</font></b></td>
    </tr>
    
        <tr>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important;">
                    <a target="_blank" title="在安装php的make时候,出现错误&quot;chmod: cannot access `ext/phar/phar.phar': No such file or directory&quot;的解决办法" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fblog.haohtml.com%2Farchives%2F12482&from=http%3A%2F%2Fblog.haohtml.com%2Farchives%2F12479">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/images/blogWidget/wordpress_default.gif" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">在安装php的make时候,出现错误&quot;chmod: cannot access `ext/phar/phar.phar': No such file or directory&quot;的解决办法</font>
                    </a>
                </td>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;">
                    <a target="_blank" title="50个非常有用的PHP工具" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fblog.haohtml.com%2Farchives%2F7059&from=http%3A%2F%2Fblog.haohtml.com%2Farchives%2F12479">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/site_images/2011/08/02/20541028.png" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">50个非常有用的PHP工具</font>
                    </a>
                </td>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;">
                    <a target="_blank" title="从php核心代码看require和include的区别" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fblog.haohtml.com%2Farchives%2F4311&from=http%3A%2F%2Fblog.haohtml.com%2Farchives%2F12479">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/site_images/2011/03/22/4027588.jpg" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">从php核心代码看require和include的区别</font>
                    </a>
                </td>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;">
                    <a target="_blank" title="404错误页面重定向 PHP使用HEADER头发送状态(Status)信息(一)" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fblog.haohtml.com%2Farchives%2F3070&from=http%3A%2F%2Fblog.haohtml.com%2Farchives%2F12479">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/site_images/2011/03/22/4028468.jpg" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">404错误页面重定向 PHP使用HEADER头发送状态(Status)信息(一)</font>
                    </a>
                </td>
        </tr>
    
    <tr>
        <td colspan="4" align="right">
            <a style="text-decoration: none !important;" href="http://www.wumii.com/widget/relatedItems.htm" target="_blank" title="无觅相关文章插件">
                <font size="-1" color="#bbbbbb" style="display: block !important; font-family: arial !important; padding: 5px 0 !important; font-size: 12px !important; color: #bbb !important;">无觅</font>
            </a>
        </td>
    </tr>
</table>]]></description>
			<content:encoded><![CDATA[<p>近日在编译php，make的时候出错：</p>
<blockquote><p>/root/dev/php-5.3.6/sapi/cli/php: error while loading shared libraries:  libmysqlclient.so.18: cannot open shared object file: No such file or  directory<br />
make: *** [ext/phar/phar.php] Error 127</p></blockquote>
<p>===================================================</p>
<p><strong>网上找到的解决办法是:</strong></p>
<blockquote><p>ln -s /usr/local/mysql/lib/libmysqlclient.so.18  /usr/lib/</p></blockquote>
<p>照做后仍然报错，原因是该方法适用于32位系统，64位系统应使用下面的这行</p>
<blockquote><p>ln -s /usr/local/mysql/lib/libmysqlclient.so.18  /usr/lib64/</p></blockquote>
<p>另外：在编译的时候，不写mysql的路径，而使用mysqlnd代替，也可解决该问题的出现。</p>
<table class="wumii-related-items" cellspacing="0" cellpadding="3" border="0"  style="clear: both;">
    
    <tr>
        <td colspan="4"><b><font size="-1"  style="display: block !important; padding: 20px 0 5px !important;">您可能也喜欢：</font></b></td>
    </tr>
    
        <tr>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important;">
                    <a target="_blank" title="在安装php的make时候,出现错误&quot;chmod: cannot access `ext/phar/phar.phar': No such file or directory&quot;的解决办法" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fblog.haohtml.com%2Farchives%2F12482&from=http%3A%2F%2Fblog.haohtml.com%2Farchives%2F12479">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/images/blogWidget/wordpress_default.gif" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">在安装php的make时候,出现错误&quot;chmod: cannot access `ext/phar/phar.phar': No such file or directory&quot;的解决办法</font>
                    </a>
                </td>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;">
                    <a target="_blank" title="50个非常有用的PHP工具" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fblog.haohtml.com%2Farchives%2F7059&from=http%3A%2F%2Fblog.haohtml.com%2Farchives%2F12479">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/site_images/2011/08/02/20541028.png" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">50个非常有用的PHP工具</font>
                    </a>
                </td>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;">
                    <a target="_blank" title="从php核心代码看require和include的区别" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fblog.haohtml.com%2Farchives%2F4311&from=http%3A%2F%2Fblog.haohtml.com%2Farchives%2F12479">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/site_images/2011/03/22/4027588.jpg" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">从php核心代码看require和include的区别</font>
                    </a>
                </td>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;">
                    <a target="_blank" title="404错误页面重定向 PHP使用HEADER头发送状态(Status)信息(一)" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fblog.haohtml.com%2Farchives%2F3070&from=http%3A%2F%2Fblog.haohtml.com%2Farchives%2F12479">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/site_images/2011/03/22/4028468.jpg" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">404错误页面重定向 PHP使用HEADER头发送状态(Status)信息(一)</font>
                    </a>
                </td>
        </tr>
    
    <tr>
        <td colspan="4" align="right">
            <a style="text-decoration: none !important;" href="http://www.wumii.com/widget/relatedItems.htm" target="_blank" title="无觅相关文章插件">
                <font size="-1" color="#bbbbbb" style="display: block !important; font-family: arial !important; padding: 5px 0 !important; font-size: 12px !important; color: #bbb !important;">无觅</font>
            </a>
        </td>
    </tr>
</table>]]></content:encoded>
			<wfw:commentRss>http://blog.haohtml.com/archives/12479/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>[教程]Centos下安装lnmp教程(最新版2012-02-05)</title>
		<link>http://blog.haohtml.com/archives/12473</link>
		<comments>http://blog.haohtml.com/archives/12473#comments</comments>
		<pubDate>Sun, 05 Feb 2012 06:00:31 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[服务器类]]></category>
		<category><![CDATA[lnmp]]></category>

		<guid isPermaLink="false">http://blog.haohtml.com/?p=12473</guid>
		<description><![CDATA[以下教程参考上次写的lnmp安装教程http://blog.haohtml.com/archives/6051整理的,部分细节由于软件版本的变更也同时进行了增加和修改. 安装环境及软件: Centos6.1 X86_64 mysql-5.5.20-linux2.6-x86_64.tar.gz php-5.3.10.tar.gz nginx-1.0.11 以上软件全部为截止当前日期 2012-2-5 为止最新稳定版的软件. 前期准备工作 一.安装常用命令 yum -y install wget make zip unzip patch //有些命令可能以前安装过.这里就不需要重新安装了,不确定的话,再安装一次也没有关系的,系统会自动跳过安装过的命令的. ========================================================= 二.修改yum源 加快安装速度,这里我们使用sohu的镜像yum源的。 cd /etc/yum.repos.d mv CentOS-Base.repo CentOS-Base.repo.bak wget -O CentOS-Base.repo http://mirrors.sohu.com/help/CentOS-Base-sohu.repo vi CentOS-Base.repo 将所有mirrorlist行注释掉,在行首添加#符号即可.有关更多镜像站点,请参考:http://blog.haohtml.com/index.php/archives/5669 如果要使用本地的DVD光盘作为yum源的话,请参考:http://blog.haohtml.com/archives/5742 ========================================================= 三.安装软件常用命令及常用相关库文件 yum -y install gcc gcc-c++ autoconf libjpeg libjpeg-devel libpng libpng-devel freetype freetype-devel libxml2 libxml2-devel zlib zlib-devel glibc glibc-devel [...]<table class="wumii-related-items" cellspacing="0" cellpadding="3" border="0"  style="clear: both;">
    
    <tr>
        <td colspan="4"><b><font size="-1"  style="display: block !important; padding: 20px 0 5px !important;">您可能也喜欢：</font></b></td>
    </tr>
    
        <tr>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important;">
                    <a target="_blank" title="Centos64位系统下&quot;configure: error: libjpeg.(a|so) not found&quot;的解决办法" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fblog.haohtml.com%2Farchives%2F12272&from=http%3A%2F%2Fblog.haohtml.com%2Farchives%2F12473">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/images/blogWidget/wordpress_default.gif" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">Centos64位系统下&quot;configure: error: libjpeg.(a|so) not found&quot;的解决办法</font>
                    </a>
                </td>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;">
                    <a target="_blank" title="CentOS下安装lnmp(Nginx+PHP+MySQL)fpm" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fblog.haohtml.com%2Farchives%2F5732&from=http%3A%2F%2Fblog.haohtml.com%2Farchives%2F12473">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/images/blogWidget/wordpress_default.gif" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">CentOS下安装lnmp(Nginx+PHP+MySQL)fpm</font>
                    </a>
                </td>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;">
                    <a target="_blank" title="CentOS操作系统安装教程" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fblog.haohtml.com%2Farchives%2F4859&from=http%3A%2F%2Fblog.haohtml.com%2Farchives%2F12473">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/site_images/2011/03/26/4302696.jpg" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">CentOS操作系统安装教程</font>
                    </a>
                </td>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;">
                    <a target="_blank" title="CentOS上DirectAdmin安装教程" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fblog.haohtml.com%2Farchives%2F6822&from=http%3A%2F%2Fblog.haohtml.com%2Farchives%2F12473">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/site_images/2011/03/22/4023274.gif" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">CentOS上DirectAdmin安装教程</font>
                    </a>
                </td>
        </tr>
    
    <tr>
        <td colspan="4" align="right">
            <a style="text-decoration: none !important;" href="http://www.wumii.com/widget/relatedItems.htm" target="_blank" title="无觅相关文章插件">
                <font size="-1" color="#bbbbbb" style="display: block !important; font-family: arial !important; padding: 5px 0 !important; font-size: 12px !important; color: #bbb !important;">无觅</font>
            </a>
        </td>
    </tr>
</table>]]></description>
			<content:encoded><![CDATA[<p>以下教程参考上次写的lnmp安装教程<a href="http://blog.haohtml.com/archives/6051">http://blog.haohtml.com/archives/6051</a>整理的,部分细节由于软件版本的变更也同时进行了增加和修改.</p>
<p><strong>安装环境及软件:</strong></p>
<p>Centos6.1 X86_64<br />
<a href="http://mysql.spd.co.il/Downloads/MySQL-5.5/mysql-5.5.20-linux2.6-x86_64.tar.gz" target="_blank"> mysql-5.5.20-linux2.6-x86_64.tar.gz</a><br />
<a href="http://cn2.php.net/distributions/php-5.3.10.tar.gz" target="_blank"> php-5.3.10.tar.gz</a><br />
<a href="http://nginx.org/download/nginx-1.0.11.tar.gz" target="_blank">nginx-1.0.11</a></p>
<p>以上软件全部为截止当前日期 <span style="color: #ff0000;">2012-2-5</span> 为止最新稳定版的软件.</p>
<p><strong style="background-color: #ffffff; color: #444444; font-family: Verdana, Arial, Helvetica, sans-serif; line-height: 22px;">前期准备工作</strong></p>
<div style="color: #444444; font-family: Verdana, Arial, Helvetica, sans-serif; line-height: 22px; background-color: #ffffff;"><span style="color: #0000ff;">一.安装常用命令</span></div>
<blockquote>
<div id="_mcePaste">yum -y install wget make zip unzip <a href="http://blog.haohtml.com/archives/5980" target="_blank">patch</a></div>
</blockquote>
<div id="_mcePaste" style="color: #444444; font-family: Verdana, Arial, Helvetica, sans-serif; line-height: 22px; background-color: #ffffff;">//有些命令可能以前安装过.这里就不需要重新安装了,不确定的话,再安装一次也没有关系的,系统会自动跳过安装过的命令的.</div>
<div style="color: #444444; font-family: Verdana, Arial, Helvetica, sans-serif; line-height: 22px; background-color: #ffffff;">=========================================================</div>
<div style="color: #444444; font-family: Verdana, Arial, Helvetica, sans-serif; line-height: 22px; background-color: #ffffff;"><span style="color: #0000ff;">二.修改yum源</span></div>
<div style="color: #444444; font-family: Verdana, Arial, Helvetica, sans-serif; line-height: 22px; background-color: #ffffff;">加快安装速度,这里我们使用sohu的镜像yum源的。</div>
<blockquote>
<div id="_mcePaste">cd /etc/yum.repos.d</div>
<div id="_mcePaste">mv CentOS-Base.repo CentOS-Base.repo.bak</div>
<div id="_mcePaste">wget -O CentOS-Base.repo http://mirrors.sohu.com/help/CentOS-Base-sohu.repo</div>
<div id="_mcePaste">vi CentOS-Base.repo</div>
</blockquote>
<div id="_mcePaste" style="color: #444444; font-family: Verdana, Arial, Helvetica, sans-serif; line-height: 22px; background-color: #ffffff;">将所有mirrorlist行注释掉,在行首添加#符号即可.有关更多镜像站点,请参考:<a style="color: #be4b29; text-decoration: none; outline-style: none; outline-width: initial; outline-color: initial;" href="http://blog.haohtml.com/index.php/archives/5669">http://blog.haohtml.com/index.php/archives/5669</a></div>
<div id="_mcePaste" style="color: #444444; font-family: Verdana, Arial, Helvetica, sans-serif; line-height: 22px; background-color: #ffffff;"><span style="color: #ff6600;">如果要使用本地的DVD光盘作为yum源的话</span>,请参考:<a style="color: #be4b29; text-decoration: none; outline-style: none; outline-width: initial; outline-color: initial;" href="http://blog.haohtml.com/archives/5742">http://blog.haohtml.com/archives/5742</a></div>
<div style="color: #444444; font-family: Verdana, Arial, Helvetica, sans-serif; line-height: 22px; background-color: #ffffff;">=========================================================</div>
<div id="_mcePaste" style="color: #444444; font-family: Verdana, Arial, Helvetica, sans-serif; line-height: 22px; background-color: #ffffff;"><span style="color: #0000ff;">三.安装软件常用命令及常用相关库文件</span></div>
<blockquote>
<div id="_mcePaste">yum -y install gcc gcc-c++ autoconf libjpeg libjpeg-devel libpng libpng-devel freetype freetype-devel libxml2 libxml2-devel zlib zlib-devel glibc glibc-devel glib2 glib2-devel bzip2 bzip2-devel ncurses ncurses-devel curl curl-devel e2fsprogs e2fsprogs-devel krb5 krb5-devel libidn libidn-devel openssl openssl-devel openldap openldap-devel nss_ldap openldap-clients openldap-servers</div>
</blockquote>
<div id="_mcePaste" style="color: #444444; font-family: Verdana, Arial, Helvetica, sans-serif; line-height: 22px; background-color: #ffffff;">===================================</div>
<div><span style="color: #0000ff;">四.下载相关软件</span></div>
<blockquote>
<div>cd ~</div>
<div>mkdir soft<br />
cd soft</p>
<div></div>
<div>wget <a href="http://mysql.spd.co.il/Downloads/MySQL-5.5/mysql-5.5.20-linux2.6-x86_64.tar.gz" target="_blank">http://mysql.spd.co.il/Downloads/MySQL-5.5/mysql-5.5.20-linux2.6-x86_64.tar.gz</a><br />
wget <a href="http://pecl.php.net/get/PDO_MYSQL-1.0.2.tgz" target="_blank">http://pecl.php.net/get/PDO_MYSQL-1.0.2.tgz</a></div>
<div>wget <a href="http://cn2.php.net/distributions/php-5.3.10.tar.gz" target="_blank">http://cn2.php.net/distributions/php-5.3.10.tar.gz</a><br />
wget <a href="http://nginx.org/download/nginx-1.0.11.tar.gz" target="_blank">http://nginx.org/download/nginx-1.0.11.tar.gz</a><br />
wget <a href="http://www.imagemagick.org/download/ImageMagick-6.7.5-1.tar.gz" target="_blank">http://www.imagemagick.org/download/ImageMagick-6.7.5-1.tar.gz</a></div>
</div>
<div>wget <a href="http://pecl.php.net/get/imagick-2.3.0.tgz" target="_blank">http://pecl.php.net/get/imagick-2.3.0.tgz</a><br />
wget <a href="http://ftp.gnu.org/pub/gnu/libiconv/libiconv-1.13.1.tar.gz" target="_blank">http://ftp.gnu.org/pub/gnu/libiconv/libiconv-1.13.1.tar.gz</a><br />
wget <a href="http://pecl.php.net/get/memcache-2.2.5.tgz" target="_blank">http://pecl.php.net/get/memcache-2.2.5.tgz</a><br />
wget <a href="http://bart.eaccelerator.net/source/0.9.6.1/eaccelerator-0.9.6.1.tar.bz2" target="_blank">http://bart.eaccelerator.net/source/0.9.6.1/eaccelerator-0.9.6.1.tar.bz2</a><br />
wget <a href="http://cdnetworks-kr-1.dl.sourceforge.net/project/mcrypt/Libmcrypt/2.5.8/libmcrypt-2.5.8.tar.gz  " target="_blank">http://cdnetworks-kr-1.dl.sourceforge.net/project/mcrypt/Libmcrypt/2.5.8/libmcrypt-2.5.8.tar.gz</a></div>
<div>wget <a href="http://cdnetworks-kr-1.dl.sourceforge.net/project/mhash/mhash/0.9.9.9/mhash-0.9.9.9.tar.gz" target="_blank">http://cdnetworks-kr-1.dl.sourceforge.net/project/mhash/mhash/0.9.9.9/mhash-0.9.9.9.tar.gz</a></div>
<div>wget <a href="http://cdnetworks-kr-1.dl.sourceforge.net/project/pcre/pcre/8.21/pcre-8.21.tar.gz " target="_blank">http://cdnetworks-kr-1.dl.sourceforge.net/project/pcre/pcre/8.21/pcre-8.21.tar.gz </a></div>
</blockquote>
<div style="color: #444444; font-family: Verdana, Arial, Helvetica, sans-serif; line-height: 22px; background-color: #ffffff;">===================================</div>
<div style="color: #444444; font-family: Verdana, Arial, Helvetica, sans-serif; line-height: 22px; background-color: #ffffff;">
<p style="color: #000000; font-family: Georgia, 'Times New Roman', 'Bitstream Charter', Times, serif; line-height: 19px;"><strong>升级系统内核为3.2.4</strong></p>
<p style="color: #000000; font-family: Georgia, 'Times New Roman', 'Bitstream Charter', Times, serif; line-height: 19px;">考虑到最近linux内核频繁的出现漏洞,这里将linux内核升级到最新版本(Kernl 3.2.4).内核升级教程参考:<a href="http://blog.haohtml.com/archives/12448" target="_blank">http://blog.haohtml.com/archives/12448</a> 目前系统为Centos6.1(x86_64bit)版本.默认内核为</p>
<blockquote style="color: #000000; font-family: Georgia, 'Times New Roman', 'Bitstream Charter', Times, serif; line-height: 19px;"><p>[root@bogon ~]# uname -r<br />
2.6.32-131.0.15.el6.x86_64</p></blockquote>
<p style="color: #000000; font-family: Georgia, 'Times New Roman', 'Bitstream Charter', Times, serif; line-height: 19px;">升级后内核为</p>
<blockquote style="color: #000000; font-family: Georgia, 'Times New Roman', 'Bitstream Charter', Times, serif; line-height: 19px;"><p>[root@bogon ~]# uname -r<br />
3.2.4</p></blockquote>
<p>=================================</p>
</div>
<p><strong>一.安装Mysql数据库</strong></p>
<p>先安装libaio文件,否则在初始化mysql系统表的时候会提示以下错误</p>
<blockquote><p>Installing MySQL system tables...<br />
./bin/mysqld: error while loading shared libraries: libaio.so.1: cannot open shared object file: No such file or directory</p></blockquote>
<p>需要安装libaio库</p>
<blockquote><p>#yum install libaio</p></blockquote>
<p>以下为详细教程,也可以参考压缩包里的 INSTALL-BINARY 文件</p>
<blockquote><p>shell&gt; groupadd mysql<br />
shell&gt; useradd -r -g mysql mysql</p>
<p>shell&gt; cd ~/soft/<br />
shell&gt; tar zxvf mysql-5.5.20-linux2.6-x86_64.tar.gz<br />
shell&gt; mv mysql-5.5.20-linux2.6-x86_64 /usr/local/mysql<br />
shell&gt; cd /usr/local/mysql<br />
shell&gt; chown -R mysql .<br />
shell&gt; chgrp -R mysql .<br />
shell&gt; scripts/mysql_install_db --user=mysql<br />
shell&gt; chown -R root .<br />
shell&gt; chown -R mysql data</p>
<p># Next command is optional<br />
shell&gt; cp support-files/my-medium.cnf /etc/my.cnf<br />
shell&gt; bin/mysqld_safe --user=mysql &amp;</p>
<p># Next command is optional<br />
shell&gt; cp support-files/mysql.server /etc/init.d/mysql.server</p>
<p>#修改mysql密码<br />
shell&gt; ./bin/mysqladmin -u root password 'new-password'<br />
shell&gt; /usr/local/mysql/bin/mysql -u root -p</p></blockquote>
<p>&nbsp;</p>
<blockquote><p>=======<br />
注册系统服务<br />
shell&gt;  cp support-files/mysql.server /etc/init.d/mysqld</p>
<p>#把msql的脚本文件拷到系统的启动目录下</p>
<p>shell&gt;  cd /etc/init.d/<br />
shell&gt; chkconfig --add mysqld #将mysql加到启动服务列表里<br />
shell&gt; chkconfig mysqld on #让系统启动时自动打开mysql服务,如果指定级别,用--level参数</p></blockquote>
<div>这里为了以后维护的时候,不用输入完整的路径,做了软链接</div>
<div>
<blockquote><p>ln -s /usr/local/mysql/bin/mysqldump /usr/sbin/mysqldump<br />
ln -s /usr/local/mysql/bin/mysqld_safe /usr/sbin/mysqld_safe<br />
ln -s /usr/local/mysql/bin/mysqlslap /usr/sbin/mysqlslap<br />
ln -s /usr/local/mysql/bin/mysql /usr/sbin/mysql<br />
ln -s /usr/local/mysql/bin/mysqladmin /usr/sbin/mysqladmin</p></blockquote>
</div>
<div>
<p>&nbsp;</p>
<p>=======================================</p>
</div>
<p><strong>二.安装PHP</strong></p>
<p>首先安装iconv,否则安装php的时候会提示这个错误</p>
<blockquote>
<div> cd ~/soft/</div>
<div></div>
<div>tar zxvf libiconv-1.13.1.tar.gz</div>
<div>cd libiconv-1.13.1/</div>
<div>./configure --prefix=/usr/local</div>
<div>make</div>
<div>make install</div>
<div>cd ../</div>
<div>#########################################</div>
<div>tar zxvf libmcrypt-2.5.8.tar.gz<br />
cd libmcrypt-2.5.8/<br />
./configure<br />
make<br />
make install<br />
/sbin/ldconfig<br />
cd libltdl/<br />
./configure --enable-ltdl-install<br />
make<br />
make install<br />
cd ../../</div>
<div>#########################################</div>
<div>tar zxvf mhash-0.9.9.9.tar.gz<br />
cd mhash-0.9.9.9/<br />
./configure<br />
make<br />
make install</div>
<div>cd ../</div>
</blockquote>
<p>安装php</p>
<blockquote><p>tar zxvf php-5.3.10.tar.gz<br />
cd php-5.3.10<br />
./configure --prefix=/usr/local/php --with-config-file-path=/usr/local/php/etc --with-mysql=/usr/local/mysql --with-mysqli=/usr/local/mysql/bin/mysql_config --with-iconv-dir=/usr/local --with-freetype-dir --with-jpeg-dir --with-png-dir --with-zlib --with-libxml-dir=/usr --enable-xml --disable-rpath --enable-discard-path --enable-safe-mode --enable-bcmath --enable-shmop --enable-sysvsem --enable-inline-optimization --with-curl --with-curlwrappers --enable-mbregex --enable-fastcgi --enable-fpm --enable-force-cgi-redirect --enable-mbstring --with-mcrypt --with-gd --enable-gd-native-ttf --with-openssl --with-mhash --enable-pcntl --enable-sockets --with-ldap --with-ldap-sasl --with-xmlrpc --enable-zip --enable-soap --without-pear<br />
make ZEND_EXTRA_LIBS='-liconv'<br />
make install<br />
cp php.ini-production /usr/local/php/etc/php.ini<br />
cd ../</p></blockquote>
<p>在configure过程中如果出现以下错误:</p>
<blockquote><p><span style="color: #0000ff;">configure: error: Cannot find ldap libraries in /usr/lib.</span></p></blockquote>
<p><span style="color: #ff0000;">解决办法:</span></p>
<blockquote><p>cp -frp /usr/lib64/libldap* /usr/lib</p></blockquote>
<p>如果在make的过程中出现以下错误:</p>
<blockquote><p><span style="color: #0000ff;">/root/dev/php-5.3.6/sapi/cli/php: error while loading shared libraries:  libmysqlclient.so.18: cannot open shared object file: No such file or  directory</span><br />
<span style="color: #0000ff;">make: *** [ext/phar/phar.php] Error 127</span></p></blockquote>
<p><span style="color: #ff0000;">解决办法</span> <img src='http://blog.haohtml.com/wp-includes/images/smilies/icon_sad.gif' alt=':(' class='wp-smiley' /> <a href="http://blog.haohtml.com/archives/12479">http://blog.haohtml.com/archives/12479</a>)</p>
<blockquote><p>ln -s /usr/local/mysql/lib/libmysqlclient.so.18  /usr/lib64/</p></blockquote>
<p>如果用的是32位系统的话,则用</p>
<blockquote><p>ln -s /usr/local/mysql/lib/libmysqlclient.so.18  /usr/lib/</p></blockquote>
<p>如果在make install的时候还提示上面类似的错误,只需要重新从./configure开始再执行一下就可以了.</p>
<p><strong>三.安装php扩展</strong></p>
<blockquote><p>tar zxvf memcache-2.2.5.tgz<br />
cd memcache-2.2.5/<br />
/usr/local/php/bin/phpize<br />
./configure --with-php-config=/usr/local/php/bin/php-config<br />
make<br />
make install<br />
cd ../</p>
<p>########################################</p>
<p>tar jxvf eaccelerator-0.9.6.1.tar.bz2<br />
cd eaccelerator-0.9.6.1/<br />
/usr/local/php/bin/phpize<br />
./configure --enable-eaccelerator=shared --with-php-config=/usr/local/php/bin/php-config<br />
make<br />
make install<br />
cd ../</p>
<p>########################################</p>
<p>tar zxvf PDO_MYSQL-1.0.2.tgz<br />
cd PDO_MYSQL-1.0.2/<br />
/usr/local/php/bin/phpize<br />
./configure --with-php-config=/usr/local/php/bin/php-config --with-pdo-mysql=/usr/local/mysql<br />
make<br />
make install<br />
cd ../</p>
<p>########################################</p>
<p>tar zxvf ImageMagick-6.7.5-1.tar.gz<br />
cd ImageMagick-6.7.5-1/<br />
./configure<br />
make<br />
make install<br />
cd ../</p>
<p>########################################</p>
<p>tar zxvf imagick-2.3.0.tgz<br />
cd imagick-2.3.0/<br />
/usr/local/php/bin/phpize<br />
./configure --with-php-config=/usr/local/php/bin/php-config<br />
make<br />
make install<br />
cd ../</p></blockquote>
<p>===========================</p>
<p><span style="color: #ff0000;">修改php.ini文件,配置扩展</span><br />
手工修改：查找/usr/local/php/etc/php.ini中的<span style="color: #0000ff;">extension_dir = "./"</span></p>
<blockquote><p>#vi /usr/local/php/etc/php.ini</p></blockquote>
<p>修改为</p>
<blockquote><p>extension_dir = "/usr/local/php/lib/php/extensions/no-debug-non-zts-20090626"</p></blockquote>
<p>并在此行后增加以下几行，然后保存：</p>
<blockquote><p>extension = "memcache.so"<br />
extension = "pdo_mysql.so"<br />
extension = "imagick.so"</p></blockquote>
<p>1.再查找output_buffering = Off,修改为 <span style="color: #0000ff;">output_buffering = On</span>.<br />
2.为了安装起见，隐藏http头信息里的php信息,查找 expose_php = on 修改为 <span style="color: #0000ff;">expose_php = off</span><br />
3.再查找; cgi.fix_pathinfo=0，把前面的;注释符号删除，改为 <span style="color: #0000ff;">cgi.fix_pathinfo=0</span>，预防方法:防止Nginx文件类型错误解析漏洞。<br />
4.找到;date.timezone= 修改为<span style="color: #0000ff; background-color: #ffffff; font-family: Verdana, Arial, Helvetica, sans-serif; line-height: 22px;">date.timezone = PRC</span>,修正php中于真实时间相关8小时的问题.</p>
<p>配置eAccelerator加速PHP：</p>
<blockquote><p>#mkdir -p /usr/local/eaccelerator_cache<br />
#vi /usr/local/php/etc/php.ini</p></blockquote>
<p>按shift+g键跳到配置文件的最末尾，加上以下配置信息</p>
<blockquote><p>[eaccelerator]<br />
zend_extension="/usr/local/php/lib/php/extensions/no-debug-non-zts-20090626/eaccelerator.so"<br />
eaccelerator.shm_size="64"<br />
eaccelerator.cache_dir="/usr/local/eaccelerator_cache"<br />
eaccelerator.enable="1"<br />
eaccelerator.optimizer="1"<br />
eaccelerator.check_mtime="1"<br />
eaccelerator.debug="0"<br />
eaccelerator.filter=""<br />
eaccelerator.shm_max="0"<br />
eaccelerator.shm_ttl="3600"<br />
eaccelerator.shm_prune_period="3600"<br />
eaccelerator.shm_only="0"<br />
eaccelerator.compress="1"<br />
eaccelerator.compress_level="9"</p></blockquote>
<p>如果要安装ZendOptimizer的话，参考：<a href="http://blog.haohtml.com/archives/9180" target="_blank">http://blog.haohtml.com/archives/9180</a>.注意扩展路径最后的日期目录在php5.3中发生了变化.zendOptimizer 3.3.9可能不支持php5.3</p>
<p><span style="color: #ff0000;">配置php-fpm</span></p>
<p>//创建www用户,php-fpm和nginx统一使用这个</p>
<blockquote><p>groupadd www<br />
useradd -g www www</p>
<p>cp /usr/local/php/etc/php-fpm.conf.default /usr/local/php/etc/php-fpm.conf</p>
<p>vi /usr/local/php/etc/php-fpm.conf</p>
<p>修改以下两行,并将服务用户名和用户所在组(nobody),修改为www<br />
user = www<br />
group = www</p></blockquote>
<p>启用php-fpm</p>
<blockquote><p>/usr/local/php/sbin/php-fpm</p></blockquote>
<p>停止的话,用</p>
<blockquote><p>killall php-fpm</p></blockquote>
<p><strong>四 安装NGINX</strong></p>
<blockquote><p>#安装正则表达式库,支持rewite<br />
tar zxvf pcre-8.21.tar.gz<br />
cd pcre-8.21/<br />
./configure<br />
make &amp;&amp; make install<br />
cd ../</p>
<p>tar zxvf nginx-1.0.11.tar.gz<br />
cd nginx-1.0.11/<br />
./configure --user=www --group=www --prefix=/usr/local/nginx --with-http_stub_status_module --with-http_ssl_module<br />
make &amp;&amp; make install<br />
cd ../</p>
<p>vi /usr/local/nginx/conf/nginx.conf</p></blockquote>
<p>修改 /usr/local/nginx/conf/nginx.conf,删除user nobody;行前面的注释,并修改为<span style="color: #0000ff;"> user www www</span>;<br />
将以下几行前面的注释删除,将修改fastcgi_param后面的路径</p>
<blockquote><p>location ~ \.php$ {<br />
root html;<br />
fastcgi_pass 127.0.0.1:9000;<br />
fastcgi_index index.php;<br />
fastcgi_param SCRIPT_FILENAME /usr/local/nginx/html$fastcgi_script_name;<br />
include fastcgi_params;<br />
}</p></blockquote>
<p>测试nginx.conf配置文件</p>
<blockquote><p>/usr/local/nginx/sbin/nginx -t</p></blockquote>
<p>启用nginx</p>
<blockquote><p>/usr/local/nginx/sbin/nginx</p></blockquote>
<p>重新加载配置文件</p>
<blockquote><p>/usr/local/nginx/sbin/nginx -s reload</p></blockquote>
<p><strong>五.全局配置</strong></p>
<blockquote>
<div id="_mcePaste">vi /etc/rc.local</div>
</blockquote>
<div id="_mcePaste">按shift+g快捷键,在末尾增加以下内容：</div>
<blockquote>
<div id="_mcePaste">ulimit -SHn 65535</div>
<div id="_mcePaste">/usr/local/php/sbin/php-fpm</div>
<div id="_mcePaste">/usr/local/nginx/sbin/nginx</div>
</blockquote>
<div id="_mcePaste">测试是否支持php</div>
<blockquote>
<div>vi /usr/local/nginx/html/phpinfo.php</div>
</blockquote>
<div>输入内容 &lt;?php phpinfo(); ?&gt;</div>
<div><strong>浏览http://ip地址/phpinfo.php,可以看到php的相关信息,可以查看扩展是否支持.</strong></div>
<div>以上使用的是nginx的默认配置,为了充分发挥nginx的性能,实际生产过程中,我们还需要对nginx进行一些配置优化,请参考:<a href="http://blog.haohtml.com/index.php/archives/6213" target="_blank">Nginx优化配置(转)</a></div>
<div>参考文章:<a href="http://blog.haohtml.com/archives/6051">http://blog.haohtml.com/archives/6051</a></div>
<div></div>
<div>
<div style="color: #444444; font-family: Verdana, Arial, Helvetica, sans-serif; line-height: 22px; background-color: #ffffff;">
<p style="margin-top: 11px; margin-right: 0px; margin-bottom: 11px; margin-left: 0px;"><span style="color: #0000ff;"><strong>使用技巧:</strong></span></p>
</div>
<div id="_mcePaste" style="color: #444444; font-family: Verdana, Arial, Helvetica, sans-serif; line-height: 22px; background-color: #ffffff;">在不停止Nginx服务的情况下平滑变更Nginx配置</div>
<div id="_mcePaste" style="color: #444444; font-family: Verdana, Arial, Helvetica, sans-serif; line-height: 22px; background-color: #ffffff;">1、修改/usr/local/nginx/conf/nginx.conf配置文件后，请执行以下命令检查配置文件是否正确：</div>
<blockquote style="padding-top: 1px; padding-right: 10px; padding-bottom: 1px; padding-left: 10px; margin-top: 10px; margin-right: 0px; margin-bottom: 10px; margin-left: 10px; background-color: #ffffff; color: #444444; font-family: Verdana, Arial, Helvetica, sans-serif; line-height: 22px;">
<div id="_mcePaste">/usr/local/nginx/sbin/nginx -t</div>
</blockquote>
<div id="_mcePaste" style="color: #444444; font-family: Verdana, Arial, Helvetica, sans-serif; line-height: 22px; background-color: #ffffff;">如果屏幕显示以下两行信息，说明配置文件正确：</div>
<blockquote style="padding-top: 1px; padding-right: 10px; padding-bottom: 1px; padding-left: 10px; margin-top: 10px; margin-right: 0px; margin-bottom: 10px; margin-left: 10px; background-color: #ffffff; color: #444444; font-family: Verdana, Arial, Helvetica, sans-serif; line-height: 22px;">
<div id="_mcePaste">the configuration file /usr/local/nginx/conf/nginx.conf syntax is ok</div>
<div id="_mcePaste">the configuration file /usr/local/nginx/conf/nginx.conf was tested successfully</div>
</blockquote>
<div id="_mcePaste" style="color: #444444; font-family: Verdana, Arial, Helvetica, sans-serif; line-height: 22px; background-color: #ffffff;">2、平滑重启：</div>
<div id="_mcePaste" style="color: #444444; font-family: Verdana, Arial, Helvetica, sans-serif; line-height: 22px; background-color: #ffffff;">①、对于Nginx 0.8.x版本，现在平滑重启Nginx配置非常简单，执行以下命令即可：</div>
<blockquote style="padding-top: 1px; padding-right: 10px; padding-bottom: 1px; padding-left: 10px; margin-top: 10px; margin-right: 0px; margin-bottom: 10px; margin-left: 10px; background-color: #ffffff; color: #444444; font-family: Verdana, Arial, Helvetica, sans-serif; line-height: 22px;">
<div id="_mcePaste">/usr/local/nginx/sbin/nginx -s reload</div>
</blockquote>
<div id="_mcePaste" style="color: #444444; font-family: Verdana, Arial, Helvetica, sans-serif; line-height: 22px; background-color: #ffffff;">②、对于Nginx 0.8.x之前的版本，平滑重启稍微麻烦一些，按照以下步骤进行即可。输入以下命令查看Nginx主进程号：</div>
<blockquote style="padding-top: 1px; padding-right: 10px; padding-bottom: 1px; padding-left: 10px; margin-top: 10px; margin-right: 0px; margin-bottom: 10px; margin-left: 10px; background-color: #ffffff; color: #444444; font-family: Verdana, Arial, Helvetica, sans-serif; line-height: 22px;">
<div id="_mcePaste">ps -ef | grep "nginx: master process" | grep -v "grep" | awk -F ' ' '{print $2}'</div>
</blockquote>
<div id="_mcePaste" style="color: #444444; font-family: Verdana, Arial, Helvetica, sans-serif; line-height: 22px; background-color: #ffffff;">屏幕显示的即为Nginx主进程号，例如：</div>
<div id="_mcePaste" style="color: #444444; font-family: Verdana, Arial, Helvetica, sans-serif; line-height: 22px; background-color: #ffffff;">6302</div>
<div id="_mcePaste" style="color: #444444; font-family: Verdana, Arial, Helvetica, sans-serif; line-height: 22px; background-color: #ffffff;">这时，执行以下命令即可使修改过的Nginx配置文件生效：</div>
<blockquote style="padding-top: 1px; padding-right: 10px; padding-bottom: 1px; padding-left: 10px; margin-top: 10px; margin-right: 0px; margin-bottom: 10px; margin-left: 10px; background-color: #ffffff; color: #444444; font-family: Verdana, Arial, Helvetica, sans-serif; line-height: 22px;">
<div id="_mcePaste">kill -HUP 6302</div>
</blockquote>
<div id="_mcePaste" style="color: #444444; font-family: Verdana, Arial, Helvetica, sans-serif; line-height: 22px; background-color: #ffffff;">或者无需这么麻烦，找到Nginx的Pid文件：</div>
<blockquote style="padding-top: 1px; padding-right: 10px; padding-bottom: 1px; padding-left: 10px; margin-top: 10px; margin-right: 0px; margin-bottom: 10px; margin-left: 10px; background-color: #ffffff; color: #444444; font-family: Verdana, Arial, Helvetica, sans-serif; line-height: 22px;">
<div id="_mcePaste">kill -HUP `cat /usr/local/nginx/nginx.pid`</div>
</blockquote>
<div id="_mcePaste" style="color: #444444; font-family: Verdana, Arial, Helvetica, sans-serif; line-height: 22px; background-color: #ffffff;"><span style="font-family: 微软雅黑, Tahoma, Verdana, Helvetica, Arial, sans-serif; font-size: 14px; border-collapse: collapse; color: #220000;">检查<a style="color: #760027; text-decoration: none; outline-style: none; outline-width: initial; outline-color: initial; word-wrap: break-word; line-height: normal;" href="ftp://ftp.imagemagick.org/pub/ImageMagick/ImageMagick.tar.gz" target="_blank">ImageMagick</a>安装是否成功,也可以用以下命令查看</span></div>
<blockquote style="padding-top: 1px; padding-right: 10px; padding-bottom: 1px; padding-left: 10px; margin-top: 10px; margin-right: 0px; margin-bottom: 10px; margin-left: 10px; background-color: #ffffff; color: #444444; font-family: Verdana, Arial, Helvetica, sans-serif; line-height: 22px;">
<div><span style="font-family: 微软雅黑, Tahoma, Verdana, Helvetica, Arial, sans-serif; font-size: 14px; border-collapse: collapse; color: #220000;">con<span class="t_tag" style="word-wrap: break-word; line-height: normal; cursor: pointer; border-bottom-width: 1px; border-bottom-style: solid; border-bottom-color: #ff0000; white-space: nowrap;">ver</span>t -version</span></div>
</blockquote>
<div style="color: #444444; font-family: Verdana, Arial, Helvetica, sans-serif; line-height: 22px; background-color: #ffffff;">php里的时间有相关八小时的问题，解决办法为修改/usr/local/php/etc/php.ini里的date.timezone：</div>
<blockquote style="padding-top: 1px; padding-right: 10px; padding-bottom: 1px; padding-left: 10px; margin-top: 10px; margin-right: 0px; margin-bottom: 10px; margin-left: 10px; background-color: #ffffff; color: #444444; font-family: Verdana, Arial, Helvetica, sans-serif; line-height: 22px;">
<div><span style="color: #0000ff;">date.timezone = PRC</span></div>
</blockquote>
<div style="color: #444444; font-family: Verdana, Arial, Helvetica, sans-serif; line-height: 22px; background-color: #ffffff;">到此为止．基本上web环境已经配置完成了．为了方便用户可以通过ftp软件上传程序文件，下面我们接着安装vsftpdl软件<a style="color: #be4b29; text-decoration: none; outline-style: none; outline-width: initial; outline-color: initial;" href="http://blog.haohtml.com/archives/9084" target="_blank">CentOS下安装 vsftpd 虚拟用户设置教程</a></div>
<div style="color: #444444; font-family: Verdana, Arial, Helvetica, sans-serif; line-height: 22px; background-color: #ffffff;">======================================</div>
<div style="color: #444444; font-family: Verdana, Arial, Helvetica, sans-serif; line-height: 22px; background-color: #ffffff;"><strong>相关文章：</strong></div>
<ul style="list-style-type: square; list-style-position: initial; list-style-image: url('http://blog.haohtml.com/wp-content/themes/artemis/images/dot.gif'); color: #444444; font-family: Verdana, Arial, Helvetica, sans-serif; line-height: 22px; background-color: #ffffff;">
<li><a style="color: #be4b29; text-decoration: none; outline-style: none; outline-width: initial; outline-color: initial;" href="http://blog.haohtml.com/index.php/archives/6213" target="_blank">Nginx优化配置(转)</a></li>
<li><span style="color: #ff0000;"><a style="color: #be4b29; text-decoration: none; outline-style: none; outline-width: initial; outline-color: initial;" href="http://blog.haohtml.com/archives/5941" target="_blank"><span style="color: #ff0000;">nginx配置支持php的pathinfo模式配置方法</span></a></span></li>
<li><a style="color: #be4b29; text-decoration: none; outline-style: none; outline-width: initial; outline-color: initial;" href="http://blog.haohtml.com/index.php/archives/6144" target="_blank">网站压力测试工具webbench简介、安装、使用</a></li>
<li><a style="color: #be4b29; text-decoration: none; outline-style: none; outline-width: initial; outline-color: initial;" href="http://blog.haohtml.com/archives/9084" target="_blank">[教程]CentOS下安装 vsftpd 虚拟用户设置教程</a></li>
<li><a style="color: #be4b29; text-decoration: none; outline-style: none; outline-width: initial; outline-color: initial;" href="http://blog.haohtml.com/index.php/archives/6128" target="_blank">Linux下 XCache 编译安装方法</a></li>
<li><a style="color: #be4b29; text-decoration: none; outline-style: none; outline-width: initial; outline-color: initial;" href="http://blog.haohtml.com/index.php/archives/6118" target="_blank">linux下用phpize给PHP动态添加扩展</a></li>
<li><a style="color: #be4b29; text-decoration: none; outline-style: none; outline-width: initial; outline-color: initial;" href="http://blog.haohtml.com/index.php/archives/5793" target="_blank">ImageMagick及PHP的imagick扩展的安装及配置</a></li>
<li><a style="color: #be4b29; text-decoration: none; outline-style: none; outline-width: initial; outline-color: initial;" href="http://blog.haohtml.com/index.php/archives/5813" target="_blank">在CentOS 5.5上安装MongoDB</a></li>
<li><a style="color: #be4b29; text-decoration: none; outline-style: none; outline-width: initial; outline-color: initial;" href="http://blog.haohtml.com/archives/395" target="_blank">安装Memcached</a></li>
<li><a style="color: #be4b29; text-decoration: none; outline-style: none; outline-width: initial; outline-color: initial;" href="http://blog.haohtml.com/index.php/archives/5688" target="_blank">centos下安装php-json</a></li>
<li><a style="color: #be4b29; text-decoration: none; outline-style: none; outline-width: initial; outline-color: initial;" href="http://blog.haohtml.com/index.php/archives/5941" target="_blank">nginx配置支持php的pathinfo模式配置方法</a></li>
<li><a style="color: #be4b29; text-decoration: none; outline-style: none; outline-width: initial; outline-color: initial;" href="http://blog.haohtml.com/index.php/archives/5937" target="_blank">nginx 目录自动加斜线 “/” 真正最佳</a></li>
<li><a style="color: #be4b29; text-decoration: none; outline-style: none; outline-width: initial; outline-color: initial;" href="http://blog.haohtml.com/index.php/archives/6024" target="_blank">CentOS配置SSH证书登录验证</a></li>
<li><a style="color: #be4b29; text-decoration: none; outline-style: none; outline-width: initial; outline-color: initial;" href="http://blog.haohtml.com/index.php/archives/5628" target="_blank">nginx 虚拟目录的配置</a></li>
<li><a style="color: #be4b29; text-decoration: none; outline-style: none; outline-width: initial; outline-color: initial;" href="http://blog.haohtml.com/index.php/archives/5631" target="_blank">nginx rewrite规则和参考</a></li>
<li><a style="color: #be4b29; text-decoration: none; outline-style: none; outline-width: initial; outline-color: initial;" href="http://blog.haohtml.com/archives/6203" target="_blank">Nginx虚拟主机配置</a></li>
<li><a style="color: #be4b29; text-decoration: none; outline-style: none; outline-width: initial; outline-color: initial;" href="http://blog.haohtml.com/archives/6899" target="_blank">nginx虚拟主机防webshell跨目录</a></li>
<li><a style="color: #be4b29; text-decoration: none; outline-style: none; outline-width: initial; outline-color: initial;" href="http://blog.haohtml.com/archives/9256" target="_blank">管理员必看:20个Nginx Web服务器最佳安全实践</a></li>
<li><a style="color: #be4b29; text-decoration: none; outline-style: none; outline-width: initial; outline-color: initial;" href="http://blog.haohtml.com/archives/11025" target="_blank">Ｎginx无缝版本升级</a></li>
</ul>
<p style="margin-top: 11px; margin-right: 0px; margin-bottom: 11px; margin-left: 0px; color: #444444; font-family: Verdana, Arial, Helvetica, sans-serif; line-height: 22px; background-color: #ffffff;"><span style="color: #ff6600;"><strong>注意:</strong></span></p>
</div>
<table class="wumii-related-items" cellspacing="0" cellpadding="3" border="0"  style="clear: both;">
    
    <tr>
        <td colspan="4"><b><font size="-1"  style="display: block !important; padding: 20px 0 5px !important;">您可能也喜欢：</font></b></td>
    </tr>
    
        <tr>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important;">
                    <a target="_blank" title="Centos64位系统下&quot;configure: error: libjpeg.(a|so) not found&quot;的解决办法" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fblog.haohtml.com%2Farchives%2F12272&from=http%3A%2F%2Fblog.haohtml.com%2Farchives%2F12473">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/images/blogWidget/wordpress_default.gif" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">Centos64位系统下&quot;configure: error: libjpeg.(a|so) not found&quot;的解决办法</font>
                    </a>
                </td>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;">
                    <a target="_blank" title="CentOS下安装lnmp(Nginx+PHP+MySQL)fpm" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fblog.haohtml.com%2Farchives%2F5732&from=http%3A%2F%2Fblog.haohtml.com%2Farchives%2F12473">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/images/blogWidget/wordpress_default.gif" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">CentOS下安装lnmp(Nginx+PHP+MySQL)fpm</font>
                    </a>
                </td>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;">
                    <a target="_blank" title="CentOS操作系统安装教程" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fblog.haohtml.com%2Farchives%2F4859&from=http%3A%2F%2Fblog.haohtml.com%2Farchives%2F12473">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/site_images/2011/03/26/4302696.jpg" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">CentOS操作系统安装教程</font>
                    </a>
                </td>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;">
                    <a target="_blank" title="CentOS上DirectAdmin安装教程" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fblog.haohtml.com%2Farchives%2F6822&from=http%3A%2F%2Fblog.haohtml.com%2Farchives%2F12473">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/site_images/2011/03/22/4023274.gif" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">CentOS上DirectAdmin安装教程</font>
                    </a>
                </td>
        </tr>
    
    <tr>
        <td colspan="4" align="right">
            <a style="text-decoration: none !important;" href="http://www.wumii.com/widget/relatedItems.htm" target="_blank" title="无觅相关文章插件">
                <font size="-1" color="#bbbbbb" style="display: block !important; font-family: arial !important; padding: 5px 0 !important; font-size: 12px !important; color: #bbb !important;">无觅</font>
            </a>
        </td>
    </tr>
</table>]]></content:encoded>
			<wfw:commentRss>http://blog.haohtml.com/archives/12473/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>centos升级内核教程</title>
		<link>http://blog.haohtml.com/archives/12448</link>
		<comments>http://blog.haohtml.com/archives/12448#comments</comments>
		<pubDate>Sun, 29 Jan 2012 09:26:09 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[服务器类]]></category>
		<category><![CDATA[centos]]></category>
		<category><![CDATA[内核]]></category>

		<guid isPermaLink="false">http://blog.haohtml.com/?p=12448</guid>
		<description><![CDATA[当前系统为CentOS Linux release 6.0 (Final),内核版本为2.6.32-71.el6.i686.由于最近内核出现最新的漏洞(linux kernel 又爆内存提权漏洞，&#62;=2.6.39 内核无一幸免 http://blog.zx2c4.com/749 和http://www.haohtml.com/news/netsafe/47456.html),所以将内核升级至3.2.2最新版本. 1.查看当前系统内核 [root@bogon linux-3.2.2]# uname -r 2.6.32-71.el6.i686 2.下载linux-3.2.2内核包 cd ~ wget -c http://www.kernel.org/pub/linux/kernel/v3.0/linux-3.2.2.tar.bz2 tar jxvf  linux-3.2.2.tar.bz2 cd linux-3.2.2 3.配置内核并安装 make mrproper #清除环境变量，即清除配置文件 make menuconfig #在菜单模式下选择需要编译的内核模块 找到以下选项并选中 networking support—&#62;networking options—&#62;network packet filtering framework(netfilter) (1).core netfilter configuration A 勾中”Netfilter connection tracking support” -m state相关模块是依赖它的，不选则没有。 B 将netbios name service protocal support(new) 编译成模块,不然后面升级iptables后启动时会出错 [...]<table class="wumii-related-items" cellspacing="0" cellpadding="3" border="0"  style="clear: both;">
    
    <tr>
        <td colspan="4"><b><font size="-1"  style="display: block !important; padding: 20px 0 5px !important;">您可能也喜欢：</font></b></td>
    </tr>
    
        <tr>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important;">
                    <a target="_blank" title="RHEL6/CentOS6下root用户密码破解" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fblog.haohtml.com%2Farchives%2F11323&from=http%3A%2F%2Fblog.haohtml.com%2Farchives%2F12448">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/site_images/2011/09/07/28841015.png" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">RHEL6/CentOS6下root用户密码破解</font>
                    </a>
                </td>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;">
                    <a target="_blank" title="centos下安装新硬盘" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fblog.haohtml.com%2Farchives%2F10309&from=http%3A%2F%2Fblog.haohtml.com%2Farchives%2F12448">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/site_images/2011/07/08/16671132.bmp" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">centos下安装新硬盘</font>
                    </a>
                </td>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;">
                    <a target="_blank" title="CentOS升级内核及KVM安装" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fblog.haohtml.com%2Farchives%2F6355&from=http%3A%2F%2Fblog.haohtml.com%2Farchives%2F12448">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/images/blogWidget/wordpress_default.gif" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">CentOS升级内核及KVM安装</font>
                    </a>
                </td>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;">
                    <a target="_blank" title="CentOS上DirectAdmin安装教程" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fblog.haohtml.com%2Farchives%2F6822&from=http%3A%2F%2Fblog.haohtml.com%2Farchives%2F12448">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/site_images/2011/03/22/4023274.gif" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">CentOS上DirectAdmin安装教程</font>
                    </a>
                </td>
        </tr>
    
    <tr>
        <td colspan="4" align="right">
            <a style="text-decoration: none !important;" href="http://www.wumii.com/widget/relatedItems.htm" target="_blank" title="无觅相关文章插件">
                <font size="-1" color="#bbbbbb" style="display: block !important; font-family: arial !important; padding: 5px 0 !important; font-size: 12px !important; color: #bbb !important;">无觅</font>
            </a>
        </td>
    </tr>
</table>]]></description>
			<content:encoded><![CDATA[<p>当前系统为CentOS Linux release 6.0 (Final),内核版本为2.6.32-71.el6.i686.由于最近内核出现最新的漏洞(<a id="thread_subject" href="http://bbs.chinaunix.net/thread-3666212-1-1.html">linux kernel 又爆内存提权漏洞，&gt;=2.6.39 内核无一幸免</a> <a href="http://blog.zx2c4.com/749">http://blog.zx2c4.com/749</a> 和<a href="http://www.haohtml.com/news/netsafe/47456.html">http://www.haohtml.com/news/netsafe/47456.html</a>),所以将内核升级至3.2.2最新版本.</p>
<p><strong>1.查看当前系统内核</strong></p>
<pre class="brush:[shell]">[root@bogon linux-3.2.2]# uname -r
2.6.32-71.el6.i686</pre>
<p><strong>2.下载linux-3.2.2内核包</strong></p>
<pre class="brush:[shell]">cd ~
wget -c http://www.kernel.org/pub/linux/kernel/v3.0/linux-3.2.2.tar.bz2
tar jxvf  linux-3.2.2.tar.bz2
cd linux-3.2.2</pre>
<p><strong>3.配置内核并安装</strong></p>
<pre class="brush:[shell]">make mrproper #清除环境变量，即清除配置文件
make menuconfig #在菜单模式下选择需要编译的内核模块</pre>
<p><span id="more-12448"></span></p>
<pre>找到以下选项并选中</pre>
<p>networking support—&gt;networking options—&gt;network packet filtering framework(netfilter)</p>
<p><span style="color: #0000ff;">(1).core netfilter configuration</span></p>
<p>A 勾中”Netfilter connection tracking support” -m state相关模块是依赖它的，不选则没有。</p>
<p>B 将netbios name service protocal support(new) 编译成模块,不然后面升级iptables后启动时会出错</p>
<p>C 勾中“Netfilter Xtables support (required for ip_tables)”</p>
<p><span style="color: #0000ff;">(2).IP: Netfilter Configuration</span></p>
<p>A 将 “IPv4 connection tracking support (require for NAT)” 编译成模块。</p>
<p>B 勾中IP tables support (required for filtering/masq/NAT) 。</p>
<p>C 将 “Full NAT” 下的 “MASQUERADE target support” 和 “REDIRECT target support” 编译成模块</p>
<p><span style="color: #0000ff;">(3).其它模块可以根据自己的需要进行选择,若不懂可以参考内核配置手册.</span></p>
<p>&nbsp;</p>
<pre class="brush:[shell]">make clean #确保所有东西均保持最新状态.
make bzImage #生成内核文件
make modules #编译模块
make modules_install #安装模块
make install #安装</pre>
<p>在安装3.2.4版本的内核的时候,会出现"ERROR: modinfo: could not find module ip_tables"这个错误.暂时没有解决!</p>
<p><strong>4.编辑/etc/grub.conf文件,将default=1改为default=0</strong></p>
<table width="95%" border="0" cellspacing="0" cellpadding="6" align="center">
<tbody>
<tr>
<td bgcolor="#fdfddf">[root@bogon linux-3.2.2]# cat /etc/grub.conf<br />
# grub.conf generated by anaconda<br />
#<br />
# Note that you do not have to rerun grub after making changes to this file<br />
# NOTICE: You have a /boot partition. This means that<br />
# all kernel and initrd paths are relative to /boot/, eg.<br />
# root (hd0,0)<br />
# kernel /vmlinuz-version ro root=/dev/mapper/VolGroup-lv_root<br />
# initrd /initrd-[generic-]version.img<br />
#boot=/dev/sda<br />
<span style="color: #0000ff;"><strong>default=0</strong></span><br />
timeout=5<br />
splashimage=(hd0,0)/grub/splash.xpm.gz<br />
hiddenmenu<br />
title CentOS Linux (3.2.2)<br />
root (hd0,0)<br />
kernel /vmlinuz-3.2.2 ro root=/dev/mapper/VolGroup-lv_root rd_LVM_LV=VolGroup/lv_root rd_LVM_LV=VolGroup/lv_swap rd_NO_LUKS rd_NO_MD rd_NO_DM LANG=en_US.UTF-8 SYSFONT=latarcyrheb-sun16 KEYBOARDTYPE=pc KEYTABLE=us crashkernel=auto rhgb quiet<br />
initrd /initramfs-3.2.2.img<br />
title centos (2.6.32-71.el6.i686)<br />
root (hd0,0)<br />
kernel /vmlinuz-2.6.32-71.el6.i686 ro root=/dev/mapper/VolGroup-lv_root rd_LVM_LV=VolGroup/lv_root rd_LVM_LV=VolGroup/lv_swap rd_NO_LUKS rd_NO_MD rd_NO_DM LANG=en_US.UTF-8 SYSFONT=latarcyrheb-sun16 KEYBOARDTYPE=pc KEYTABLE=us crashkernel=auto rhgb quiet<br />
initrd /initramfs-2.6.32-71.el6.i686.img</td>
</tr>
</tbody>
</table>
<p>5.重启系统,并查看内核</p>
<pre class="brush:[shell]">#reboot

[root@bogon ~]# uname -r
3.2.2</pre>
<table class="wumii-related-items" cellspacing="0" cellpadding="3" border="0"  style="clear: both;">
    
    <tr>
        <td colspan="4"><b><font size="-1"  style="display: block !important; padding: 20px 0 5px !important;">您可能也喜欢：</font></b></td>
    </tr>
    
        <tr>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important;">
                    <a target="_blank" title="RHEL6/CentOS6下root用户密码破解" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fblog.haohtml.com%2Farchives%2F11323&from=http%3A%2F%2Fblog.haohtml.com%2Farchives%2F12448">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/site_images/2011/09/07/28841015.png" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">RHEL6/CentOS6下root用户密码破解</font>
                    </a>
                </td>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;">
                    <a target="_blank" title="centos下安装新硬盘" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fblog.haohtml.com%2Farchives%2F10309&from=http%3A%2F%2Fblog.haohtml.com%2Farchives%2F12448">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/site_images/2011/07/08/16671132.bmp" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">centos下安装新硬盘</font>
                    </a>
                </td>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;">
                    <a target="_blank" title="CentOS升级内核及KVM安装" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fblog.haohtml.com%2Farchives%2F6355&from=http%3A%2F%2Fblog.haohtml.com%2Farchives%2F12448">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/images/blogWidget/wordpress_default.gif" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">CentOS升级内核及KVM安装</font>
                    </a>
                </td>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;">
                    <a target="_blank" title="CentOS上DirectAdmin安装教程" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fblog.haohtml.com%2Farchives%2F6822&from=http%3A%2F%2Fblog.haohtml.com%2Farchives%2F12448">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/site_images/2011/03/22/4023274.gif" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">CentOS上DirectAdmin安装教程</font>
                    </a>
                </td>
        </tr>
    
    <tr>
        <td colspan="4" align="right">
            <a style="text-decoration: none !important;" href="http://www.wumii.com/widget/relatedItems.htm" target="_blank" title="无觅相关文章插件">
                <font size="-1" color="#bbbbbb" style="display: block !important; font-family: arial !important; padding: 5px 0 !important; font-size: 12px !important; color: #bbb !important;">无觅</font>
            </a>
        </td>
    </tr>
</table>]]></content:encoded>
			<wfw:commentRss>http://blog.haohtml.com/archives/12448/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Linux中各种文件系统基本特性ext2,ext3,ext4</title>
		<link>http://blog.haohtml.com/archives/12443</link>
		<comments>http://blog.haohtml.com/archives/12443#comments</comments>
		<pubDate>Sun, 29 Jan 2012 05:40:03 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[服务器类]]></category>
		<category><![CDATA[ext2]]></category>
		<category><![CDATA[ext3]]></category>
		<category><![CDATA[JFS]]></category>
		<category><![CDATA[lvm]]></category>
		<category><![CDATA[ReiserFS]]></category>

		<guid isPermaLink="false">http://blog.haohtml.com/?p=12443</guid>
		<description><![CDATA[各种文件系统基本特性 Ext2Ext2 文件系统是Linux 特有的文件系统，它拥有传统UNIX 文件系统的许多特性，如块、inode 和目录等概念。Ext2 非常健壮，具有很多优良的性能。同时，Ext2 也是可扩展的，它提供 的扩展功能允许用户在不格式化文件系统的情况下使用新的特性。 ---------------------------------------------------- 最大文件大小： 1TB 最大文件极限： 仅受文件系统大小限制 最大分区/文件系统大小： 4TB 最大文件名长度： 255 字符 缺省最小/最大块大小： 1024/4096 字节 缺省inode 分配： 每4096 字节为1 在强制FS 检查前的最大装载： 20（可配置） ---------------------------------------------------- Ext3 Ext3 文件系统构筑于ext2 文件系统之上，对标准的Linux ext2 文件系统进行了日志扩展。 日志特性显著地减少文件系统崩溃后的恢复时间，它被广泛地应用于带有共享磁盘的HA 站 点。 ---------------------------------------------------- 最大文件大小： 1TB 最大文件极限： 仅受文件系统大小限制 最大分区/文件系统大小： 4TB 最大文件名长度： 255 字符 缺省最小/最大块大小： 1024/4096 字节 缺省inode 分配： 每4096 [...]<table class="wumii-related-items" cellspacing="0" cellpadding="3" border="0"  style="clear: both;">
    
    <tr>
        <td colspan="4"><b><font size="-1"  style="display: block !important; padding: 20px 0 5px !important;">您可能也喜欢：</font></b></td>
    </tr>
    
        <tr>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important;">
                    <a target="_blank" title="Linux实现从Ext2到Ext3文件系统的转换" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fblog.haohtml.com%2Farchives%2F6021&from=http%3A%2F%2Fblog.haohtml.com%2Farchives%2F12443">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/images/blogWidget/wordpress_default.gif" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">Linux实现从Ext2到Ext3文件系统的转换</font>
                    </a>
                </td>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;">
                    <a target="_blank" title="在安装php的make时候,出现错误&quot;chmod: cannot access `ext/phar/phar.phar': No such file or directory&quot;的解决办法" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fblog.haohtml.com%2Farchives%2F12482&from=http%3A%2F%2Fblog.haohtml.com%2Farchives%2F12443">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/images/blogWidget/wordpress_default.gif" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">在安装php的make时候,出现错误&quot;chmod: cannot access `ext/phar/phar.phar': No such file or directory&quot;的解决办法</font>
                    </a>
                </td>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;">
                    <a target="_blank" title="LVM基本介绍与常用命令" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fblog.haohtml.com%2Farchives%2F11957&from=http%3A%2F%2Fblog.haohtml.com%2Farchives%2F12443">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/images/blogWidget/wordpress_default.gif" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">LVM基本介绍与常用命令</font>
                    </a>
                </td>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;">
                    <a target="_blank" title="linux下 lvm 磁盘扩容" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fblog.haohtml.com%2Farchives%2F10328&from=http%3A%2F%2Fblog.haohtml.com%2Farchives%2F12443">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/site_images/2011/07/08/16674778.gif" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">linux下 lvm 磁盘扩容</font>
                    </a>
                </td>
        </tr>
    
    <tr>
        <td colspan="4" align="right">
            <a style="text-decoration: none !important;" href="http://www.wumii.com/widget/relatedItems.htm" target="_blank" title="无觅相关文章插件">
                <font size="-1" color="#bbbbbb" style="display: block !important; font-family: arial !important; padding: 5px 0 !important; font-size: 12px !important; color: #bbb !important;">无觅</font>
            </a>
        </td>
    </tr>
</table>]]></description>
			<content:encoded><![CDATA[<div><strong>各种文件系统基本特性</strong></div>
<div><span style="color: blue;"><strong>Ext2</strong></span>Ext2 文件系统是Linux 特有的文件系统，它拥有传统UNIX 文件系统的许多特性，如块、inode<br />
和目录等概念。Ext2 非常健壮，具有很多优良的性能。同时，Ext2 也是可扩展的，它提供<br />
的扩展功能允许用户在不格式化文件系统的情况下使用新的特性。<br />
----------------------------------------------------<br />
最大文件大小： 1TB<br />
最大文件极限： 仅受文件系统大小限制<br />
最大分区/文件系统大小： 4TB<br />
最大文件名长度： 255 字符<br />
缺省最小/最大块大小： 1024/4096 字节<br />
缺省inode 分配： 每4096 字节为1<br />
在强制FS 检查前的最大装载： 20（可配置）<br />
----------------------------------------------------<span id="more-12443"></span></p>
<p><span style="color: blue;"><strong>Ext3</strong></span></p>
<p>Ext3 文件系统构筑于ext2 文件系统之上，对标准的Linux ext2 文件系统进行了日志扩展。<br />
日志特性显著地减少文件系统崩溃后的恢复时间，它被广泛地应用于带有共享磁盘的HA 站<br />
点。<br />
----------------------------------------------------<br />
最大文件大小： 1TB<br />
最大文件极限： 仅受文件系统大小限制<br />
最大分区/文件系统大小： 4TB<br />
最大文件名长度： 255 字符<br />
缺省最小/最大块大小： 1024/4096 字节<br />
缺省inode 分配： 每4096 字节为1<br />
在强制FS 检查前的最大装载： 20（可配置）<br />
----------------------------------------------------<br />
<span style="color: blue;"><strong>ReiserFS</strong></span></p>
<p>ReiserFS 文件系统3.2.25 版是一种可选的日志文件系统。其优点包括更好的磁盘空间利用率、<br />
更好的磁盘访问性能和更快的崩溃恢复功能。<br />
----------------------------------------------------<br />
最大文件大小： 1TB<br />
最大文件极限： 32k 目录，42 亿文件<br />
最大分区/文件系统大小： 4TB<br />
最大文件名长度： 255 字符<br />
----------------------------------------------------<br />
<span style="color: blue;"><strong>JFS</strong></span></p>
<p>日志文件系统（Journaled File System, JFS）是一种全64 位文件系统。所有文件系统结构字<br />
段均为64 位大小。它允许JFS 同时支持大文件和分区。JFS 由IBM 根据GPL 许可开发，它<br />
是从其AIX 系统移植过来的。<br />
JFS 提供基于日志的字节级文件系统，它可以开发用于面向交易的高性能系统。它是可扩展<br />
的，且稳定可靠，其优于非日志文件系统之处在于其快速重新启动能力。JFS 可以在数秒钟<br />
或分钟之间将文件系统恢复到完好一致的状态。<br />
尽管它主要针对服务器的高吞吐量和可靠性要求（从单一处理器系统到高级多处理器和集群<br />
系统）而设计，JFS 同样也适用于要求性能和可靠性的客户配置。<br />
----------------------------------------------------<br />
最小文件系统大小 16 MB<br />
最大文件大小： 受体系结构限制<br />
最大文件极限： 受文件系统大小限制<br />
缺省最小/最大块大小： 1024/4096 字节<br />
缺省inode 分配： 动态<br />
----------------------------------------------------</p>
<p><span style="color: blue;"><strong>LVM</strong></span></p>
<p>逻辑卷管理程序（Logical Volume Manager, LVM）是一种在线磁盘存储管理的子系统，它已<br />
经成为跨Linux 存储管理的“事实上”标准。<br />
LVM 支持磁盘和磁盘子系统的企业级卷管理，它可以成组任意数量的磁盘到卷组。卷组的<br />
总能力可以分配给逻辑卷，这些逻辑卷可以按正常块设备来进行访问。<br />
此外，LVM 还提供存储的逻辑分离。当在线地对块设备进行大小调整的过程中，可以将数<br />
据从一个物理设备移动到另一个物理设备。LVM 也允许系统管理员轻松地对系统进行升级，<br />
去除有故障的磁盘，重新组织负载，并适应变化了的系统需求。<br />
----------------------------------------------------<br />
最大逻辑卷大小 从使用4 Mb 盘区的256 Gb<br />
到使用较大PE 的1 Pb<br />
最大逻辑卷数： 256<br />
最大逻辑组数： 99<br />
每PV 的最大PE 数： 65534<br />
缺省物理盘区大小： 4 Mb<br />
----------------------------------------------------</p>
<p>以上摘自《Turbolinux Enterprise Server 8 powered by UnitedLinux 白皮书》<br />
<a href="http://www.turbolinux.com.cn/products/data/TLES-WhitePaper.pdf" target="_blank">http://www.turbolinux.com.cn/product...WhitePaper.pdf</a></p>
<p><a href="/wp-content/uploads/2012/01/TLES-WhitePaper.pdf">本地下载白皮书 TLES-WhitePaper</a></p>
</div>
<table class="wumii-related-items" cellspacing="0" cellpadding="3" border="0"  style="clear: both;">
    
    <tr>
        <td colspan="4"><b><font size="-1"  style="display: block !important; padding: 20px 0 5px !important;">您可能也喜欢：</font></b></td>
    </tr>
    
        <tr>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important;">
                    <a target="_blank" title="Linux实现从Ext2到Ext3文件系统的转换" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fblog.haohtml.com%2Farchives%2F6021&from=http%3A%2F%2Fblog.haohtml.com%2Farchives%2F12443">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/images/blogWidget/wordpress_default.gif" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">Linux实现从Ext2到Ext3文件系统的转换</font>
                    </a>
                </td>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;">
                    <a target="_blank" title="在安装php的make时候,出现错误&quot;chmod: cannot access `ext/phar/phar.phar': No such file or directory&quot;的解决办法" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fblog.haohtml.com%2Farchives%2F12482&from=http%3A%2F%2Fblog.haohtml.com%2Farchives%2F12443">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/images/blogWidget/wordpress_default.gif" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">在安装php的make时候,出现错误&quot;chmod: cannot access `ext/phar/phar.phar': No such file or directory&quot;的解决办法</font>
                    </a>
                </td>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;">
                    <a target="_blank" title="LVM基本介绍与常用命令" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fblog.haohtml.com%2Farchives%2F11957&from=http%3A%2F%2Fblog.haohtml.com%2Farchives%2F12443">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/images/blogWidget/wordpress_default.gif" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">LVM基本介绍与常用命令</font>
                    </a>
                </td>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;">
                    <a target="_blank" title="linux下 lvm 磁盘扩容" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fblog.haohtml.com%2Farchives%2F10328&from=http%3A%2F%2Fblog.haohtml.com%2Farchives%2F12443">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/site_images/2011/07/08/16674778.gif" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">linux下 lvm 磁盘扩容</font>
                    </a>
                </td>
        </tr>
    
    <tr>
        <td colspan="4" align="right">
            <a style="text-decoration: none !important;" href="http://www.wumii.com/widget/relatedItems.htm" target="_blank" title="无觅相关文章插件">
                <font size="-1" color="#bbbbbb" style="display: block !important; font-family: arial !important; padding: 5px 0 !important; font-size: 12px !important; color: #bbb !important;">无觅</font>
            </a>
        </td>
    </tr>
</table>]]></content:encoded>
			<wfw:commentRss>http://blog.haohtml.com/archives/12443/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>lsof命令详解</title>
		<link>http://blog.haohtml.com/archives/12438</link>
		<comments>http://blog.haohtml.com/archives/12438#comments</comments>
		<pubDate>Wed, 11 Jan 2012 13:36:28 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[服务器类]]></category>
		<category><![CDATA[lsof]]></category>

		<guid isPermaLink="false">http://blog.haohtml.com/?p=12438</guid>
		<description><![CDATA[卸载移动存储时经常提示device busy，也可能误删了一个正在打开的文件。。。。 这时候可以试试lsof lsof简介  lsof（list open files）是一个列出当前系统打开文件的工具。在linux环境下，任何事物都以文件的形式存在，通过文件不仅仅可以访问常规数据，还可以访问网络连接和硬件。所以如传输控制协议 (TCP) 和用户数据报协议 (UDP) 套接字等，系统在后台都为该应用程序分配了一个文件描述符，无论这个文件的本质如何，该文件描述符为应用程序与基础操作系统之间的交互提供了通用接口。因为应用程序打开文件的描述符列表提供了大量关于这个应用程序本身的信息，因此通过lsof工具能够查看这个列表对系统监测以及排错将是很有帮助的。 lsof使用  lsof输出信息含义 在终端下输入lsof即可显示系统打开的文件，因为 lsof 需要访问核心内存和各种文件，所以必须以 root 用户的身份运行它才能够充分地发挥其功能。 COMMAND    PID      USER   FD      TYPE     DEVICE     SIZE       NODE      NAME init       1         root  cwd      DIR       3,3       1024       2         / init  [...]<table class="wumii-related-items" cellspacing="0" cellpadding="3" border="0"  style="clear: both;">
    
    <tr>
        <td colspan="4"><b><font size="-1"  style="display: block !important; padding: 20px 0 5px !important;">您可能也喜欢：</font></b></td>
    </tr>
    
        <tr>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important;">
                    <a target="_blank" title="unix-ln 命令" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fblog.haohtml.com%2Farchives%2F4220&from=http%3A%2F%2Fblog.haohtml.com%2Farchives%2F12438">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/images/blogWidget/wordpress_default.gif" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">unix-ln 命令</font>
                    </a>
                </td>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;">
                    <a target="_blank" title="ubuntu软件安装命令" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fblog.haohtml.com%2Farchives%2F3517&from=http%3A%2F%2Fblog.haohtml.com%2Farchives%2F12438">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/images/blogWidget/wordpress_default.gif" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">ubuntu软件安装命令</font>
                    </a>
                </td>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;">
                    <a target="_blank" title="chmod命令实例" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fblog.haohtml.com%2Farchives%2F2842&from=http%3A%2F%2Fblog.haohtml.com%2Farchives%2F12438">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/images/blogWidget/wordpress_default.gif" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">chmod命令实例</font>
                    </a>
                </td>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;">
                    <a target="_blank" title="tar命令详解" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fblog.haohtml.com%2Farchives%2F3606&from=http%3A%2F%2Fblog.haohtml.com%2Farchives%2F12438">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/images/blogWidget/wordpress_default.gif" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">tar命令详解</font>
                    </a>
                </td>
        </tr>
    
    <tr>
        <td colspan="4" align="right">
            <a style="text-decoration: none !important;" href="http://www.wumii.com/widget/relatedItems.htm" target="_blank" title="无觅相关文章插件">
                <font size="-1" color="#bbbbbb" style="display: block !important; font-family: arial !important; padding: 5px 0 !important; font-size: 12px !important; color: #bbb !important;">无觅</font>
            </a>
        </td>
    </tr>
</table>]]></description>
			<content:encoded><![CDATA[<p>卸载移动存储时经常提示device busy，也可能误删了一个正在打开的文件。。。。<br />
这时候可以试试lsof</p>
<p><strong>lsof简介 </strong></p>
<p><strong></strong>lsof（list open files）是一个列出当前系统打开文件的工具。在linux环境下，任何事物都以文件的形式存在，通过文件不仅仅可以访问常规数据，还可以访问网络连接和硬件。所以如传输控制协议 (TCP) 和用户数据报协议 (UDP) 套接字等，系统在后台都为该应用程序分配了一个文件描述符，无论这个文件的本质如何，该文件描述符为应用程序与基础操作系统之间的交互提供了通用接口。因为应用程序打开文件的描述符列表提供了大量关于这个应用程序本身的信息，因此通过lsof工具能够查看这个列表对系统监测以及排错将是很有帮助的。</p>
<p><strong>lsof使用 </strong></p>
<p><strong></strong>lsof输出信息含义<br />
在终端下输入lsof即可显示系统打开的文件，因为 lsof 需要访问核心内存和各种文件，所以必须以 root 用户的身份运行它才能够充分地发挥其功能。</p>
<blockquote><p>COMMAND    PID      USER   FD      TYPE     DEVICE     SIZE       NODE      NAME<br />
init       1         root  cwd      DIR       3,3       1024       2         /<br />
init       1         root  rtd      DIR       3,3       1024       2         /<br />
init       1         root  txt      REG       3,3       38432      1763452  /sbin/init<br />
init       1         root  mem      REG       3,3       106114     1091620  /lib/libdl-2.6.so<br />
init       1         root  mem      REG       3,3       7560696    1091614  /lib/libc-2.6.so<br />
init       1         root  mem      REG       3,3       79460      1091669  /lib/libselinux.so.1<br />
init       1         root  mem      REG       3,3       223280     1091668  /lib/libsepol.so.1<br />
init       1         root  mem      REG       3,3       564136     1091607  /lib/ld-2.6.so<br />
init       1         root  10u      FIFO      0,15                  1309     /dev/initctl</p></blockquote>
<p>每行显示一个打开的文件，若不指定条件默认将显示所有进程打开的所有文件。<span id="more-12438"></span></p>
<p><span style="color: #0000ff;">lsof输出各列信息的意义如下：  </span></p>
<blockquote><p>COMMAND：进程的名称<br />
PID：进程标识符<br />
USER：进程所有者<br />
FD：文件描述符，应用程序通过文件描述符识别该文件。如cwd、txt等<br />
TYPE：文件类型，如DIR、REG等<br />
DEVICE：指定磁盘的名称<br />
SIZE：文件的大小<br />
NODE：索引节点（文件在磁盘上的标识）<br />
NAME：打开文件的确切名称</p></blockquote>
<p>其中FD 列中的文件描述符cwd 值表示应用程序的当前工作目录，这是该应用程序启动的目录，除非它本身对这个目录进行更改。<br />
txt 类型的文件是程序代码，如应用程序二进制文件本身或共享库，如上列表中显示的 /sbin/init 程序。其次数值表示应用程序的文件描述符，这是打开该文件时返回的一个整数。如上的最后一行文件/dev/initctl，其文件描述符为 10。u 表示该文件被打开并处于读取/写入模式，而不是只读 ® 或只写 (w) 模式。同时还有大写 的W 表示该应用程序具有对整个文件的写锁。该文件描述符用于确保每次只能打开一个应用程序实例。初始打开每个应用程序时，都具有三个文件描述符，从 0 到 2，分别表示标准输入、输出和错误流。所以大多数应用程序所打开的文件的 FD 都是从 3 开始。<br />
与 FD 列相比，Type 列则比较直观。文件和目录分别称为 REG 和 DIR。而CHR 和 BLK，分别表示字符和块设备； 或者 UNIX、FIFO 和 IPv4，分别表示 UNIX 域套接字、先进先出 (FIFO) 队列和网际协议 (IP) 套接字。</p>
<p><span style="color: #0000ff;">lsof常用参数 </span></p>
<p>lsof 常见的用法是查找应用程序打开的文件的名称和数目。可用于查找出某个特定应用程序将日志数据记录到何处，或者正在跟踪某个问题。<br />
例如，linux限制了进程能够打开文件的数目。通常这个数值很大，所以不会产生问题，并且在需要时，应用程序可以请求更大的值（直到某<br />
个上限）。如果你怀疑应用程序耗尽了文件描述符，那么可以使用 lsof 统计打开的文件数目，以进行验证。</p>
<p><span style="color: #0000ff;">lsof语法格式是：</span></p>
<p><strong>lsof ［options］ filename </strong></p>
<p><strong></strong><span style="color: #0000ff;">常用的参数列表：</span></p>
<blockquote><p>lsof  filename 显示打开指定文件的所有进程<br />
lsof -a 表示两个参数都必须满足时才显示结果<br />
lsof -c string   显示COMMAND列中包含指定字符的进程所有打开的文件<br />
lsof -u username  显示所属user进程打开的文件<br />
lsof -g gid 显示归属gid的进程情况<br />
lsof +d /DIR/ 显示目录下被进程打开的文件<br />
lsof +D /DIR/ 同上，但是会搜索目录下的所有目录，时间相对较长<br />
lsof -d FD 显示指定文件描述符的进程<br />
lsof -n 不将IP转换为hostname，缺省是不加上-n参数<br />
lsof -i 用以显示符合条件的进程情况<br />
lsof -i[46] [protocol][@hostname|hostaddr][:service|port]<br />
46 --&gt; IPv4 or IPv6<br />
protocol --&gt; TCP or UDP<br />
hostname --&gt; Internet host name<br />
hostaddr --&gt; IPv4地址<br />
service --&gt; /etc/service中的 service name (可以不只一个)<br />
port --&gt; 端口号 (可以不只一个)</p></blockquote>
<p>例如： 查看22端口现在运行的情况</p>
<blockquote><p># lsof -i :22<br />
COMMAND  PID USER   FD   TYPE DEVICE SIZE NODE NAME<br />
sshd    1409 root    3u  IPv6   5678       TCP *:ssh (LISTEN)</p></blockquote>
<p>查看所属root用户进程所打开的文件类型为txt的文件:</p>
<blockquote><p># lsof -a -u root -d txt<br />
COMMAND    PID USER  FD      TYPE DEVICE    SIZE    NODE NAME<br />
init       1    root txt       REG    3,3   38432 1763452 /sbin/init<br />
mingetty  1632 root txt       REG    3,3   14366 1763337 /sbin/mingetty<br />
mingetty  1633 root txt       REG    3,3   14366 1763337 /sbin/mingetty<br />
mingetty  1634 root txt       REG    3,3   14366 1763337 /sbin/mingetty<br />
mingetty  1635 root txt       REG    3,3   14366 1763337 /sbin/mingetty<br />
mingetty  1636 root txt       REG    3,3   14366 1763337 /sbin/mingetty<br />
mingetty  1637 root txt       REG    3,3   14366 1763337 /sbin/mingetty<br />
kdm        1638 root txt       REG    3,3  132548 1428194 /usr/bin/kdm<br />
X          1670 root txt       REG    3,3 1716396 1428336 /usr/bin/Xorg<br />
kdm        1671 root txt       REG    3,3  132548 1428194 /usr/bin/kdm<br />
startkde  2427 root txt       REG    3,3  645408 1544195 /bin/bash<br />
... ...</p></blockquote>
<p>lsof使用实例</p>
<p><strong>一、查找谁在使用文件系统 </strong><br />
在卸载文件系统时，如果该文件系统中有任何打开的文件，操作通常将会失败。那么通过lsof可以找出那些进程在使用当前要卸载的文件系统，如下：</p>
<blockquote><p># lsof  /GTES11/<br />
COMMAND  PID USER   FD   TYPE DEVICE SIZE NODE NAME<br />
bash    4208 root  cwd    DIR    3,1 4096    2 /GTES11/<br />
vim     4230 root  cwd    DIR    3,1 4096    2 /GTES11/</p></blockquote>
<p>在这个示例中，用户root正在其/GTES11目录中进行一些操作。一个 bash是实例正在运行，并且它当前的目录为/GTES11，另一个则显示的是vim正在编辑/GTES11下的文件。要成功地卸载/GTES11，应该在通知用户以确保情况正常之后，中止这些进程。 这个示例说明了应用程序的当前工作目录非常重要，因为它仍保持着文件资源，并且可以防止文件系统被卸载。这就是为什么大部分守护进程（后台进程）将它们的目录更改为根目录、或服务特定的目录（如 sendmail 示例中的 /var/spool/mqueue）的原因，以避免该守护进程阻止卸载不相关的文件系统。<br />
<strong>二、恢复删除的文件 </strong><br />
当Linux计算机受到入侵时，常见的情况是日志文件被删除，以掩盖攻击者的踪迹。管理错误也可能导致意外删除重要的文件，比如在清理旧日志时，意外地删除了数据库的活动事务日志。有时可以通过lsof来恢复这些文件。<br />
当进程打开了某个文件时，只要该进程保持打开该文件，即使将其删除，它依然存在于磁盘中。这意味着，进程并不知道文件已经被删除，它仍然可以向打开该文件时提供给它的文件描述符进行读取和写入。除了该进程之外，这个文件是不可见的，因为已经删除了其相应的目录索引节点。<br />
在/proc 目录下，其中包含了反映内核和进程树的各种文件。/proc目录挂载的是在内存中所映射的一块区域，所以这些文件和目录并不存在于磁盘中，因此当我们对这些文件进行读取和写入时，实际上是在从内存中获取相关信息。大多数与 lsof 相关的信息都存储于以进程的 PID 命名的目录中，即 /proc/1234 中包含的是 PID 为 1234 的进程的信息。每个进程目录中存在着各种文件，它们可以使得应用程序简单地了解进程的内存空间、文件描述符列表、指向磁盘上的文件的符号链接和其他系统信息。lsof 程序使用该信息和其他关于内核内部状态的信息来产生其输出。所以lsof 可以显示进程的文件描述符和相关的文件名等信息。也就是我们通过访问进程的文件描述符可以找到该文件的相关信息。</p>
<p>当系统中的某个文件被意外地删除了，只要这个时候系统中还有进程正在访问该文件，那么我们就可以通过lsof从/proc目录下恢复该文件的内容。 假如由于误操作将/var/log/messages文件删除掉了，那么这时要将/var/log/messages文件恢复的方法如下：<br />
首先使用lsof来查看当前是否有进程打开/var/logmessages文件，如下：</p>
<blockquote><p># lsof |grep /var/log/messages<br />
syslogd   1283      root    2w      REG        3,3  5381017    1773647 /var/log/messages (deleted)</p></blockquote>
<p>从上面的信息可以看到 PID 1283（syslogd）打开文件的文件描述符为 2。同时还可以看到/var/log/messages已经标记被删除了。因此我们可以在 /proc/1283/fd/2 （fd下的每个以数字命名的文件表示进程对应的文件描述符）中查看相应的信息，如下：</p>
<blockquote><p># head -n 10 /proc/1283/fd/2<br />
Aug  4 13:50:15 holmes86 syslogd 1.4.1: restart.<br />
Aug  4 13:50:15 holmes86 kernel: klogd 1.4.1, log source = /proc/kmsg started.<br />
Aug  4 13:50:15 holmes86 kernel: Linux version 2.6.22.1-8 (<a href="mailto:root@everestbuilder.linux-ren.org">root@everestbuilder.linux-ren.org</a>) (gcc version 4.2.0) #1 SMP Wed Jul 18 11:18:32 EDT 2007<br />
Aug  4 13:50:15 holmes86 kernel: BIOS-provided physical RAM map:<br />
Aug  4 13:50:15 holmes86 kernel:  BIOS-e820: 0000000000000000 - 000000000009f000 (usable)<br />
Aug  4 13:50:15 holmes86 kernel:  BIOS-e820: 000000000009f000 - 00000000000a0000 (reserved)<br />
Aug  4 13:50:15 holmes86 kernel:  BIOS-e820: 0000000000100000 - 000000001f7d3800 (usable)<br />
Aug  4 13:50:15 holmes86 kernel:  BIOS-e820: 000000001f7d3800 - 0000000020000000 (reserved)<br />
Aug  4 13:50:15 holmes86 kernel:  BIOS-e820: 00000000e0000000 - 00000000f0007000 (reserved)<br />
Aug  4 13:50:15 holmes86 kernel:  BIOS-e820: 00000000f0008000 - 00000000f000c000 (reserved)</p></blockquote>
<p>从上面的信息可以看出，查看 /proc/8663/fd/15 就可以得到所要恢复的数据。如果可以通过文件描述符查看相应的数据，那么就可以使用 I/O 重定向将其复制到文件中，如:</p>
<blockquote><p>cat /proc/1283/fd/2 &gt; /var/log/messages</p></blockquote>
<p>对于许多应用程序，尤其是日志文件和数据库，这种恢复删除文件的方法非常有用。</p>
<table class="wumii-related-items" cellspacing="0" cellpadding="3" border="0"  style="clear: both;">
    
    <tr>
        <td colspan="4"><b><font size="-1"  style="display: block !important; padding: 20px 0 5px !important;">您可能也喜欢：</font></b></td>
    </tr>
    
        <tr>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important;">
                    <a target="_blank" title="unix-ln 命令" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fblog.haohtml.com%2Farchives%2F4220&from=http%3A%2F%2Fblog.haohtml.com%2Farchives%2F12438">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/images/blogWidget/wordpress_default.gif" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">unix-ln 命令</font>
                    </a>
                </td>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;">
                    <a target="_blank" title="ubuntu软件安装命令" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fblog.haohtml.com%2Farchives%2F3517&from=http%3A%2F%2Fblog.haohtml.com%2Farchives%2F12438">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/images/blogWidget/wordpress_default.gif" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">ubuntu软件安装命令</font>
                    </a>
                </td>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;">
                    <a target="_blank" title="chmod命令实例" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fblog.haohtml.com%2Farchives%2F2842&from=http%3A%2F%2Fblog.haohtml.com%2Farchives%2F12438">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/images/blogWidget/wordpress_default.gif" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">chmod命令实例</font>
                    </a>
                </td>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;">
                    <a target="_blank" title="tar命令详解" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fblog.haohtml.com%2Farchives%2F3606&from=http%3A%2F%2Fblog.haohtml.com%2Farchives%2F12438">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/images/blogWidget/wordpress_default.gif" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">tar命令详解</font>
                    </a>
                </td>
        </tr>
    
    <tr>
        <td colspan="4" align="right">
            <a style="text-decoration: none !important;" href="http://www.wumii.com/widget/relatedItems.htm" target="_blank" title="无觅相关文章插件">
                <font size="-1" color="#bbbbbb" style="display: block !important; font-family: arial !important; padding: 5px 0 !important; font-size: 12px !important; color: #bbb !important;">无觅</font>
            </a>
        </td>
    </tr>
</table>]]></content:encoded>
			<wfw:commentRss>http://blog.haohtml.com/archives/12438/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>在FreeBSD系统中用pkill命令踢出SSH在线登录用户</title>
		<link>http://blog.haohtml.com/archives/12432</link>
		<comments>http://blog.haohtml.com/archives/12432#comments</comments>
		<pubDate>Wed, 11 Jan 2012 12:55:57 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[服务器类]]></category>
		<category><![CDATA[FreeBSD]]></category>

		<guid isPermaLink="false">http://blog.haohtml.com/?p=12432</guid>
		<description><![CDATA[FreeBSD是一个多用户多任务的操作系统，用户可以在不同地方通过ssh连上FreeBSD服务器，在系统中我们可以使用w命令来查看当前在线登录用户。 [root@host01 ~]# w 03:05:23 up 19 min, 3 users, load average: 0.00, 0.03, 0.05 USER TTY FROM   LOGIN@ IDLE WHAT root p0 192.168.0.2 01:39 6:52 /usr/bin/perl root p1 192.168.0.31 01:45 0.00s w root p2 192.168.0.23 01:52 2.00s -bash 看到了吧，已经有3个用户登录到服务器了。接下来使用who am i 看那个是自己的登录终端，下面自己是pts/1 [root@host01 ~]# who am i root p1 2009-08-02 03:06 (192.168.0.31) 接下来使用pkill命令将要其它的用户踢出,这里为p0和p2。 [root@host01 [...]<table class="wumii-related-items" cellspacing="0" cellpadding="3" border="0"  style="clear: both;">
    
    <tr>
        <td colspan="4"><b><font size="-1"  style="display: block !important; padding: 20px 0 5px !important;">您可能也喜欢：</font></b></td>
    </tr>
    
        <tr>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important;">
                    <a target="_blank" title="FreeBSD中的磁盘组织" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fblog.haohtml.com%2Farchives%2F7158&from=http%3A%2F%2Fblog.haohtml.com%2Farchives%2F12432">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/site_images/2011/03/22/4022317.png" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">FreeBSD中的磁盘组织</font>
                    </a>
                </td>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;">
                    <a target="_blank" title="搭建一个大型网站架构的实验环境(FreeBSD系统设置篇)" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fblog.haohtml.com%2Farchives%2F929&from=http%3A%2F%2Fblog.haohtml.com%2Farchives%2F12432">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/site_images/2011/03/22/4025162.jpg" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">搭建一个大型网站架构的实验环境(FreeBSD系统设置篇)</font>
                    </a>
                </td>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;">
                    <a target="_blank" title="FreeBSD下的重装系统方法" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fblog.haohtml.com%2Farchives%2F7197&from=http%3A%2F%2Fblog.haohtml.com%2Farchives%2F12432">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/site_images/2011/03/22/4022322.gif" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">FreeBSD下的重装系统方法</font>
                    </a>
                </td>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;">
                    <a target="_blank" title="freebsd中升级命令freebsd-update详解" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fblog.haohtml.com%2Farchives%2F2577&from=http%3A%2F%2Fblog.haohtml.com%2Farchives%2F12432">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/images/blogWidget/wordpress_default.gif" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">freebsd中升级命令freebsd-update详解</font>
                    </a>
                </td>
        </tr>
    
    <tr>
        <td colspan="4" align="right">
            <a style="text-decoration: none !important;" href="http://www.wumii.com/widget/relatedItems.htm" target="_blank" title="无觅相关文章插件">
                <font size="-1" color="#bbbbbb" style="display: block !important; font-family: arial !important; padding: 5px 0 !important; font-size: 12px !important; color: #bbb !important;">无觅</font>
            </a>
        </td>
    </tr>
</table>]]></description>
			<content:encoded><![CDATA[<p>FreeBSD是一个多用户多任务的操作系统，用户可以在不同地方通过ssh连上FreeBSD服务器，在系统中我们可以使用w命令来查看当前在线登录用户。</p>
<blockquote><p>[root@host01 ~]# w</p>
<p>03:05:23 up 19 min, 3 users, load average: 0.00, 0.03, 0.05<br />
USER TTY FROM   LOGIN@ IDLE WHAT<br />
root <strong>p0</strong> 192.168.0.2 01:39 6:52 /usr/bin/perl<br />
root <span style="color: #0000ff;"><strong>p1</strong></span> 192.168.0.31 01:45 0.00s w<br />
root <strong>p2</strong> 192.168.0.23 01:52 2.00s -bash</p></blockquote>
<p>看到了吧，已经有3个用户登录到服务器了。接下来使用who am i 看那个是自己的登录终端，下面自己是pts/1</p>
<blockquote><p>[root@host01 ~]# who am i<br />
root<span style="color: #0000ff;"><strong> p1</strong></span> 2009-08-02 03:06 (192.168.0.31)</p></blockquote>
<p>接下来使用pkill命令将要其它的用户踢出,这里为p0和p2。<span id="more-12432"></span><br />
[root@host01 ~]# <strong>pkill -kill -t p2</strong></p>
<p>再使用w命令查看，p2终端用户已经被踢掉了。</p>
<blockquote><p>[root@host01 ~]# w</p>
<p>03:07:28 up 21 min, 2 users, load average: 0.00, 0.02, 0.05<br />
USER TTY FROM   LOGIN@ IDLE WHAT<br />
root p0 192.168.0.2 01:39 6:52 /usr/bin/perl<br />
root p1 192.168.0.31 01:45 0.00s w</p></blockquote>
<p>=========================================</p>
<p>比如某一用户通过SSH登陆进入系，会话为pts/0（设此用户为第一个通过SSH登陆进入系统的）。</p>
<blockquote><p># ps -aux | grep pts/0<br />
root    865  0.0  0.5  9400  4360  ??  Is    4:08AM   0:00.16 sshd: root@pts/0<br />
root    926  0.0  0.1  3492  1208  v1  S+    4:17AM   0:00.01 sshd: grep pts/0</p></blockquote>
<p>开始踢他了：</p>
<blockquote><p># kill -9 865</p></blockquote>
<p>或者</p>
<blockquote><p>#pkill -kill -t pts/0</p></blockquote>
<p>&nbsp;</p>
<table class="wumii-related-items" cellspacing="0" cellpadding="3" border="0"  style="clear: both;">
    
    <tr>
        <td colspan="4"><b><font size="-1"  style="display: block !important; padding: 20px 0 5px !important;">您可能也喜欢：</font></b></td>
    </tr>
    
        <tr>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important;">
                    <a target="_blank" title="FreeBSD中的磁盘组织" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fblog.haohtml.com%2Farchives%2F7158&from=http%3A%2F%2Fblog.haohtml.com%2Farchives%2F12432">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/site_images/2011/03/22/4022317.png" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">FreeBSD中的磁盘组织</font>
                    </a>
                </td>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;">
                    <a target="_blank" title="搭建一个大型网站架构的实验环境(FreeBSD系统设置篇)" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fblog.haohtml.com%2Farchives%2F929&from=http%3A%2F%2Fblog.haohtml.com%2Farchives%2F12432">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/site_images/2011/03/22/4025162.jpg" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">搭建一个大型网站架构的实验环境(FreeBSD系统设置篇)</font>
                    </a>
                </td>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;">
                    <a target="_blank" title="FreeBSD下的重装系统方法" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fblog.haohtml.com%2Farchives%2F7197&from=http%3A%2F%2Fblog.haohtml.com%2Farchives%2F12432">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/site_images/2011/03/22/4022322.gif" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">FreeBSD下的重装系统方法</font>
                    </a>
                </td>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;">
                    <a target="_blank" title="freebsd中升级命令freebsd-update详解" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fblog.haohtml.com%2Farchives%2F2577&from=http%3A%2F%2Fblog.haohtml.com%2Farchives%2F12432">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/images/blogWidget/wordpress_default.gif" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">freebsd中升级命令freebsd-update详解</font>
                    </a>
                </td>
        </tr>
    
    <tr>
        <td colspan="4" align="right">
            <a style="text-decoration: none !important;" href="http://www.wumii.com/widget/relatedItems.htm" target="_blank" title="无觅相关文章插件">
                <font size="-1" color="#bbbbbb" style="display: block !important; font-family: arial !important; padding: 5px 0 !important; font-size: 12px !important; color: #bbb !important;">无觅</font>
            </a>
        </td>
    </tr>
</table>]]></content:encoded>
			<wfw:commentRss>http://blog.haohtml.com/archives/12432/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>VSFTP中&quot;Fixing 500 OOPS: vsftpd: refusing to run with writable root inside chroot ()&quot;的解决办法!</title>
		<link>http://blog.haohtml.com/archives/12426</link>
		<comments>http://blog.haohtml.com/archives/12426#comments</comments>
		<pubDate>Wed, 11 Jan 2012 12:10:28 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[服务器类]]></category>

		<guid isPermaLink="false">http://blog.haohtml.com/?p=12426</guid>
		<description><![CDATA[今天在参考以前写的在FreeBSD下配置vsftpd教程http://blog.haohtml.com/archives/7213的时候.发现以下错误: After upgrading vsftpd to 2.3.5 you may be getting the following message when trying to log in. 500 OOPS: vsftpd: refusing to run with writable root inside chroot () This is due to the following update: - Add stronger checks for the configuration error of running with a writeable root directory inside a chroot(). [...]<table class="wumii-related-items" cellspacing="0" cellpadding="3" border="0"  style="clear: both;">
    
    <tr>
        <td colspan="4"><b><font size="-1"  style="display: block !important; padding: 20px 0 5px !important;">您可能也喜欢：</font></b></td>
    </tr>
    
        <tr>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important;">
                    <a target="_blank" title="500 OOPS: vsftpd: refusing to run with writable anonymous root" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fblog.haohtml.com%2Farchives%2F492&from=http%3A%2F%2Fblog.haohtml.com%2Farchives%2F12426">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/images/blogWidget/wordpress_default.gif" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">500 OOPS: vsftpd: refusing to run with writable anonymous root</font>
                    </a>
                </td>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;">
                    <a target="_blank" title="[教程]FreeBSD下vsftp安装配置详解(ports方式)" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fblog.haohtml.com%2Farchives%2F484&from=http%3A%2F%2Fblog.haohtml.com%2Farchives%2F12426">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/site_images/2011/03/22/4022279.jpg" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">[教程]FreeBSD下vsftp安装配置详解(ports方式)</font>
                    </a>
                </td>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;">
                    <a target="_blank" title="FREEBSD:VSFTP的安装和配置(packages方式)" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fblog.haohtml.com%2Farchives%2F488&from=http%3A%2F%2Fblog.haohtml.com%2Farchives%2F12426">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/site_images/2011/03/22/4022279.jpg" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">FREEBSD:VSFTP的安装和配置(packages方式)</font>
                    </a>
                </td>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;">
                    <a target="_blank" title="用Webmin和VSFTP搭建FTP服务器" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fblog.haohtml.com%2Farchives%2F1011&from=http%3A%2F%2Fblog.haohtml.com%2Farchives%2F12426">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/site_images/2011/03/22/4024156.jpg" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">用Webmin和VSFTP搭建FTP服务器</font>
                    </a>
                </td>
        </tr>
    
    <tr>
        <td colspan="4" align="right">
            <a style="text-decoration: none !important;" href="http://www.wumii.com/widget/relatedItems.htm" target="_blank" title="无觅相关文章插件">
                <font size="-1" color="#bbbbbb" style="display: block !important; font-family: arial !important; padding: 5px 0 !important; font-size: 12px !important; color: #bbb !important;">无觅</font>
            </a>
        </td>
    </tr>
</table>]]></description>
			<content:encoded><![CDATA[<p>今天在参考以前写的在FreeBSD下配置vsftpd教程<a href="http://blog.haohtml.com/archives/7213">http://blog.haohtml.com/archives/7213</a>的时候.发现以下错误:</p>
<p>After upgrading vsftpd to 2.3.5 you may be getting the following message when trying to log in.</p>
<blockquote><p>500 OOPS: vsftpd: refusing to run with writable root inside chroot ()</p></blockquote>
<p>This is due to the following update:</p>
<blockquote><p>- Add stronger checks for the configuration error of running with a writeable<br />
root directory inside a chroot(). This may bite people who carelessly turned<br />
on chroot_local_user but such is life.</p></blockquote>
<p>The problem is that your users root directory is writable(用户根目录可写), which isn’t allowed when using chroot restrictions in the new update. The following command will fix this problem, replace the directory with your users root:</p>
<blockquote><p><span style="color: #0000ff;">chmod a-w /home/user</span></p></blockquote>
<p>好吧,我们如果启用chroot,必须保证ftp根目录不可写,这样对于ftp根直接为网站根目录的用户不方便,所以建议假如ftp根目录是/home/user,那么网站结构可以这样分,/home/user/log为日志目录,/home/user/web为网站根目录,这样我们就可以去掉/home/user目录的写入权限而不影响网站的正常运行</p>
<table class="wumii-related-items" cellspacing="0" cellpadding="3" border="0"  style="clear: both;">
    
    <tr>
        <td colspan="4"><b><font size="-1"  style="display: block !important; padding: 20px 0 5px !important;">您可能也喜欢：</font></b></td>
    </tr>
    
        <tr>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important;">
                    <a target="_blank" title="500 OOPS: vsftpd: refusing to run with writable anonymous root" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fblog.haohtml.com%2Farchives%2F492&from=http%3A%2F%2Fblog.haohtml.com%2Farchives%2F12426">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/images/blogWidget/wordpress_default.gif" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">500 OOPS: vsftpd: refusing to run with writable anonymous root</font>
                    </a>
                </td>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;">
                    <a target="_blank" title="[教程]FreeBSD下vsftp安装配置详解(ports方式)" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fblog.haohtml.com%2Farchives%2F484&from=http%3A%2F%2Fblog.haohtml.com%2Farchives%2F12426">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/site_images/2011/03/22/4022279.jpg" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">[教程]FreeBSD下vsftp安装配置详解(ports方式)</font>
                    </a>
                </td>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;">
                    <a target="_blank" title="FREEBSD:VSFTP的安装和配置(packages方式)" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fblog.haohtml.com%2Farchives%2F488&from=http%3A%2F%2Fblog.haohtml.com%2Farchives%2F12426">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/site_images/2011/03/22/4022279.jpg" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">FREEBSD:VSFTP的安装和配置(packages方式)</font>
                    </a>
                </td>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;">
                    <a target="_blank" title="用Webmin和VSFTP搭建FTP服务器" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fblog.haohtml.com%2Farchives%2F1011&from=http%3A%2F%2Fblog.haohtml.com%2Farchives%2F12426">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/site_images/2011/03/22/4024156.jpg" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">用Webmin和VSFTP搭建FTP服务器</font>
                    </a>
                </td>
        </tr>
    
    <tr>
        <td colspan="4" align="right">
            <a style="text-decoration: none !important;" href="http://www.wumii.com/widget/relatedItems.htm" target="_blank" title="无觅相关文章插件">
                <font size="-1" color="#bbbbbb" style="display: block !important; font-family: arial !important; padding: 5px 0 !important; font-size: 12px !important; color: #bbb !important;">无觅</font>
            </a>
        </td>
    </tr>
</table>]]></content:encoded>
			<wfw:commentRss>http://blog.haohtml.com/archives/12426/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>FreeBSD中重新分区提示&quot;ERROR: Unable to write data to disk ad0! To edit the lables on a running system set sysctl kern.geom.debugflags=16 and try again.&quot;的解决办法</title>
		<link>http://blog.haohtml.com/archives/12399</link>
		<comments>http://blog.haohtml.com/archives/12399#comments</comments>
		<pubDate>Sun, 08 Jan 2012 13:09:23 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[js框架]]></category>
		<category><![CDATA[FreeBSD]]></category>

		<guid isPermaLink="false">http://blog.haohtml.com/?p=12399</guid>
		<description><![CDATA[今天将FreeBSD系统重新安装系统的时候.将原来的分区全部删除.进行重新分区,而按下W进行分区保存的时候.提示以下错误: ERROR: Unable to write data to disk ad0! To edit the lables on a running system set sysctl kern.geom.debugflags=16 and try again. 解决办法如下: 用root权限运行以下任何一条命令： #sysctl -w kern.geom.debugflags=16 或者 #sysctl  kern.geom.debugflags=16 你可以用sysctl -a查询你系统的所有内核子系统的配置参数，在具备权限的情况下，你可以修改配置变量，其中有一些只读的属性无法修改，有一些属性只能在开机时设定而不是运行时动态修改的也不能改（这些参数/属性在/boot/loader.conf中调整和修改）<table class="wumii-related-items" cellspacing="0" cellpadding="3" border="0"  style="clear: both;">
    
    <tr>
        <td colspan="4"><b><font size="-1"  style="display: block !important; padding: 20px 0 5px !important;">您可能也喜欢：</font></b></td>
    </tr>
    
        <tr>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important;">
                    <a target="_blank" title="搭建一个大型网站架构的实验环境(FreeBSD系统安装篇)" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fblog.haohtml.com%2Farchives%2F927&from=http%3A%2F%2Fblog.haohtml.com%2Farchives%2F12399">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/site_images/2011/03/22/4025166.png" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">搭建一个大型网站架构的实验环境(FreeBSD系统安装篇)</font>
                    </a>
                </td>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;">
                    <a target="_blank" title="在FreeBSD系统中用pkill命令踢出SSH在线登录用户" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fblog.haohtml.com%2Farchives%2F12432&from=http%3A%2F%2Fblog.haohtml.com%2Farchives%2F12399">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/images/blogWidget/wordpress_default.gif" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">在FreeBSD系统中用pkill命令踢出SSH在线登录用户</font>
                    </a>
                </td>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;">
                    <a target="_blank" title="FreeBSD中的磁盘组织" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fblog.haohtml.com%2Farchives%2F7158&from=http%3A%2F%2Fblog.haohtml.com%2Farchives%2F12399">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/site_images/2011/03/22/4022317.png" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">FreeBSD中的磁盘组织</font>
                    </a>
                </td>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;">
                    <a target="_blank" title="FreeBSD启动出现&quot;My unqualified host name unkown...Sleeping for retry&quot;的解决办法" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fblog.haohtml.com%2Farchives%2F12395&from=http%3A%2F%2Fblog.haohtml.com%2Farchives%2F12399">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/images/blogWidget/wordpress_default.gif" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">FreeBSD启动出现&quot;My unqualified host name unkown...Sleeping for retry&quot;的解决办法</font>
                    </a>
                </td>
        </tr>
    
    <tr>
        <td colspan="4" align="right">
            <a style="text-decoration: none !important;" href="http://www.wumii.com/widget/relatedItems.htm" target="_blank" title="无觅相关文章插件">
                <font size="-1" color="#bbbbbb" style="display: block !important; font-family: arial !important; padding: 5px 0 !important; font-size: 12px !important; color: #bbb !important;">无觅</font>
            </a>
        </td>
    </tr>
</table>]]></description>
			<content:encoded><![CDATA[<p>今天将FreeBSD系统重新安装系统的时候.将原来的分区全部删除.进行重新分区,而按下W进行分区保存的时候.提示以下错误:</p>
<blockquote><p>ERROR: Unable to write data to disk ad0! To edit the lables on a running system set sysctl kern.geom.debugflags=16 and try again.</p></blockquote>
<p>解决办法如下:</p>
<p><span style="font-size: small;"><span style="line-height: normal;">用root权限运行以下任何一条命令：<br />
<strong>#sysctl -w kern.geom.debugflags=16</strong><br />
或者<br />
<strong>#sysctl  kern.geom.debugflags=16</strong></p>
<p>你可以用sysctl -a查询你系统的所有内核子系统的配置参数，在具备权限的情况下，你可以修改配置变量，其中有一些只读的属性无法修改，有一些属性只能在开机时设定而不是运行时动态修改的也不能改（这些参数/属性在/boot/loader.conf中调整和修改）</span></span></p>
<table class="wumii-related-items" cellspacing="0" cellpadding="3" border="0"  style="clear: both;">
    
    <tr>
        <td colspan="4"><b><font size="-1"  style="display: block !important; padding: 20px 0 5px !important;">您可能也喜欢：</font></b></td>
    </tr>
    
        <tr>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important;">
                    <a target="_blank" title="搭建一个大型网站架构的实验环境(FreeBSD系统安装篇)" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fblog.haohtml.com%2Farchives%2F927&from=http%3A%2F%2Fblog.haohtml.com%2Farchives%2F12399">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/site_images/2011/03/22/4025166.png" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">搭建一个大型网站架构的实验环境(FreeBSD系统安装篇)</font>
                    </a>
                </td>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;">
                    <a target="_blank" title="在FreeBSD系统中用pkill命令踢出SSH在线登录用户" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fblog.haohtml.com%2Farchives%2F12432&from=http%3A%2F%2Fblog.haohtml.com%2Farchives%2F12399">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/images/blogWidget/wordpress_default.gif" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">在FreeBSD系统中用pkill命令踢出SSH在线登录用户</font>
                    </a>
                </td>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;">
                    <a target="_blank" title="FreeBSD中的磁盘组织" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fblog.haohtml.com%2Farchives%2F7158&from=http%3A%2F%2Fblog.haohtml.com%2Farchives%2F12399">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/site_images/2011/03/22/4022317.png" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">FreeBSD中的磁盘组织</font>
                    </a>
                </td>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;">
                    <a target="_blank" title="FreeBSD启动出现&quot;My unqualified host name unkown...Sleeping for retry&quot;的解决办法" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fblog.haohtml.com%2Farchives%2F12395&from=http%3A%2F%2Fblog.haohtml.com%2Farchives%2F12399">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/images/blogWidget/wordpress_default.gif" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">FreeBSD启动出现&quot;My unqualified host name unkown...Sleeping for retry&quot;的解决办法</font>
                    </a>
                </td>
        </tr>
    
    <tr>
        <td colspan="4" align="right">
            <a style="text-decoration: none !important;" href="http://www.wumii.com/widget/relatedItems.htm" target="_blank" title="无觅相关文章插件">
                <font size="-1" color="#bbbbbb" style="display: block !important; font-family: arial !important; padding: 5px 0 !important; font-size: 12px !important; color: #bbb !important;">无觅</font>
            </a>
        </td>
    </tr>
</table>]]></content:encoded>
			<wfw:commentRss>http://blog.haohtml.com/archives/12399/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>FreeBSD启动出现&quot;My unqualified host name unkown...Sleeping for retry&quot;的解决办法</title>
		<link>http://blog.haohtml.com/archives/12395</link>
		<comments>http://blog.haohtml.com/archives/12395#comments</comments>
		<pubDate>Sat, 07 Jan 2012 08:27:39 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[服务器类]]></category>
		<category><![CDATA[FreeBSD]]></category>

		<guid isPermaLink="false">http://blog.haohtml.com/?p=12395</guid>
		<description><![CDATA[最简单的方法是把/etc/rc.conf里的hostname改成"localhost"。即 hostname="localhost" &#160;<table class="wumii-related-items" cellspacing="0" cellpadding="3" border="0"  style="clear: both;">
    
    <tr>
        <td colspan="4"><b><font size="-1"  style="display: block !important; padding: 20px 0 5px !important;">您可能也喜欢：</font></b></td>
    </tr>
    
        <tr>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important;">
                    <a target="_blank" title="FreeBSD中的磁盘组织" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fblog.haohtml.com%2Farchives%2F7158&from=http%3A%2F%2Fblog.haohtml.com%2Farchives%2F12395">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/site_images/2011/03/22/4022317.png" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">FreeBSD中的磁盘组织</font>
                    </a>
                </td>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;">
                    <a target="_blank" title="分享FreeBSD 8.0的十四条优化策略" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fblog.haohtml.com%2Farchives%2F4197&from=http%3A%2F%2Fblog.haohtml.com%2Farchives%2F12395">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/site_images/2011/03/22/4028355.jpg" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">分享FreeBSD 8.0的十四条优化策略</font>
                    </a>
                </td>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;">
                    <a target="_blank" title="FreeBSD下的重装系统方法" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fblog.haohtml.com%2Farchives%2F7197&from=http%3A%2F%2Fblog.haohtml.com%2Farchives%2F12395">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/site_images/2011/03/22/4022322.gif" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">FreeBSD下的重装系统方法</font>
                    </a>
                </td>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;">
                    <a target="_blank" title="freebsd中升级命令freebsd-update详解" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fblog.haohtml.com%2Farchives%2F2577&from=http%3A%2F%2Fblog.haohtml.com%2Farchives%2F12395">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/images/blogWidget/wordpress_default.gif" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">freebsd中升级命令freebsd-update详解</font>
                    </a>
                </td>
        </tr>
    
    <tr>
        <td colspan="4" align="right">
            <a style="text-decoration: none !important;" href="http://www.wumii.com/widget/relatedItems.htm" target="_blank" title="无觅相关文章插件">
                <font size="-1" color="#bbbbbb" style="display: block !important; font-family: arial !important; padding: 5px 0 !important; font-size: 12px !important; color: #bbb !important;">无觅</font>
            </a>
        </td>
    </tr>
</table>]]></description>
			<content:encoded><![CDATA[<p>最简单的方法是把/etc/rc.conf里的hostname改成"localhost"。即</p>
<blockquote><p>hostname="localhost"</p></blockquote>
<p>&nbsp;</p>
<table class="wumii-related-items" cellspacing="0" cellpadding="3" border="0"  style="clear: both;">
    
    <tr>
        <td colspan="4"><b><font size="-1"  style="display: block !important; padding: 20px 0 5px !important;">您可能也喜欢：</font></b></td>
    </tr>
    
        <tr>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important;">
                    <a target="_blank" title="FreeBSD中的磁盘组织" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fblog.haohtml.com%2Farchives%2F7158&from=http%3A%2F%2Fblog.haohtml.com%2Farchives%2F12395">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/site_images/2011/03/22/4022317.png" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">FreeBSD中的磁盘组织</font>
                    </a>
                </td>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;">
                    <a target="_blank" title="分享FreeBSD 8.0的十四条优化策略" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fblog.haohtml.com%2Farchives%2F4197&from=http%3A%2F%2Fblog.haohtml.com%2Farchives%2F12395">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/site_images/2011/03/22/4028355.jpg" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">分享FreeBSD 8.0的十四条优化策略</font>
                    </a>
                </td>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;">
                    <a target="_blank" title="FreeBSD下的重装系统方法" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fblog.haohtml.com%2Farchives%2F7197&from=http%3A%2F%2Fblog.haohtml.com%2Farchives%2F12395">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/site_images/2011/03/22/4022322.gif" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">FreeBSD下的重装系统方法</font>
                    </a>
                </td>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;">
                    <a target="_blank" title="freebsd中升级命令freebsd-update详解" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fblog.haohtml.com%2Farchives%2F2577&from=http%3A%2F%2Fblog.haohtml.com%2Farchives%2F12395">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/images/blogWidget/wordpress_default.gif" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">freebsd中升级命令freebsd-update详解</font>
                    </a>
                </td>
        </tr>
    
    <tr>
        <td colspan="4" align="right">
            <a style="text-decoration: none !important;" href="http://www.wumii.com/widget/relatedItems.htm" target="_blank" title="无觅相关文章插件">
                <font size="-1" color="#bbbbbb" style="display: block !important; font-family: arial !important; padding: 5px 0 !important; font-size: 12px !important; color: #bbb !important;">无觅</font>
            </a>
        </td>
    </tr>
</table>]]></content:encoded>
			<wfw:commentRss>http://blog.haohtml.com/archives/12395/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

