<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0">
	<channel>
		<title>小锋堂</title>
		<link>http://www.jackfeng.com/</link>
		<description></description>
		<copyright>Copyright (C) 2004 Security Angel Team [S4T] All Rights Reserved.</copyright>
		<generator>SaBlog-X Version Plus 2.0 Build 20081001</generator>
		<lastBuildDate>Thu, 11 Mar 2010 01:30:59 +0000</lastBuildDate>
		<ttl>30</ttl>
		<item>
			<guid>http://www.jackfeng.com/archives/1370/</guid>
			<title>shell脚本中单引号可以用\047来代替</title>
			<author>小锋</author>
			<description><![CDATA[小锋堂 ( http://www.jackfeng.com/ ) : <p>shell脚本中&middot;可以用\047来代替</p>
<p>/bin/ls -l *.txt |awk 'print &quot;/usr/local/bin/mysqldump -uroot &nbsp;-p\047'${passwd}'\047&nbsp; &gt; xxx.log</p>
<p>&nbsp;</p>]]></description>
			<link>http://www.jackfeng.com/archives/1370/</link>
			<category domain="http://www.jackfeng.com/category/20/">Linux</category>
			<pubDate>2010-03-05 14:42</pubDate>
		</item>
		<item>
			<guid>http://www.jackfeng.com/archives/1368/</guid>
			<title>Shell 和 Shell Script基础</title>
			<author>小锋</author>
			<description><![CDATA[小锋堂 ( http://www.jackfeng.com/ ) : <p>&nbsp;&nbsp;<span class="Apple-style-span" style="font-family: Simsun; font-size: 12px; color: rgb(137, 137, 137); "><span class="Apple-style-span" style="line-height: 20px; ">或许，许多人都已经听过 shell 或 bash 这些名字，但不知道您是否知道它们究竟是什么东东呢？</span></span></p>
<div><font class="Apple-style-span" color="#898989" face="Simsun" size="3"><span class="Apple-style-span" style="font-size: 12px; line-height: 20px;"><br />
</span></font></div><br /><br /><a href="http://www.jackfeng.com/archives/1368/" target="_blank">阅读全文</a><br /><br />]]></description>
			<link>http://www.jackfeng.com/archives/1368/</link>
			<category domain="http://www.jackfeng.com/category/20/">Linux</category>
			<pubDate>2010-01-12 19:55</pubDate>
		</item>
		<item>
			<guid>http://www.jackfeng.com/archives/1367/</guid>
			<title>apache禁止IP访问</title>
			<author>小锋</author>
			<description><![CDATA[小锋堂 ( http://www.jackfeng.com/ ) : <p>&nbsp;&lt;VirtualHost *:80&gt;</p>
<div>&nbsp;&nbsp; &nbsp;ServerAdmin jackfeng@web</div>
<div>&nbsp;&nbsp; &nbsp;ServerName 121.111.111.111</div>
<div>&nbsp;&nbsp; &nbsp;&lt;Location /&gt;</div>
<div>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;Order Deny,Allow</div>
<div>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;Deny from all</div>
<div>&nbsp;&nbsp; &nbsp;&lt;/Location&gt;</div>
<div>&lt;/VirtualHost&gt;</div>]]></description>
			<link>http://www.jackfeng.com/archives/1367/</link>
			<category domain="http://www.jackfeng.com/category/20/">Linux</category>
			<pubDate>2009-12-31 12:15</pubDate>
		</item>
		<item>
			<guid>http://www.jackfeng.com/archives/1366/</guid>
			<title>nginx 未备案域名转向方法</title>
			<author>小锋</author>
			<description><![CDATA[小锋堂 ( http://www.jackfeng.com/ ) : <p>&nbsp;<span class="Apple-style-span" style="font-family: Tahoma, Verdana, Arial; font-size: 12px; line-height: normal; ">指向一个不存在域名
<div class="textbox-content" id="zoomtext" style="word-wrap: break-word; padding-top: 5px; padding-right: 5px; padding-bottom: 5px; padding-left: 10px; font-size: 12px; color: rgb(0, 0, 0); ">server {<br />
listen 80;<br />
server_name ip地址 ;<br />
location / {<br />
root /var/www/ ;<br />
rewrite ^/(.*)$&nbsp;<a rel="nofollow" href="http://8812kknkadsfl.com/" style="text-decoration: underline; color: rgb(102, 102, 102); ">http://8812kknkadsfl.com/</a>&nbsp;permanent;
<p>}<br />
}</p>
<div>&nbsp;</div>
</div>
</span></p>]]></description>
			<link>http://www.jackfeng.com/archives/1366/</link>
			<category domain="http://www.jackfeng.com/category/20/">Linux</category>
			<pubDate>2009-11-14 15:22</pubDate>
		</item>
		<item>
			<guid>http://www.jackfeng.com/archives/1365/</guid>
			<title>PHP 获取根域名</title>
			<author>小锋</author>
			<description><![CDATA[小锋堂 ( http://www.jackfeng.com/ ) : <p>&nbsp;function getUrlRoot($url){</p>
<div>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;#添加头部和尾巴</div>
<div>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;$url = $url . &quot;/&quot;;</div>
<div>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;#判断域名</div>
<div>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;preg_match(&quot;/((\w*):\/\/)?\w*\.?([\w|-]*\.(com.cn|net.cn|gov.cn|org.cn|com|net|cn|org|asia|tel|mobi|me|tv|biz|cc|name|info))</div>
<div>\//&quot;, $url, $ohurl);</div>
<div>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;#判断IP</div>
<div>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;if($ohurl[3] == ''){</div>
<div>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;preg_match(&quot;/((\d+\.){3}\d+)\//&quot;, $url, $ohip);</div>
<div>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;return $ohip[1];</div>
<div>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;}</div>
<div>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;return $ohurl[3];</div>
<div>}</div>]]></description>
			<link>http://www.jackfeng.com/archives/1365/</link>
			<category domain="http://www.jackfeng.com/category/16/">PHP</category>
			<pubDate>2009-11-13 13:58</pubDate>
		</item>
		<item>
			<guid>http://www.jackfeng.com/archives/1364/</guid>
			<title>PHP socket 网络编程实例[转]</title>
			<author>小锋</author>
			<description><![CDATA[小锋堂 ( http://www.jackfeng.com/ ) : <p><span class="Apple-style-span" style="font-family: Arial; font-size: 12px; line-height: 18px; -webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px; "><span style="line-height: normal; color: rgb(0, 0, 0); ">SERVER端</span><br style="line-height: normal; " />
<br style="line-height: normal; " />
<span style="line-height: normal; color: rgb(76, 131, 23); ">&lt;?php</span><br style="line-height: normal; " />
<span style="line-height: normal; color: rgb(170, 170, 170); font-style: italic; ">//确保在连接客户端时不会超时</span><br style="line-height: normal; " />
<span style="line-height: normal; color: rgb(0, 170, 170); ">set_time_limit</span>(<span style="line-height: normal; color: rgb(0, 153, 153); ">0</span>);<br style="line-height: normal; " />
<br style="line-height: normal; " />
<span style="line-height: normal; color: rgb(170, 170, 170); font-style: italic; ">//设置IP和端口号</span><br style="line-height: normal; " />
<span style="line-height: normal; color: rgb(170, 0, 0); ">$address</span><span style="line-height: normal; color: rgb(0, 0, 0); ">=</span><span style="line-height: normal; color: rgb(170, 85, 0); ">'127.0.0.1'</span>;<br style="line-height: normal; " />
<span style="line-height: normal; color: rgb(170, 0, 0); ">$port</span><span style="line-height: normal; color: rgb(0, 0, 0); ">=</span><span style="line-height: normal; color: rgb(0, 153, 153); ">2009</span>;&nbsp;&nbsp;&nbsp;&nbsp;<span style="line-height: normal; color: rgb(170, 170, 170); font-style: italic; ">//调试的时候，可以多换端口来测试程序！</span><br style="line-height: normal; " />
<br style="line-height: normal; " />
<span style="line-height: normal; color: rgb(170, 170, 170); font-style: italic; ">//创建一个SOCKET</span><br style="line-height: normal; " />
<span style="line-height: normal; color: rgb(0, 0, 170); ">if</span>((<span style="line-height: normal; color: rgb(170, 0, 0); ">$sock</span><span style="line-height: normal; color: rgb(0, 0, 0); ">=</span><span style="line-height: normal; color: rgb(0, 170, 170); ">socket_create</span>(<span style="line-height: normal; color: rgb(0, 0, 0); ">AF_INET</span><span style="line-height: normal; color: rgb(0, 0, 0); ">,</span><span style="line-height: normal; color: rgb(0, 0, 0); ">SOCK_STREAM</span><span style="line-height: normal; color: rgb(0, 0, 0); ">,</span><span style="line-height: normal; color: rgb(0, 0, 0); ">SOL_TCP</span>))<span style="line-height: normal; color: rgb(0, 0, 0); ">&lt;</span><span style="line-height: normal; color: rgb(0, 153, 153); ">0</span>)<br style="line-height: normal; " />
<span style="line-height: normal; color: rgb(0, 0, 0); ">{</span><br style="line-height: normal; " />
<span style="line-height: normal; color: rgb(0, 0, 170); ">echo</span>&nbsp;<span style="line-height: normal; color: rgb(170, 85, 0); ">&quot;socket_create() 失败的原因是:&quot;</span><span style="line-height: normal; color: rgb(0, 0, 0); ">.</span><span style="line-height: normal; color: rgb(0, 170, 170); ">socket_strerror</span>(<span style="line-height: normal; color: rgb(170, 0, 0); ">$sock</span>)<span style="line-height: normal; color: rgb(0, 0, 0); ">.</span><span style="line-height: normal; color: rgb(170, 85, 0); ">&quot;&lt;br&gt;&quot;</span>;<br style="line-height: normal; " />
<span style="line-height: normal; color: rgb(0, 0, 0); ">}</span><br style="line-height: normal; " />
<br style="line-height: normal; " />
<span style="line-height: normal; color: rgb(170, 170, 170); font-style: italic; ">//绑定到socket端口</span><br style="line-height: normal; " />
<span style="line-height: normal; color: rgb(0, 0, 170); ">if</span>((<span style="line-height: normal; color: rgb(170, 0, 0); ">$ret</span><span style="line-height: normal; color: rgb(0, 0, 0); ">=</span><span style="line-height: normal; color: rgb(0, 170, 170); ">socket_bind</span>(<span style="line-height: normal; color: rgb(170, 0, 0); ">$sock</span><span style="line-height: normal; color: rgb(0, 0, 0); ">,</span><span style="line-height: normal; color: rgb(170, 0, 0); ">$address</span><span style="line-height: normal; color: rgb(0, 0, 0); ">,</span><span style="line-height: normal; color: rgb(170, 0, 0); ">$port</span>))<span style="line-height: normal; color: rgb(0, 0, 0); ">&lt;</span><span style="line-height: normal; color: rgb(0, 153, 153); ">0</span>)<br style="line-height: normal; " />
<span style="line-height: normal; color: rgb(0, 0, 0); ">{</span><br style="line-height: normal; " />
<span style="line-height: normal; color: rgb(0, 0, 170); ">echo</span>&nbsp;<span style="line-height: normal; color: rgb(170, 85, 0); ">&quot;socket_bind() 失败的原因是:&quot;</span><span style="line-height: normal; color: rgb(0, 0, 0); ">.</span><span style="line-height: normal; color: rgb(0, 170, 170); ">socket_strerror</span>(<span style="line-height: normal; color: rgb(170, 0, 0); ">$ret</span>)<span style="line-height: normal; color: rgb(0, 0, 0); ">.</span><span style="line-height: normal; color: rgb(170, 85, 0); ">&quot;&lt;br&gt;&quot;</span>;<br style="line-height: normal; " />
<span style="line-height: normal; color: rgb(0, 0, 0); ">}</span><br style="line-height: normal; " />
<br style="line-height: normal; " />
<span style="line-height: normal; color: rgb(170, 170, 170); font-style: italic; ">//开始监听</span><br style="line-height: normal; " />
<span style="line-height: normal; color: rgb(0, 0, 170); ">if</span>((<span style="line-height: normal; color: rgb(170, 0, 0); ">$ret</span><span style="line-height: normal; color: rgb(0, 0, 0); ">=</span><span style="line-height: normal; color: rgb(0, 170, 170); ">socket_listen</span>(<span style="line-height: normal; color: rgb(170, 0, 0); ">$sock</span><span style="line-height: normal; color: rgb(0, 0, 0); ">,</span><span style="line-height: normal; color: rgb(0, 153, 153); ">4</span>))<span style="line-height: normal; color: rgb(0, 0, 0); ">&lt;</span><span style="line-height: normal; color: rgb(0, 153, 153); ">0</span>)<br style="line-height: normal; " />
<span style="line-height: normal; color: rgb(0, 0, 0); ">{</span><br style="line-height: normal; " />
<span style="line-height: normal; color: rgb(0, 0, 170); ">echo</span>&nbsp;<span style="line-height: normal; color: rgb(170, 85, 0); ">&quot;socket_listen() 失败的原因是:&quot;</span><span style="line-height: normal; color: rgb(0, 0, 0); ">.</span><span style="line-height: normal; color: rgb(0, 170, 170); ">socket_strerror</span>(<span style="line-height: normal; color: rgb(170, 0, 0); ">$ret</span>)<span style="line-height: normal; color: rgb(0, 0, 0); ">.</span><span style="line-height: normal; color: rgb(170, 85, 0); ">&quot;&lt;br&gt;&quot;</span>;<br style="line-height: normal; " />
<span style="line-height: normal; color: rgb(0, 0, 0); ">}</span><br style="line-height: normal; " />
<br style="line-height: normal; " />
<span style="line-height: normal; color: rgb(0, 0, 170); ">do</span>&nbsp;<span style="line-height: normal; color: rgb(0, 0, 0); ">{</span><br style="line-height: normal; " />
<span style="line-height: normal; color: rgb(0, 0, 170); ">if</span>&nbsp;((<span style="line-height: normal; color: rgb(170, 0, 0); ">$msgsock</span>&nbsp;<span style="line-height: normal; color: rgb(0, 0, 0); ">=</span>&nbsp;<span style="line-height: normal; color: rgb(0, 170, 170); ">socket_accept</span>(<span style="line-height: normal; color: rgb(170, 0, 0); ">$sock</span>))&nbsp;<span style="line-height: normal; color: rgb(0, 0, 0); ">&lt;</span>&nbsp;<span style="line-height: normal; color: rgb(0, 153, 153); ">0</span>)<br style="line-height: normal; " />
<span style="line-height: normal; color: rgb(0, 0, 0); ">{</span><br style="line-height: normal; " />
<span style="line-height: normal; color: rgb(0, 0, 170); ">echo</span>&nbsp;<span style="line-height: normal; color: rgb(170, 85, 0); ">&quot;socket_accept() failed: reason: &quot;</span>&nbsp;<span style="line-height: normal; color: rgb(0, 0, 0); ">.</span>&nbsp;<span style="line-height: normal; color: rgb(0, 170, 170); ">socket_strerror</span>(<span style="line-height: normal; color: rgb(170, 0, 0); ">$msgsock</span>)&nbsp;<span style="line-height: normal; color: rgb(0, 0, 0); ">.</span>&nbsp;<span style="line-height: normal; color: rgb(170, 85, 0); ">&quot;</span><span style="line-height: normal; color: rgb(170, 85, 0); ">\n</span><span style="line-height: normal; color: rgb(170, 85, 0); ">&quot;</span>;<br style="line-height: normal; " />
<span style="line-height: normal; color: rgb(0, 0, 170); ">break</span>;<br style="line-height: normal; " />
<span style="line-height: normal; color: rgb(0, 0, 0); ">}</span><br style="line-height: normal; " />
<br style="line-height: normal; " />
<span style="line-height: normal; color: rgb(170, 170, 170); font-style: italic; ">//发到客户端</span><br style="line-height: normal; " />
<span style="line-height: normal; color: rgb(170, 0, 0); ">$msg</span>&nbsp;<span style="line-height: normal; color: rgb(0, 0, 0); ">=</span><span style="line-height: normal; color: rgb(170, 85, 0); ">&quot;&lt;font color=red&gt;欢迎进入服务器！&lt;/font&gt;&lt;br&gt;&quot;</span>;<br style="line-height: normal; " />
<span style="line-height: normal; color: rgb(0, 170, 170); ">socket_write</span>(<span style="line-height: normal; color: rgb(170, 0, 0); ">$msgsock</span><span style="line-height: normal; color: rgb(0, 0, 0); ">,</span>&nbsp;<span style="line-height: normal; color: rgb(170, 0, 0); ">$msg</span><span style="line-height: normal; color: rgb(0, 0, 0); ">,</span>&nbsp;<span style="line-height: normal; color: rgb(0, 170, 170); ">strlen</span>(<span style="line-height: normal; color: rgb(170, 0, 0); ">$msg</span>));<br style="line-height: normal; " />
<br style="line-height: normal; " />
<span style="line-height: normal; color: rgb(0, 0, 170); ">echo</span>&nbsp;<span style="line-height: normal; color: rgb(170, 85, 0); ">&quot;读取客户端发来的信息&lt;br&gt;&quot;</span>;<br style="line-height: normal; " />
<span style="line-height: normal; color: rgb(170, 0, 0); ">$buf</span><span style="line-height: normal; color: rgb(0, 0, 0); ">&nbsp;=</span><span style="line-height: normal; color: rgb(0, 170, 170); ">&nbsp;socket_read</span>(<span style="line-height: normal; color: rgb(170, 0, 0); ">$msgsock</span><span style="line-height: normal; color: rgb(0, 0, 0); ">,</span><span style="line-height: normal; color: rgb(0, 153, 153); ">8192</span>);<br style="line-height: normal; " />
<br style="line-height: normal; " />
<br style="line-height: normal; " />
<span style="line-height: normal; color: rgb(170, 0, 0); ">$talkback</span>&nbsp;<span style="line-height: normal; color: rgb(0, 0, 0); ">=</span>&nbsp;<span style="line-height: normal; color: rgb(170, 85, 0); ">&quot;收到的信息:</span><span style="line-height: normal; color: rgb(170, 85, 0); ">$buf</span><span style="line-height: normal; color: rgb(170, 85, 0); ">&lt;br&gt;&quot;</span>;<br style="line-height: normal; " />
<span style="line-height: normal; color: rgb(0, 0, 170); ">echo</span>&nbsp;<span style="line-height: normal; color: rgb(170, 0, 0); ">$talkback</span>;<br style="line-height: normal; " />
<span style="line-height: normal; color: rgb(170, 170, 170); font-style: italic; ">/* if(socket_write($msgsock, $talkback, strlen($talkback))&lt;0)</span><br style="line-height: normal; " />
<span style="line-height: normal; color: rgb(170, 170, 170); font-style: italic; ">&nbsp;&nbsp;&nbsp;&nbsp; {</span><br style="line-height: normal; " />
<span style="line-height: normal; color: rgb(170, 170, 170); font-style: italic; ">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; echo &quot;socket_write() failed: reason: &quot; . socket_strerror($msgsock) . &quot;\n&quot;;</span><br style="line-height: normal; " />
<span style="line-height: normal; color: rgb(170, 170, 170); font-style: italic; ">&nbsp;&nbsp;&nbsp;&nbsp; }</span><br style="line-height: normal; " />
<span style="line-height: normal; color: rgb(170, 170, 170); font-style: italic; ">&nbsp;&nbsp;&nbsp;&nbsp; else</span><br style="line-height: normal; " />
<span style="line-height: normal; color: rgb(170, 170, 170); font-style: italic; ">&nbsp;&nbsp;&nbsp;&nbsp; {</span><br style="line-height: normal; " />
<span style="line-height: normal; color: rgb(170, 170, 170); font-style: italic; ">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; echo &quot;发送成功&quot;;</span><br style="line-height: normal; " />
<span style="line-height: normal; color: rgb(170, 170, 170); font-style: italic; ">&nbsp;&nbsp;&nbsp;&nbsp; }*/</span><br style="line-height: normal; " />
<br style="line-height: normal; " />
<br style="line-height: normal; " />
<span style="line-height: normal; color: rgb(170, 170, 170); font-style: italic; ">//echo $buf;</span><br style="line-height: normal; " />
<span style="line-height: normal; color: rgb(0, 170, 170); ">socket_close</span>(<span style="line-height: normal; color: rgb(170, 0, 0); ">$msgsock</span>);<br style="line-height: normal; " />
<span style="line-height: normal; color: rgb(0, 0, 0); ">}</span>&nbsp;<span style="line-height: normal; color: rgb(0, 0, 170); ">while</span>&nbsp;(<span style="line-height: normal; color: rgb(0, 0, 170); ">true</span>);<br style="line-height: normal; " />
<br style="line-height: normal; " />
<span style="line-height: normal; color: rgb(0, 170, 170); ">socket_close</span>(<span style="line-height: normal; color: rgb(170, 0, 0); ">$sock</span>);<br style="line-height: normal; " />
<span style="line-height: normal; color: rgb(76, 131, 23); ">?&gt;</span><br style="line-height: normal; " />
<br style="line-height: normal; " />
<br style="line-height: normal; " />
<br style="line-height: normal; " />
<br style="line-height: normal; " />
<span style="line-height: normal; color: rgb(0, 0, 0); ">CLIENT端</span><br style="line-height: normal; " />
<br style="line-height: normal; " />
<br style="line-height: normal; " />
<span style="line-height: normal; color: rgb(76, 131, 23); ">&lt;?php</span><br style="line-height: normal; " />
<span style="line-height: normal; color: rgb(0, 170, 170); ">error_reporting</span>(<span style="line-height: normal; color: rgb(0, 0, 170); ">E_ALL</span>);<br style="line-height: normal; " />
<span style="line-height: normal; color: rgb(0, 170, 170); ">set_time_limit</span>(<span style="line-height: normal; color: rgb(0, 153, 153); ">0</span>);<br style="line-height: normal; " />
<span style="line-height: normal; color: rgb(0, 0, 170); ">echo</span>&nbsp;<span style="line-height: normal; color: rgb(170, 85, 0); ">&quot;&lt;h2&gt;TCP/IP Connection&lt;/h2&gt;</span><span style="line-height: normal; color: rgb(170, 85, 0); ">\n</span><span style="line-height: normal; color: rgb(170, 85, 0); ">&quot;</span>;<br style="line-height: normal; " />
<br style="line-height: normal; " />
<span style="line-height: normal; color: rgb(170, 0, 0); ">$service_port</span>&nbsp;<span style="line-height: normal; color: rgb(0, 0, 0); ">=</span>&nbsp;<span style="line-height: normal; color: rgb(0, 153, 153); ">2009</span>;<br style="line-height: normal; " />
<span style="line-height: normal; color: rgb(170, 0, 0); ">$address</span>&nbsp;<span style="line-height: normal; color: rgb(0, 0, 0); ">=</span>&nbsp;<span style="line-height: normal; color: rgb(170, 85, 0); ">&quot;127.0.0.1&quot;</span>;<br style="line-height: normal; " />
<br style="line-height: normal; " />
<br style="line-height: normal; " />
<span style="line-height: normal; color: rgb(170, 0, 0); ">$socket</span>&nbsp;<span style="line-height: normal; color: rgb(0, 0, 0); ">=</span>&nbsp;<span style="line-height: normal; color: rgb(0, 170, 170); ">socket_create</span>(<span style="line-height: normal; color: rgb(0, 0, 0); ">AF_INET</span><span style="line-height: normal; color: rgb(0, 0, 0); ">,</span>&nbsp;<span style="line-height: normal; color: rgb(0, 0, 0); ">SOCK_STREAM</span><span style="line-height: normal; color: rgb(0, 0, 0); ">,</span>&nbsp;<span style="line-height: normal; color: rgb(0, 0, 0); ">SOL_TCP</span>);<br style="line-height: normal; " />
<span style="line-height: normal; color: rgb(0, 0, 170); ">if</span>&nbsp;(<span style="line-height: normal; color: rgb(170, 0, 0); ">$socket</span>&nbsp;<span style="line-height: normal; color: rgb(0, 0, 0); ">&lt;</span>&nbsp;<span style="line-height: normal; color: rgb(0, 153, 153); ">0</span>)<br style="line-height: normal; " />
<span style="line-height: normal; color: rgb(0, 0, 0); ">{</span><br style="line-height: normal; " />
<span style="line-height: normal; color: rgb(0, 0, 170); ">echo</span>&nbsp;<span style="line-height: normal; color: rgb(170, 85, 0); ">&quot;socket_create() failed: reason: &quot;</span>&nbsp;<span style="line-height: normal; color: rgb(0, 0, 0); ">.</span>&nbsp;<span style="line-height: normal; color: rgb(0, 170, 170); ">socket_strerror</span>(<span style="line-height: normal; color: rgb(170, 0, 0); ">$socket</span>)&nbsp;<span style="line-height: normal; color: rgb(0, 0, 0); ">.</span>&nbsp;<span style="line-height: normal; color: rgb(170, 85, 0); ">&quot;</span><span style="line-height: normal; color: rgb(170, 85, 0); ">\n</span><span style="line-height: normal; color: rgb(170, 85, 0); ">&quot;</span>;<br style="line-height: normal; " />
<span style="line-height: normal; color: rgb(0, 0, 0); ">}</span><br style="line-height: normal; " />
<span style="line-height: normal; color: rgb(0, 0, 170); ">else</span><br style="line-height: normal; " />
<span style="line-height: normal; color: rgb(0, 0, 0); ">{</span><br style="line-height: normal; " />
<span style="line-height: normal; color: rgb(0, 0, 170); ">echo</span>&nbsp;<span style="line-height: normal; color: rgb(170, 85, 0); ">&quot;OK.</span><span style="line-height: normal; color: rgb(170, 85, 0); ">\n</span><span style="line-height: normal; color: rgb(170, 85, 0); ">&quot;</span>;<br style="line-height: normal; " />
<span style="line-height: normal; color: rgb(0, 0, 0); ">}</span><br style="line-height: normal; " />
<br style="line-height: normal; " />
<span style="line-height: normal; color: rgb(0, 0, 170); ">echo</span>&nbsp;<span style="line-height: normal; color: rgb(170, 85, 0); ">&quot;试图连接 '</span><span style="line-height: normal; color: rgb(170, 85, 0); ">$address</span><span style="line-height: normal; color: rgb(170, 85, 0); ">' 端口 '</span><span style="line-height: normal; color: rgb(170, 85, 0); ">$service_port</span><span style="line-height: normal; color: rgb(170, 85, 0); ">'...&lt;br&gt;&quot;</span>;<br style="line-height: normal; " />
<span style="line-height: normal; color: rgb(170, 0, 0); ">$result</span>&nbsp;<span style="line-height: normal; color: rgb(0, 0, 0); ">=</span>&nbsp;<span style="line-height: normal; color: rgb(0, 170, 170); ">socket_connect</span>(<span style="line-height: normal; color: rgb(170, 0, 0); ">$socket</span><span style="line-height: normal; color: rgb(0, 0, 0); ">,</span>&nbsp;<span style="line-height: normal; color: rgb(170, 0, 0); ">$address</span><span style="line-height: normal; color: rgb(0, 0, 0); ">,</span>&nbsp;<span style="line-height: normal; color: rgb(170, 0, 0); ">$service_port</span>);<br style="line-height: normal; " />
<span style="line-height: normal; color: rgb(0, 0, 170); ">if</span>&nbsp;(<span style="line-height: normal; color: rgb(170, 0, 0); ">$result</span>&nbsp;<span style="line-height: normal; color: rgb(0, 0, 0); ">&lt;</span>&nbsp;<span style="line-height: normal; color: rgb(0, 153, 153); ">0</span>)<br style="line-height: normal; " />
<span style="line-height: normal; color: rgb(0, 0, 0); ">{</span><br style="line-height: normal; " />
<span style="line-height: normal; color: rgb(0, 0, 170); ">echo</span>&nbsp;<span style="line-height: normal; color: rgb(170, 85, 0); ">&quot;socket_connect() failed.</span><span style="line-height: normal; color: rgb(170, 85, 0); ">\n</span><span style="line-height: normal; color: rgb(170, 85, 0); ">Reason: (</span><span style="line-height: normal; color: rgb(170, 85, 0); ">$result</span><span style="line-height: normal; color: rgb(170, 85, 0); ">) &quot;</span>&nbsp;<span style="line-height: normal; color: rgb(0, 0, 0); ">.</span>&nbsp;<span style="line-height: normal; color: rgb(0, 170, 170); ">socket_strerror</span>(<span style="line-height: normal; color: rgb(170, 0, 0); ">$result</span>)&nbsp;<span style="line-height: normal; color: rgb(0, 0, 0); ">.</span>&nbsp;<span style="line-height: normal; color: rgb(170, 85, 0); ">&quot;</span><span style="line-height: normal; color: rgb(170, 85, 0); ">\n</span><span style="line-height: normal; color: rgb(170, 85, 0); ">&quot;</span>;<br style="line-height: normal; " />
<span style="line-height: normal; color: rgb(0, 0, 0); ">}</span><br style="line-height: normal; " />
<span style="line-height: normal; color: rgb(0, 0, 170); ">else</span><br style="line-height: normal; " />
<span style="line-height: normal; color: rgb(0, 0, 0); ">{</span><br style="line-height: normal; " />
<span style="line-height: normal; color: rgb(0, 0, 170); ">echo</span>&nbsp;<span style="line-height: normal; color: rgb(170, 85, 0); ">&quot;连接OK&lt;br&gt;&quot;</span>;<br style="line-height: normal; " />
<span style="line-height: normal; color: rgb(0, 0, 0); ">}</span><br style="line-height: normal; " />
<br style="line-height: normal; " />
<span style="line-height: normal; color: rgb(170, 0, 0); ">$in</span>&nbsp;<span style="line-height: normal; color: rgb(0, 0, 0); ">=</span>&nbsp;<span style="line-height: normal; color: rgb(170, 85, 0); ">&quot;Hello</span><span style="line-height: normal; color: rgb(170, 85, 0); ">\r\n</span><span style="line-height: normal; color: rgb(170, 85, 0); ">&quot;</span>;<br style="line-height: normal; " />
<span style="line-height: normal; color: rgb(170, 0, 0); ">$in</span>&nbsp;<span style="line-height: normal; color: rgb(0, 0, 0); ">.=</span>&nbsp;<span style="line-height: normal; color: rgb(170, 85, 0); ">&quot;我是Chester</span><span style="line-height: normal; color: rgb(170, 85, 0); ">\r\n</span><span style="line-height: normal; color: rgb(170, 85, 0); ">&quot;</span>;<br style="line-height: normal; " />
<span style="line-height: normal; color: rgb(170, 0, 0); ">$out</span>&nbsp;<span style="line-height: normal; color: rgb(0, 0, 0); ">=</span>&nbsp;<span style="line-height: normal; color: rgb(170, 85, 0); ">''</span>;<br style="line-height: normal; " />
<span style="line-height: normal; color: rgb(170, 0, 0); ">$out1</span><span style="line-height: normal; color: rgb(0, 0, 0); ">=</span><span style="line-height: normal; color: rgb(170, 85, 0); ">''</span>;<br style="line-height: normal; " />
<br style="line-height: normal; " />
<br style="line-height: normal; " />
<span style="line-height: normal; color: rgb(0, 0, 170); ">if</span>(<span style="line-height: normal; color: rgb(0, 0, 0); ">!</span><span style="line-height: normal; color: rgb(0, 170, 170); ">socket_write</span>(<span style="line-height: normal; color: rgb(170, 0, 0); ">$socket</span><span style="line-height: normal; color: rgb(0, 0, 0); ">,</span>&nbsp;<span style="line-height: normal; color: rgb(170, 0, 0); ">$in</span><span style="line-height: normal; color: rgb(0, 0, 0); ">,</span>&nbsp;<span style="line-height: normal; color: rgb(0, 170, 170); ">strlen</span>(<span style="line-height: normal; color: rgb(170, 0, 0); ">$in</span>)))<br style="line-height: normal; " />
<span style="line-height: normal; color: rgb(0, 0, 0); ">{</span><br style="line-height: normal; " />
<span style="line-height: normal; color: rgb(0, 0, 170); ">echo</span>&nbsp;<span style="line-height: normal; color: rgb(170, 85, 0); ">&quot;socket_write() failed: reason: &quot;</span>&nbsp;<span style="line-height: normal; color: rgb(0, 0, 0); ">.</span>&nbsp;<span style="line-height: normal; color: rgb(0, 170, 170); ">socket_strerror</span>(<span style="line-height: normal; color: rgb(170, 0, 0); ">$socket</span>)&nbsp;<span style="line-height: normal; color: rgb(0, 0, 0); ">.</span>&nbsp;<span style="line-height: normal; color: rgb(170, 85, 0); ">&quot;</span><span style="line-height: normal; color: rgb(170, 85, 0); ">\n</span><span style="line-height: normal; color: rgb(170, 85, 0); ">&quot;</span>;<br style="line-height: normal; " />
<span style="line-height: normal; color: rgb(0, 0, 0); ">}</span><br style="line-height: normal; " />
<span style="line-height: normal; color: rgb(0, 0, 170); ">else</span><br style="line-height: normal; " />
<span style="line-height: normal; color: rgb(0, 0, 0); ">{</span><br style="line-height: normal; " />
<span style="line-height: normal; color: rgb(0, 0, 170); ">echo</span>&nbsp;<span style="line-height: normal; color: rgb(170, 85, 0); ">&quot;发送到服务器信息成功！&lt;br&gt;&quot;</span>;<br style="line-height: normal; " />
<span style="line-height: normal; color: rgb(0, 0, 170); ">echo</span>&nbsp;<span style="line-height: normal; color: rgb(170, 85, 0); ">&quot;发送的内容为:&lt;font color='red'&gt;</span><span style="line-height: normal; color: rgb(170, 85, 0); ">$in</span><span style="line-height: normal; color: rgb(170, 85, 0); ">&lt;/font&gt; &lt;br&gt;&quot;</span>;<br style="line-height: normal; " />
<span style="line-height: normal; color: rgb(0, 0, 0); ">}</span><br style="line-height: normal; " />
<br style="line-height: normal; " />
<span style="line-height: normal; color: rgb(0, 0, 170); ">while</span>(<span style="line-height: normal; color: rgb(170, 0, 0); ">$out</span>&nbsp;<span style="line-height: normal; color: rgb(0, 0, 0); ">=</span>&nbsp;<span style="line-height: normal; color: rgb(0, 170, 170); ">socket_read</span>(<span style="line-height: normal; color: rgb(170, 0, 0); ">$socket</span><span style="line-height: normal; color: rgb(0, 0, 0); ">,</span>&nbsp;<span style="line-height: normal; color: rgb(0, 153, 153); ">8192</span>))<br style="line-height: normal; " />
<span style="line-height: normal; color: rgb(0, 0, 0); ">{</span><br style="line-height: normal; " />
<span style="line-height: normal; color: rgb(0, 0, 170); ">echo</span>&nbsp;<span style="line-height: normal; color: rgb(170, 85, 0); ">&quot;接收服务器回传信息成功！&lt;br&gt;&quot;</span>;<br style="line-height: normal; " />
<span style="line-height: normal; color: rgb(0, 0, 170); ">echo</span>&nbsp;<span style="line-height: normal; color: rgb(170, 85, 0); ">&quot;接受的内容为:&quot;</span><span style="line-height: normal; color: rgb(0, 0, 0); ">,</span><span style="line-height: normal; color: rgb(170, 0, 0); ">$out</span>;<br style="line-height: normal; " />
<span style="line-height: normal; color: rgb(0, 0, 0); ">}</span><br style="line-height: normal; " />
<br style="line-height: normal; " />
<br style="line-height: normal; " />
<span style="line-height: normal; color: rgb(0, 0, 170); ">echo</span>&nbsp;<span style="line-height: normal; color: rgb(170, 85, 0); ">&quot;关闭SOCKET...&lt;br&gt;&quot;</span>;<br style="line-height: normal; " />
<span style="line-height: normal; color: rgb(0, 170, 170); ">socket_close</span>(<span style="line-height: normal; color: rgb(170, 0, 0); ">$socket</span>);<br style="line-height: normal; " />
<span style="line-height: normal; color: rgb(0, 0, 170); ">echo</span>&nbsp;<span style="line-height: normal; color: rgb(170, 85, 0); ">&quot;关闭OK&lt;br&gt;&quot;</span>;<br style="line-height: normal; " />
<span style="line-height: normal; color: rgb(76, 131, 23); ">?&gt;</span><br style="line-height: normal; " />
先运行server.php</span>&nbsp;</p><br /><br /><b>图片附件:</b><br /><a href="http://www.jackfeng.com/attachment.php?id=769" target="_blank"><img src="http://www.jackfeng.com/attachments//date_200910/cf81e505e46f54975c404674b66139e6.jpg" border="0" alt="大小: 36.03 K&#13;尺寸: 331 x 92&#13;浏览: 153 次&#13;点击打开新窗口浏览全图" width="331" height="92" /></a><br /><br /><b>图片附件:</b><br /><a href="http://www.jackfeng.com/attachment.php?id=770" target="_blank"><img src="http://www.jackfeng.com/attachments//date_200910/3645e829ba6fa51a31fa26fd2b33cb7c.jpg" border="0" alt="大小: 94.69 K&#13;尺寸: 115 x 92&#13;浏览: 157 次&#13;点击打开新窗口浏览全图" width="115" height="92" /></a>]]></description>
			<link>http://www.jackfeng.com/archives/1364/</link>
			<category domain="http://www.jackfeng.com/category/16/">PHP</category>
			<pubDate>2009-10-11 15:21</pubDate>
		</item>
		<item>
			<guid>http://www.jackfeng.com/archives/1363/</guid>
			<title>网卡配置内容解析</title>
			<author>小锋</author>
			<description><![CDATA[小锋堂 ( http://www.jackfeng.com/ ) : <div>/etc/sysconfig/network-scripts/ifcfg-&lt;interface-name&gt;, /etc/sysconfig/network-scripts/ifcfg-&lt;interface-name&gt;-&lt;clone-name&gt;</div>
<div>&nbsp;</div>
<div>--第一个文件定义了一接口信息，第二个文件用以定义与一个&ldquo;克隆&rdquo;（也就是第二可用的）接口配置不同的信息。举个例子，除了网络号不同外，也许别的都一样，于是&ldquo;克隆&rdquo;的文件中只包含有网络号，而所有的设备信息都被放在基本的ifcfg 文件中。</div>
<div>&nbsp;</div>
<div>ifcfg文件中可以定义的条目与接口类型有关。</div>
<div>&nbsp;</div>
<div>以下各值常见于所有的基本配置文件中：</div>
<div>&nbsp;</div>
<div>DEVICE=name,这里name是物理设备的名字（动态分配的PPP设备应当除外，它的名字是&ldquo;逻辑名&rdquo;。</div>
<div>IPADDR=addr, 这里addr是IP地址。</div>
<div>NETMASK=mask, 这里mask是网络掩码。</div>
<div>NETWORK=addr, 这里addr是网络地址。</div>
<div>BROADCAST=addr, 这里addr是广播地址。</div>
<div>GATEWAY=addr, 这里addr是网关地址。</div>
<div>ONBOOT=answer, 这里answer取下列值之一：</div>
<div>yes -- 该设备将在boot时被激活。</div>
<div>no -- 该设备不在boot时激活。</div>
<div>USERCTL=answer, 这里answer取下列值之一：</div>
<div>yes --非root用户可以控制该设备。</div>
<div>no -- 非root用户不允许控制该设备。</div>
<div>BOOTPROTO=proto, 这里proto取下列值之一：</div>
<div>none -- 不使用boot时协议。</div>
<div>bootp -- 使用bootp协议。</div>
<div>dhcp --使用dhcp协议。</div>
<div>以下是所有PPP和SLIP文件所使用的数值：</div>
<div>&nbsp;</div>
<div>PERSIST=answer, 这里answer取下列值之一：</div>
<div>yes --该设备将一直维持激活态，即便是modem被挂断而导致非激活态。</div>
<div>no -- 该设备不一直维持激活态。</div>
<div>MODEMPORT=port, 这里port是modem端口的设备名称（如&ldquo;/dev/modem&rdquo;）。</div>
<div>LINESPEED=baud, baud是modem的线速率（例如，&quot;115200&quot;）。</div>
<div>DEFABORT=answer, 这里answer取下列值之一：</div>
<div>yes -- 在创建或编辑该接口的脚本时插入默认的终止字符串。</div>
<div>no -- 在创建或编辑该接口的脚本时不要插入默认的终止字符串。</div>
<div>以下数值适用于所有的PPP文件：</div>
<div>&nbsp;</div>
<div>DEFROUTE=answer, 这里answer取下列值之一：</div>
<div>yes -- 将该接口设置为默认路由。</div>
<div>no -- 不要将该接口设置为默认路由。</div>
<div>ESCAPECHARS=answer, 这里answer取下列值之一：</div>
<div>yes -- 使用预定义的asyncmap。</div>
<div>no -- 不要使用预定义的asyncmap。</div>
<div>（这里代表了一种简化的接口；它不让用户指定使用escape字符。然而，几乎任何情况下都可以使用一个00000000的asyncmap,而且如果需要的话，可以通过设置 PPPOPTIONS来使用任意的asyncmap.）</div>
<div>&nbsp;</div>
<div>HARDFLOWCTL=answer, 这里answer取下列值之一：</div>
<div>yes -- 使用硬件流控制。</div>
<div>no -- 不使用硬件流控制。</div>
<div>PPPOPTIONS=options,这里options是任意的选项字符串。它被放置在命令行的末尾，以覆盖前面的选项（如asyncmap）。</div>
<div>PAPNAME=name,这里name是pppd命令行中&ldquo;name $PAPNAME&rdquo;的一部分。</div>
<div>注意选项&ldquo;remotename&rdquo;总是指定为逻辑ppp设备名，如&ldquo;ppp0&rdquo;（如果先前有其它ppp设备被激活的话，这就可能是物理设备ppp1）这样做便于管理pap/chap 文件--name/passwd对与逻辑ppp设备名关联，因此它们可以被一起管理。理论上说，为逻辑PPP设备起除&ldquo;ppp0&rdquo;--&ldquo;pppN&rdquo;之外的如&ldquo;worldnet&rdquo;或&rdquo;myISP&ldquo; 的名字是可行的。</div>
<div>&nbsp;</div>
<div>REMIP=addr, 这里addr设置为远端的ip地址（通常不加以指定）</div>
<div>MTU=value, 这里value是MTU的数值。</div>
<div>MRU=value, 这里value设置为MRU的值。</div>
<div>DISCONNECTTIMEOUT=value,这里value表示当一个成功的连接被终止后要等多少秒后再进行连接。</div>
<div>RETRYTIMEOUT=value, 这里value指企图连接失败后要等多少秒之后以进行下一次连接。</div>
<div>&nbsp;</div>
<p><span class="Apple-style-span" style="font-family: Georgia; font-size: 12px; line-height: 20px; color: rgb(213, 213, 213); -webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px; ">
<h5 style="line-height: normal; "><span class="Apple-style-span" style="font-weight: normal; line-height: 20px; ">
<ul style="line-height: normal; ">
    <div><b>
    <div>&nbsp;</div>
    </b></div>
</ul>
</span></h5>
</span></p>]]></description>
			<link>http://www.jackfeng.com/archives/1363/</link>
			<category domain="http://www.jackfeng.com/category/20/">Linux</category>
			<pubDate>2009-10-08 13:54</pubDate>
		</item>
		<item>
			<guid>http://www.jackfeng.com/archives/1362/</guid>
			<title>vi没有颜色</title>
			<author>小锋</author>
			<description><![CDATA[小锋堂 ( http://www.jackfeng.com/ ) : <p>检查<span class="Apple-style-span" style="font-family: song, Verdana; font-size: 12px; line-height: normal; border-collapse: collapse; ">rpm -qa|grep vim是否有下面的三个东西<br style="font: normal normal normal 12px/normal song, Verdana; " />
vim-minimal-6.1-29<br style="font: normal normal normal 12px/normal song, Verdana; " />
vim-common-6.1-29<br style="font: normal normal normal 12px/normal song, Verdana; " />
vim-enhanced-6.1-29</span></p>
<p>如果没有就&nbsp;<span class="Apple-style-span" style="font-family: song, Verdana; font-size: 12px; line-height: normal; border-collapse: collapse; ">yum -y install vim-enhanced</span></p>
<p>如果有了试下下面的命令 就行了</p>
<p><span class="Apple-style-span" style="font-family: song, Verdana; font-size: 12px; line-height: normal; border-collapse: collapse; ">mv /bin/vi /bin/vi.bak<br style="font: normal normal normal 12px/normal song, Verdana; " />
ln -s /usr/bin/vim /bin/vi</span></p>]]></description>
			<link>http://www.jackfeng.com/archives/1362/</link>
			<category domain="http://www.jackfeng.com/category/20/">Linux</category>
			<pubDate>2009-10-08 13:12</pubDate>
		</item>
		<item>
			<guid>http://www.jackfeng.com/archives/1361/</guid>
			<title>delphi idhttp访问https需要增加IdSSLIOHandlerSocketOpenSSL1</title>
			<author>小锋</author>
			<description><![CDATA[小锋堂 ( http://www.jackfeng.com/ ) : <p>&nbsp;</p>
<p>加载https的站点页面内容的时候记得在窗体上加上IdSSLIOHandlerSocketOpenSSL1</p>
<p>以及idhttp里面IOHandler为IdSSLIOHandlerSocketOpenSSL1</p>
<p>不然老报错IOHandler value is not valid.错..</p>]]></description>
			<link>http://www.jackfeng.com/archives/1361/</link>
			<category domain="http://www.jackfeng.com/category/12/">DELPHI</category>
			<pubDate>2009-08-09 18:51</pubDate>
		</item>
		<item>
			<guid>http://www.jackfeng.com/archives/1360/</guid>
			<title>awk命令详解</title>
			<author>小锋</author>
			<description><![CDATA[小锋堂 ( http://www.jackfeng.com/ ) : <div class="tit">awk 在linux下是个好东西so cool&hellip;&hellip;</div><br /><br /><a href="http://www.jackfeng.com/archives/1360/" target="_blank">阅读全文</a><br /><br />]]></description>
			<link>http://www.jackfeng.com/archives/1360/</link>
			<category domain="http://www.jackfeng.com/category/20/">Linux</category>
			<pubDate>2009-07-26 15:13</pubDate>
		</item>
		<item>
			<guid>http://www.jackfeng.com/archives/1359/</guid>
			<title>linux 合并文件命令</title>
			<author>小锋</author>
			<description><![CDATA[小锋堂 ( http://www.jackfeng.com/ ) : <p>paste a.log_ b.log &gt;jackfeng.log</p>
<p>这个速度要快多了嘿嘿比cat&nbsp; a.log b.log &gt; jackfeng.log快</p>]]></description>
			<link>http://www.jackfeng.com/archives/1359/</link>
			<category domain="http://www.jackfeng.com/category/20/">Linux</category>
			<pubDate>2009-07-15 23:07</pubDate>
		</item>
		<item>
			<guid>http://www.jackfeng.com/archives/1358/</guid>
			<title>504 Gateway Time-out(nginx)</title>
			<author>小锋</author>
			<description><![CDATA[小锋堂 ( http://www.jackfeng.com/ ) : <div class="entry">
<p>在nginx.conf配置里加入：</p>
<p><font color="#ff0000">fastcgi_buffers 8 128k;</font></p>
<p><font color="#ff0000">send_timeout 60;</font></p>
<p>注意添加位置在</p>
<p>http{&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }</p>
<p>里，否则不工作</p>
<p>如下上面的设置后还是有504 Gateway Time-out错误，则继续修改添加以下部分</p>
<p>http{</p>
<p>&hellip;&hellip;&hellip;&hellip;&hellip;&hellip;</p>
<p><font color="#ff0000">fastcgi_connect_timeout 300;<br />
&nbsp;&nbsp; fastcgi_send_timeout 300;<br />
&nbsp;&nbsp; fastcgi_read_timeout 300;<br />
&nbsp;&nbsp; fastcgi_buffer_size 64k;<br />
&nbsp;&nbsp; fastcgi_buffers 4 64k;<br />
&nbsp;&nbsp; fastcgi_busy_buffers_size 128k;<br />
&nbsp;&nbsp; fastcgi_temp_file_write_size 128k;</font><br />
<br />
&hellip;&hellip;&hellip;&hellip;&hellip;&hellip;</p>
<p>}</p>
</div>]]></description>
			<link>http://www.jackfeng.com/archives/1358/</link>
			<category domain="http://www.jackfeng.com/category/20/">Linux</category>
			<pubDate>2009-06-25 16:48</pubDate>
		</item>
		<item>
			<guid>http://www.jackfeng.com/archives/1357/</guid>
			<title>init 0 init1 init 3 init 5 init 6 这几个启动级别</title>
			<author>小锋</author>
			<description><![CDATA[小锋堂 ( http://www.jackfeng.com/ ) : <pre>
0：停机
1：单用户形式，只root进行维护
2：多用户，不能使用net file system
3：完全多用户
5：图形化
6：重启 </pre>
<p>&nbsp;</p>]]></description>
			<link>http://www.jackfeng.com/archives/1357/</link>
			<category domain="http://www.jackfeng.com/category/20/">Linux</category>
			<pubDate>2009-06-20 01:02</pubDate>
		</item>
		<item>
			<guid>http://www.jackfeng.com/archives/1356/</guid>
			<title>iframe高度自适应</title>
			<author>小锋</author>
			<description><![CDATA[小锋堂 ( http://www.jackfeng.com/ ) : <p>
<table cellspacing="0" cellpadding="0">
    <tbody>
        <tr>
            <td class="t_msgfont" id="postmessage_54223">&lt;!DOCTYPE html PUBLIC &quot;-//W3C//DTD XHTML 1.0 Transitional//EN&quot; &quot;http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd&quot;&gt;<br />
            &lt;html xmlns=&quot;http://www.w3.org/1999/xhtml&quot;&gt;<br />
            &lt;head&gt;<br />
            &lt;meta http-equiv=&quot;Content-Type&quot; content=&quot;text/html; charset=utf-8&quot; /&gt;<br />
            &lt;title&gt;无标题文档&lt;/title&gt;<br />
            &lt;style&gt;<br />
            html,body{height:100%; width:100%;overflow:hidden; margin:0; padding:0}<br />
            &lt;/style&gt;<br />
            &lt;/head&gt;<br />
            &lt;body&gt;<br />
            &lt;div style=&quot;height:100%; width:100%&quot;&gt;<br />
            &nbsp; &nbsp; &nbsp; &nbsp; &lt;iframe height=&quot;100%&quot; src=&quot;http://www.blueidea.com/&quot; id=&quot;iframeOpenPage&quot; name=&quot;iframeOpenPage&quot;&nbsp;&nbsp;frameborder=&quot;0&quot; height=&quot;100%&quot; width=&quot;100%&quot; /&gt;<br />
            &lt;/div&gt;<br />
            &lt;/body&gt;<br />
            &lt;/html&gt;<br />
            &nbsp; &nbsp; 提示：您可以先修改部分代码再运行</td>
        </tr>
    </tbody>
</table>
</p>]]></description>
			<link>http://www.jackfeng.com/archives/1356/</link>
			<category domain="http://www.jackfeng.com/category/11/">ASP</category>
			<pubDate>2009-06-16 01:18</pubDate>
		</item>
		<item>
			<guid>http://www.jackfeng.com/archives/1355/</guid>
			<title>删除MYSQl BIN-LOG 日志</title>
			<author>小锋</author>
			<description><![CDATA[小锋堂 ( http://www.jackfeng.com/ ) : <p>在mysql下如下查看然后删除000018之前的文件</p>
<p>show binary logs;</p>
<p>purge binary logs to 'mysql-bin.000018';</p>]]></description>
			<link>http://www.jackfeng.com/archives/1355/</link>
			<category domain="http://www.jackfeng.com/category/25/">SQL</category>
			<pubDate>2009-06-09 03:42</pubDate>
		</item>
		<item>
			<guid>http://www.jackfeng.com/archives/1354/</guid>
			<title>bash的判断</title>
			<author>小锋</author>
			<description><![CDATA[小锋堂 ( http://www.jackfeng.com/ ) : <p>qi</p><br /><br /><a href="http://www.jackfeng.com/archives/1354/" target="_blank">阅读全文</a><br /><br />]]></description>
			<link>http://www.jackfeng.com/archives/1354/</link>
			<category domain="http://www.jackfeng.com/category/20/">Linux</category>
			<pubDate>2009-06-08 17:00</pubDate>
		</item>
		<item>
			<guid>http://www.jackfeng.com/archives/1353/</guid>
			<title>cp 覆盖不提示</title>
			<author>小锋</author>
			<description><![CDATA[小锋堂 ( http://www.jackfeng.com/ ) : <p>vi ~/.bashrc</p>
<p>把下面这个在前面加个#注释掉重新登陆即可<br />
alias cp='cp -i'<br />
然后就能cp -R -f source target</p>]]></description>
			<link>http://www.jackfeng.com/archives/1353/</link>
			<category domain="http://www.jackfeng.com/category/20/">Linux</category>
			<pubDate>2009-06-07 23:01</pubDate>
		</item>
		<item>
			<guid>http://www.jackfeng.com/archives/1352/</guid>
			<title>命令行查看memcache状态</title>
			<author>小锋</author>
			<description><![CDATA[小锋堂 ( http://www.jackfeng.com/ ) : <div class="xspace-itemmessage" id="xspace-showmessage">
<p>memcache的运行状态可以方便的用stats命令显示。<br />
首先用telnet 127.0.0.1 11211这样的命令连接上memcache，然后直接输入stats就可以得到当前memcache的状态。<br />
这些状态的说明如下：</p>
<table id="memcache" cellspacing="0" cellpadding="0" border="1">
    <tbody>
        <tr>
            <td>pid</td>
            <td>memcache服务器的进程ID</td>
        </tr>
        <tr>
            <td>uptime</td>
            <td>服务器已经运行的秒数</td>
        </tr>
        <tr>
            <td>time</td>
            <td>服务器当前的unix时间戳</td>
        </tr>
        <tr>
            <td>version</td>
            <td>memcache版本</td>
        </tr>
        <tr>
            <td>pointer_size</td>
            <td>当前操作系统的指针大小（32位系统一般是32bit）</td>
        </tr>
        <tr>
            <td>rusage_user</td>
            <td>进程的累计用户时间</td>
        </tr>
        <tr>
            <td>rusage_system</td>
            <td>进程的累计系统时间</td>
        </tr>
        <tr>
            <td>curr_items</td>
            <td>服务器当前存储的items数量</td>
        </tr>
        <tr>
            <td>total_items</td>
            <td>从服务器启动以后存储的items总数量</td>
        </tr>
        <tr>
            <td>bytes</td>
            <td>当前服务器存储items占用的字节数</td>
        </tr>
        <tr>
            <td>curr_connections</td>
            <td>当前打开着的连接数</td>
        </tr>
        <tr>
            <td>total_connections</td>
            <td>从服务器启动以后曾经打开过的连接数</td>
        </tr>
        <tr>
            <td>connection_structures</td>
            <td>服务器分配的连接构造数</td>
        </tr>
        <tr>
            <td>cmd_get</td>
            <td>get命令（获取）总请求次数</td>
        </tr>
        <tr>
            <td>cmd_set</td>
            <td>set命令（保存）总请求次数</td>
        </tr>
        <tr>
            <td>get_hits</td>
            <td>总命中次数</td>
        </tr>
        <tr>
            <td>get_misses</td>
            <td>总未命中次数</td>
        </tr>
        <tr>
            <td>evictions</td>
            <td>为获取空闲内存而删除的items数（分配给memcache的空间用满后需要删除旧的items来得到空间分配给新的items）</td>
        </tr>
        <tr>
            <td>bytes_read</td>
            <td>总读取字节数（请求字节数）</td>
        </tr>
        <tr>
            <td>bytes_written</td>
            <td>总发送字节数（结果字节数）</td>
        </tr>
        <tr>
            <td>limit_maxbytes</td>
            <td>分配给memcache的内存大小（字节）</td>
        </tr>
        <tr>
            <td>threads</td>
            <td>当前线程数</td>
        </tr>
    </tbody>
</table>
</div>
<p>&nbsp;</p>]]></description>
			<link>http://www.jackfeng.com/archives/1352/</link>
			<category domain="http://www.jackfeng.com/category/20/">Linux</category>
			<pubDate>2009-06-03 14:19</pubDate>
		</item>
		<item>
			<guid>http://www.jackfeng.com/archives/1351/</guid>
			<title>nginx负载均衡与反向代理</title>
			<author>小锋</author>
			<description><![CDATA[小锋堂 ( http://www.jackfeng.com/ ) : <p>这个代理玩意儿相当的好！我顶</p><br /><br /><a href="http://www.jackfeng.com/archives/1351/" target="_blank">阅读全文</a><br /><br />]]></description>
			<link>http://www.jackfeng.com/archives/1351/</link>
			<category domain="http://www.jackfeng.com/category/20/">Linux</category>
			<pubDate>2009-06-02 18:50</pubDate>
		</item>
		<item>
			<guid>http://www.jackfeng.com/archives/1350/</guid>
			<title>linux 查看硬盘速度跑多块</title>
			<author>小锋</author>
			<description><![CDATA[小锋堂 ( http://www.jackfeng.com/ ) : <p>hdparm -t /dev/sda</p>
<p>hdparm -Tt /dev/sda<br />
&nbsp;</p>
<p>-a 表示是否关闭磁盘预读取功能。对于大文件读取，这个显然能提高性能。<br />
-A设置硬盘驱动器缓存读取特性。可能就是硬盘缓存开关<br />
--d设置dma<br />
　使用DMA和32位传输可以大幅提升系统性能。使用命令如下： <br />
<br />
　　# /sbin/hdparm -c 1 /dev/hda <br />
<br />
　　此命令将第一个IDE硬盘的PCI总线指定为32位，使用 -c 0参数来禁用32位传输。 <br />
<br />
　　在硬盘上使用DMA，使用命令： <br />
<br />
　　# /sbin/hdparm -d 1 /dev/hda <br />
<br />
　　关闭DMA可以使用 -d 0的参数。 <br />
<br />
　　更改完成后，可以使用hdparm来检查修改后的结果，使用命令： <br />
<br />
　　# /sbin/hdparm -t /dev/had <br />
<br />
　　为了确保设置的结果不变，使用命令：# /sbin/hdparm -k 1 /dev/hda <br />
<br />
　　Hdparm命令的一些常用的其他参数功能 <br />
<br />
　　-g 显示硬盘的磁轨，磁头，磁区等参数。 <br />
<br />
　　-i 显示硬盘的硬件规格信息，这些信息是在开机时由硬盘本身所提供。 <br />
<br />
　　-I 直接读取硬盘所提供的硬件规格信息。 <br />
<br />
　　-p 设定硬盘的PIO模式。 <br />
<br />
　　-Tt 评估硬盘的读取效率和硬盘快取的读取效率。 <br />
<br />
　　-u &lt;0或1&gt;; 在硬盘存取时，允许其他中断要求同时执行。 <br />
<br />
　　-v 显示硬盘的相关设定。<br />
&nbsp;</p>]]></description>
			<link>http://www.jackfeng.com/archives/1350/</link>
			<category domain="http://www.jackfeng.com/category/20/">Linux</category>
			<pubDate>2009-05-31 10:03</pubDate>
		</item>
	</channel>
</rss>
