<?xml version="1.0" encoding="UTF-8" ?>
<rss version="2.0">
<channel>
<title><![CDATA[向东博客 专注WEB应用 构架之美 --- 构架之美，在于尽态极妍 | 应用之美，在于药到病除]]></title> 
<link>http://jackxiang.com/index.php</link> 
<description><![CDATA[赢在IT，Playin' with IT,Focus on Killer Application,Marketing Meets Technology.]]></description> 
<language>zh-cn</language> 
<copyright><![CDATA[向东博客 专注WEB应用 构架之美 --- 构架之美，在于尽态极妍 | 应用之美，在于药到病除]]></copyright>
<item>
<link>http://jackxiang.com/post//</link>
<title><![CDATA[Cant locate LWP/UserAgent.pm：使用NGiNX_HTTP_Push_Module实现简单的服务器推送,主要Perl的UserAgent的安装]]></title> 
<author>jack &lt;xdy108@126.com&gt;</author>
<category><![CDATA[WEB2.0]]></category>
<pubDate>Sun, 05 Jun 2011 09:21:53 +0000</pubDate> 
<guid>http://jackxiang.com/post//</guid> 
<description>
<![CDATA[ 
	NGINX_HTTP_Push_Module是一个Nginx服务器模块，可以实现服务器端的长连接和推送（但是推送一次后会结束进程，尚未实现持续的推送）。<br/>NGINX_HTTP_Push_Module是一个Nginx服务器模块，可以实现服务器端的长连接和推送（但是推送一次后会结束进程，尚未实现持续的推送）。<br/><br/><br/><br/>http://pushmodule.slact.net可以下载该模块。<br/><br/>如果已安装Nginx，需要重新编译安装Nginx，要用命令&quot;./configure --add-module=/home/hfahe/ngnix_http_push_module&quot;来配置，然后执行make和make install来安装Nginx。<br/><br/>安装完成后，在Nginx配置文件的Server段里添加两个路径配置：<br/><br/>location /publish &#123; <br/>&nbsp;&nbsp;&nbsp;&nbsp;set $push_channel_id $arg_id; <br/>&nbsp;&nbsp;&nbsp;&nbsp;push_publisher; <br/>&nbsp;&nbsp;&nbsp;&nbsp;push_store_messages on; <br/>&nbsp;&nbsp;&nbsp;&nbsp;push_message_timeout 2h; <br/>&nbsp;&nbsp;&nbsp;&nbsp;push_max_message_buffer_length 10; <br/>&#125; <br/>location /activity &#123; <br/>&nbsp;&nbsp;&nbsp;&nbsp;push_subscriber; <br/>&nbsp;&nbsp;&nbsp;&nbsp;set $push_channel_id $arg_id; <br/>&nbsp;&nbsp;&nbsp;&nbsp;push_subscriber_concurrency broadcast; <br/>&nbsp;&nbsp;&nbsp;&nbsp;default_type text/plain; <br/>&#125; <br/><br/>重启Nginx后，请求http://localhost/activity?id=10000的地址，可以看到浏览器处于请求堵塞阶段。<br/><br/><br/><br/><textarea name="code" class="html" rows="15" cols="100">
use LWP::UserAgent;
use HTTP::Request::Common;
my $ua = new LWP::UserAgent;
my $response = $ua-&gt;request( 
&nbsp;&nbsp;POST &#039;http://localhost//publish?id=10000&#039;,
&nbsp;&nbsp;Content_Type =&gt; &#039;text/html&#039;,
&nbsp;&nbsp;Content =&gt; &#039;Server Push&#039;
);
my $content = $response-&gt;content;
print $content;
</textarea><br/><br/>Can&#039;t locate LWP/UserAgent.pm in @INC (@INC contains: /usr/lib/perl5/site_perl/5.8.8/i386-linux-thread-multi /usr/lib/perl5/site_perl/5.8.8 /usr/lib/perl5/site_perl /usr/lib/perl5/vendor_perl/5.8.8/i386-linux-thread-multi /usr/lib/perl5/vendor_perl/5.8.8 /usr/lib/perl5/vendor_perl /usr/lib/perl5/5.8.8/i386-linux-thread-multi /usr/lib/perl5/5.8.8 .) at post.per line 1.<br/><br/>Can&#039;t locate LWP/UserAgent.pm in @INC<br/>It looks as though @INC for you doesn&#039;t include a version of perl with LWP::UserAgent.pm installed, whereas @INC for the webserver (usually &#039;nobody&#039;) does use a version of perl with the module. <br/><br/>for this install libwww-perl this will fix it ask Admin to do it<br/><br/><br/>所以:<br/><br/><textarea name="code" class="html" rows="15" cols="100">
apt-get install libwww-perl
</textarea><br/>Centos:<br/><textarea name="code" class="html" rows="15" cols="100">
yum install perl-libwww-perl 
</textarea><br/>etting up Install Process<br/>Resolving Dependencies<br/>--&gt; Running transaction check<br/>---&gt; Package perl-libwww-perl.noarch 0:5.805-1.1.1 set to be updated<br/>务必参考：http://jackxiang.com/post/3931/
]]>
</description>
</item><item>
<link>http://jackxiang.com/post//#blogcomment</link>
<title><![CDATA[[评论] Cant locate LWP/UserAgent.pm：使用NGiNX_HTTP_Push_Module实现简单的服务器推送,主要Perl的UserAgent的安装]]></title> 
<author> &lt;user@domain.com&gt;</author>
<category><![CDATA[评论]]></category>
<pubDate>Thu, 01 Jan 1970 00:00:00 +0000</pubDate> 
<guid>http://jackxiang.com/post//#blogcomment</guid> 
<description>
<![CDATA[ 
	
]]>
</description>
</item>
</channel>
</rss>