<?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>七分地 &#187; Kloxo</title>
	<atom:link href="http://www.qifendi.com/html/ytag/kloxo/feed" rel="self" type="application/rss+xml" />
	<link>http://www.qifendi.com</link>
	<description>soncy的七分责任田，种点瓜果蔬菜和杂草</description>
	<lastBuildDate>Sun, 22 Aug 2010 13:24:38 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.1.2</generator>
		<item>
		<title>入手 Linode 360s型VPS</title>
		<link>http://www.qifendi.com/html/y2010/based-vps-starting-linode-360s.html</link>
		<comments>http://www.qifendi.com/html/y2010/based-vps-starting-linode-360s.html#comments</comments>
		<pubDate>Sat, 24 Apr 2010 15:50:12 +0000</pubDate>
		<dc:creator>soncy</dc:creator>
				<category><![CDATA[互联网生活]]></category>
		<category><![CDATA[Kloxo]]></category>
		<category><![CDATA[Linode]]></category>
		<category><![CDATA[VPS]]></category>

		<guid isPermaLink="false">http://www.qifendi.com/?p=891</guid>
		<description><![CDATA[<p><img class="alignleft size-full wp-image-897" title="linode" src="http://www.qifendi.com/wp-content/uploads/2010/04/linode.gif" alt="" width="250" height="100" />      <a href="http://www.linode.com/?r=271da25be65638c98383d2fe087d7fb14ea607e6" target="_blank">Linode</a>是一家口碑非常不错的VPS服务提供商，他们的服务器稳定性相当受好评，我也禁不住诱惑买了一款360s型的，内存360MB，一个月流量200GB，月付19.95美元。购买流程不详述了，军哥的这篇文章《<a href="http://www.vpser.net/usa-vps/linode.html" target="_blank">Linode 购买、安装、测试、配置教程</a>》有详细说明，提醒一下，购买前先访问下<a href="http://www.linode.com/avail/" target="_blank">http://www.linode.com/avail/</a> 查看一下每个机房的每款VPS剩余数量。</p>[......]<p class='read-more'><a href='http://www.qifendi.com/html/y2010/based-vps-starting-linode-360s.html'></a></p>]]></description>
			<content:encoded><![CDATA[<p><img alt="" class="alignleft size-full wp-image-897" height="100" src="http://www.qifendi.com/wp-content/uploads/2010/04/linode.gif" title="linode" width="250" /> <a href="http://www.linode.com/?r=271da25be65638c98383d2fe087d7fb14ea607e6" target="_blank">Linode</a>是一家口碑非常不错的VPS服务提供商，他们的服务器稳定性相当受好评，我也禁不住诱惑买了一款360s型的，内存360MB，一个月流量200GB，月付19.95美元。购买流程不详述了，军哥的这篇文章《<a href="http://www.vpser.net/usa-vps/linode.html" target="_blank">Linode 购买、安装、测试、配置教程</a>》有详细说明，提醒一下，购买前先访问下<a href="http://www.linode.com/avail/" target="_blank">http://www.linode.com/avail/</a> 查看一下每个机房的每款VPS剩余数量。 一切照教程搞定之后，由于想在VPS上放置多个站点，不用面板的话配置有点麻烦，所以还是考虑装Kloxo面板，具体安装流程军哥的这篇文章《<a href="http://www.vpser.net/vps-cp/centos-linux-vps-kloxol-xadmin.html" target="_blank">CentOS Linux VPS Kloxo/Lxadmin控制面板安装教程</a>》也有详细描述，一切安装就绪后，进入kloxo准备添加站点时，问题出现了，kloxo一直提示没有IP地址(no_ip_address)，但是去添加IP地址的时候又说IP地址被占用了，只是奇了怪了，google一把，原来需要自己动手修改系统网络配置，如下：</p>

<div class="wp_codebox"><table><tr id="p8911"><td class="code" id="p891code1"><pre class="bash" style="font-family:monospace;"><span style="color: #666666; font-style: italic;">#vim /etc/sysconfig/network-scripts/ifcfg-eth0</span></pre></td></tr></table></div>

<p>在最后其中添加</p>

<div class="wp_codebox"><table><tr id="p8912"><td class="code" id="p891code2"><pre class="bash" style="font-family:monospace;"><span style="color: #007800;">IPADDR</span>=12.34.56.78<span style="color: #000000; font-weight: bold;">//</span>你的IP
<span style="color: #007800;">NETMASK</span>=255.255.255.0<span style="color: #000000; font-weight: bold;">//</span>子网掩码
<span style="color: #007800;">GATEWAY</span>=12.34.56.1<span style="color: #000000; font-weight: bold;">//</span>默认网关</pre></td></tr></table></div>

<p>之后就可以正常添加站点了。Kloxo装完后默认采用的Apache作为web服务器，如果改成lighttpd的话，改完后需要自己登陆终端启动一下lighttpd。</p>

<div class="wp_codebox"><table><tr id="p8913"><td class="code" id="p891code3"><pre class="bash" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>init.d<span style="color: #000000; font-weight: bold;">/</span>lighttpd restart</pre></td></tr></table></div>

<p>一切都搞定，传了个探针上去看了一下，服务器时间显示的是美国时间，为了保证现在的跑着的程序能平稳迁移到Linode，还是把服务器时间改成北京时间吧。如下：</p>

<div class="wp_codebox"><table><tr id="p8914"><td class="code" id="p891code4"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">ln</span> <span style="color: #660033;">-sf</span> <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>share<span style="color: #000000; font-weight: bold;">/</span>zoneinfo<span style="color: #000000; font-weight: bold;">/</span>Asia<span style="color: #000000; font-weight: bold;">/</span>Shanghai <span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>localtime</pre></td></tr></table></div>

<p>或者</p>

<div class="wp_codebox"><table><tr id="p8915"><td class="code" id="p891code5"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">cp</span> <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>share<span style="color: #000000; font-weight: bold;">/</span>zoneinfo<span style="color: #000000; font-weight: bold;">/</span>Asia<span style="color: #000000; font-weight: bold;">/</span>Shanghai <span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>localtime</pre></td></tr></table></div>

<p>其次,使服务器时间同步化:</p>

<div class="wp_codebox"><table><tr id="p8916"><td class="code" id="p891code6"><pre class="bash" style="font-family:monospace;">yum <span style="color: #c20cb9; font-weight: bold;">install</span> <span style="color: #660033;">-y</span> ntp
ntpdate <span style="color: #660033;">-d</span> us.pool.ntp.org</pre></td></tr></table></div>

<p>这样就可以了。不过最近选择的Fremont机房分配到的IP貌似没有之前的速度快了，有待测试。</p>
<p>如果您觉得该文章有用并且您也想购买Linode的VPS，您可以点击下面的链接过去购买：<font face="Courier New"><a href="http://www.linode.com/?r=271da25be65638c98383d2fe087d7fb14ea607e6" target="_blank">http://www.linode.com/?r=271da25be65638c98383d2fe087d7fb14ea607e6</a></font></p>
]]></content:encoded>
			<wfw:commentRss>http://www.qifendi.com/html/y2010/based-vps-starting-linode-360s.html/feed</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>配置Kloxo下的lighttpd支持WP Super Cache</title>
		<link>http://www.qifendi.com/html/y2010/support-under-the-lighttpd-configuration-kloxo-wp-super-cache.html</link>
		<comments>http://www.qifendi.com/html/y2010/support-under-the-lighttpd-configuration-kloxo-wp-super-cache.html#comments</comments>
		<pubDate>Sun, 11 Apr 2010 06:20:08 +0000</pubDate>
		<dc:creator>soncy</dc:creator>
				<category><![CDATA[互联网生活]]></category>
		<category><![CDATA[Kloxo]]></category>
		<category><![CDATA[lighttpd]]></category>
		<category><![CDATA[wp super cache]]></category>

		<guid isPermaLink="false">http://www.qifendi.com/?p=764</guid>
		<description><![CDATA[<p><img alt="" class="alignleft size-full wp-image-788" height="100" src="http://www.qifendi.com/wp-content/uploads/2010/04/lighttpdwp.gif" title="lighttpdwp" width="250" />&#160;&#160;&#160;&#160;&#160;&#160;&#160; 把博客搬到了昨天新买的VPS上，但是由于我的VPS装的Kloxo，这款控制面板会附带安装lighttpd和apache两个web服务器，由于apache太耗内存，而且我的站基本上是对静态文件和图片的处理，所以选择了轻量级的lighttpd，所以WP Super Cache之前在apache下的rewrite规则就全然无用了。但是如果又特别想用WP Super Cache怎么办呢？</p>
<p>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; 于是开始查找lighttpd的WP Super Cache的rewrite规则怎么写，很快找到了一篇资料，按照上面的步骤进行，结果惨不忍睹，折腾了好几个小时都没搞定，最后还把Kloxo搞挂了，很失落。今天早上起床后迅速接着昨天晚上的步骤搞，几经折腾，终于搞定了，而且把lighttpd升级到了1.4.26 。 总结一下我整个配置过程吧：</p>[......]<p class='read-more'><a href='http://www.qifendi.com/html/y2010/support-under-the-lighttpd-configuration-kloxo-wp-super-cache.html'></a></p>]]></description>
			<content:encoded><![CDATA[<p>
<img alt="" class="alignleft size-full wp-image-788" height="100" src="http://www.qifendi.com/wp-content/uploads/2010/04/lighttpdwp.gif" title="lighttpdwp" width="250" />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 把博客搬到了昨天新买的VPS上，但是由于我的VPS装的Kloxo，这款控制面板会附带安装lighttpd和apache两个web服务器，由于apache太耗内存，而且我的站基本上是对静态文件和图片的处理，所以选择了轻量级的lighttpd，所以WP Super Cache之前在apache下的rewrite规则就全然无用了。但是如果又特别想用WP Super Cache怎么办呢？
</p>
<p>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 于是开始查找lighttpd的WP Super Cache的rewrite规则怎么写，很快找到了一篇资料，按照上面的步骤进行，结果惨不忍睹，折腾了好几个小时都没搞定，最后还把Kloxo搞挂了，很失落。今天早上起床后迅速接着昨天晚上的步骤搞，几经折腾，终于搞定了，而且把lighttpd升级到了1.4.26 。 总结一下我整个配置过程吧：
</p>
<h3>
1，安装make<br />
</h3>
<p>
我的VPS用的系统是CentOs5，貌似没有make，执行make时会提示“Make Command not Found ”，需要手动安装一下，稍后几个步骤会用到。
</p>

<div class="wp_codebox"><table><tr id="p7647"><td class="code" id="p764code7"><pre class="bash" style="font-family:monospace;">yum <span style="color: #660033;">-y</span> <span style="color: #c20cb9; font-weight: bold;">install</span> <span style="color: #c20cb9; font-weight: bold;">gcc</span> <span style="color: #c20cb9; font-weight: bold;">automake</span> <span style="color: #c20cb9; font-weight: bold;">autoconf</span> libtool <span style="color: #c20cb9; font-weight: bold;">make</span></pre></td></tr></table></div>

<p>
 
</p>
<h3>
2，安装lua环境<br />
</h3>
<p>
因为在lighttpd下的WP Super Cache需要用到lua脚本，所以先要安装lua环境，具体步骤如下：
</p>

<div class="wp_codebox"><table><tr id="p7648"><td class="code" id="p764code8"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">wget</span> http:<span style="color: #000000; font-weight: bold;">//</span>www.lua.org<span style="color: #000000; font-weight: bold;">/</span>ftp<span style="color: #000000; font-weight: bold;">/</span>lua-5.1.4.tar.gz
<span style="color: #c20cb9; font-weight: bold;">tar</span> <span style="color: #660033;">-xzvf</span> lua-5.1.4.tar.gz
<span style="color: #7a0874; font-weight: bold;">cd</span> lua-5.1.4
yum <span style="color: #c20cb9; font-weight: bold;">install</span> libtermcap-devel
yum <span style="color: #c20cb9; font-weight: bold;">install</span> ncurses-devel
yum <span style="color: #c20cb9; font-weight: bold;">install</span> libevent-devel
yum <span style="color: #c20cb9; font-weight: bold;">install</span> readline-devel
<span style="color: #c20cb9; font-weight: bold;">make</span> linux
<span style="color: #c20cb9; font-weight: bold;">make</span> <span style="color: #c20cb9; font-weight: bold;">install</span></pre></td></tr></table></div>

<p>这样,lua环境就算安装完毕了。</p>
<p>
 
</p>
<h3>
3，重新编译lighttpd<br />
</h3>
<p>
 
</p>

<div class="wp_codebox"><table><tr id="p7649"><td class="code" id="p764code9"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">wget</span> http:<span style="color: #000000; font-weight: bold;">//</span>download.lighttpd.net<span style="color: #000000; font-weight: bold;">/</span>lighttpd<span style="color: #000000; font-weight: bold;">/</span>releases-<span style="color: #000000;">1.4</span>.x<span style="color: #000000; font-weight: bold;">/</span>lighttpd-1.4.26.tar.gz
<span style="color: #c20cb9; font-weight: bold;">tar</span> <span style="color: #660033;">-xzvf</span> lighttpd-1.4.26.tar.gz
<span style="color: #7a0874; font-weight: bold;">cd</span> lighttpd-1.4.26
<span style="color: #7a0874; font-weight: bold;">export</span> <span style="color: #007800;">LUA_CFLAGS</span>=<span style="color: #ff0000;">&quot;-I/usr/local/include&quot;</span>
<span style="color: #7a0874; font-weight: bold;">export</span> <span style="color: #007800;">LUA_LIBS</span>=<span style="color: #ff0000;">&quot;-L/usr/local/lib -llua&quot;</span>
yum <span style="color: #c20cb9; font-weight: bold;">install</span> openssl openssl-devel
yum <span style="color: #c20cb9; font-weight: bold;">install</span> <span style="color: #c20cb9; font-weight: bold;">flex</span> <span style="color: #c20cb9; font-weight: bold;">autoconf</span> zlib curl zlib-devel curl-devel <span style="color: #c20cb9; font-weight: bold;">bzip2</span> bzip2-devel ncurses-devel libjpeg-devel libpng-devel libtiff-devel freetype-devel pam-devel
yum <span style="color: #c20cb9; font-weight: bold;">install</span> pcre-devel
.<span style="color: #000000; font-weight: bold;">/</span>configure <span style="color: #660033;">--with-pcre</span> <span style="color: #660033;">--with-lua</span> <span style="color: #660033;">--with-zlib</span> <span style="color: #660033;">--with-openssl</span> <span style="color: #660033;">--sbindir</span>=<span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>sbin <span style="color: #660033;">--sysconfdir</span>=<span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>lighttpd
<span style="color: #c20cb9; font-weight: bold;">make</span>
<span style="color: #c20cb9; font-weight: bold;">make</span> <span style="color: #c20cb9; font-weight: bold;">install</span></pre></td></tr></table></div>

<p>到这里lighttpd重新编译完毕。</p>
<p>
 
</p>
<h3>
4，修改lighttpd配置文件<br />
</h3>
<p>
 
</p>

<div class="wp_codebox"><table><tr id="p76410"><td class="code" id="p764code10"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">vim</span> <span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>lighttpd<span style="color: #000000; font-weight: bold;">/</span>lighttpd.conf</pre></td></tr></table></div>

<p>找到server.modules，在其中加一行&#8221;mod_magnet&#8221;,如：</p>

<div class="wp_codebox"><table><tr id="p76411"><td class="code" id="p764code11"><pre class="vim" style="font-family:monospace;">server<span style="color: #000000;">.</span>modules =
<span style="color: #000000;">&#40;</span>
<span style="color: #C5A22D;">&quot;mod_rewrite&quot;</span>,
<span style="color: #C5A22D;">&quot;mod_redirect&quot;</span>,
<span style="color: #C5A22D;">&quot;mod_alias&quot;</span>,
<span style="color: #C5A22D;">&quot;mod_access&quot;</span>,
<span style="color: #C5A22D;">&quot;mod_magnet&quot;</span>,
<span style="color: #000000;">...</span> <span style="color: #000000;">...</span></pre></td></tr></table></div>

<p>
 
</p>
<h3>
6，上传rewrite.lua，添加重写规则<br />
</h3>
<p>
下载<a href="http://bluehua.org/wp-content/uploads/2009/12/rewrite.lua_.zip" target="_blank">rewrite.lua</a>，上传至博客根目录，进入Kloxo，选择域名，选择博客的域名，然后选择lighttpd地址重写规则，如图 <img alt="" class="aligncenter size-full wp-image-782" height="204" src="http://www.qifendi.com/wp-content/uploads/2010/04/diare1.gif" title="diare" width="660" /> 加入如下规则：
</p>

<div class="wp_codebox"><table><tr id="p76412"><td class="code" id="p764code12"><pre class="shell" style="font-family:monospace;">$HTTP[&quot;host&quot;] == &quot;www.qifendi.com&quot; {
       server.error-handler-404 = &quot;/index.php&quot;
       server.document-root = &quot;/home/admin/xxx&quot; #填写博客根目录
        magnet.attract-physical-path-to = ( server.document-root + &quot;/rewrite.lua&quot; )
}</pre></td></tr></table></div>

<p>
 
</p>
<h3>
7，重启lighttpd。<br />
</h3>
<p>
 
</p>

<div class="wp_codebox"><table><tr id="p76413"><td class="code" id="p764code13"><pre class="bash" style="font-family:monospace;">yum downgrade openssl
<span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>init.d<span style="color: #000000; font-weight: bold;">/</span>lighttpd restart</pre></td></tr></table></div>

<p>
 
</p>
<h3>
8，权限设置<br />
</h3>
<p>
访问博客，如果报500错误，将/wp-content/cache/和/wp-content/cache/supercache/权限设置为755 这时候虽然WP Super Cache还在报Mod rewrite may not be installed!，但是实际上已经有作用了。如果操作过程中不慎把Kloxo搞挂了，可以用下面的命令重启一下：
</p>

<div class="wp_codebox"><table><tr id="p76414"><td class="code" id="p764code14"><pre class="bash" style="font-family:monospace;"> <span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>init.d<span style="color: #000000; font-weight: bold;">/</span>kloxo restart</pre></td></tr></table></div>

<p>
 </p>
]]></content:encoded>
			<wfw:commentRss>http://www.qifendi.com/html/y2010/support-under-the-lighttpd-configuration-kloxo-wp-super-cache.html/feed</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
	</channel>
</rss>

