﻿<?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>FreeMAGi &#187; Update</title>
	<atom:link href="http://www.freemagi.com/tag/update/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.freemagi.com</link>
	<description>time waits for no one.</description>
	<lastBuildDate>Sat, 12 Dec 2009 08:11:21 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>合租用户召集，旧数据已经清理完毕，后台重新开放，这里是注意事项</title>
		<link>http://www.freemagi.com/2008/12/21/dhp_reload/</link>
		<comments>http://www.freemagi.com/2008/12/21/dhp_reload/#comments</comments>
		<pubDate>Sat, 20 Dec 2008 20:09:03 +0000</pubDate>
		<dc:creator>Evan</dc:creator>
				<category><![CDATA[DreamHost]]></category>
		<category><![CDATA[MySQL]]></category>
		<category><![CDATA[snapshot data]]></category>
		<category><![CDATA[Update]]></category>
		<category><![CDATA[web security]]></category>
		<guid isPermaLink="false">http://www.freemagi.com/?p=58</guid>
		<description><![CDATA[花了九牛二虎之力终于搞定了所有旧数据，在这里现说一声抱歉，大家等到今天太不容易了。因为最近加班太多，我这两周基本上都在凌晨过后才能下班回家，而且旧数据太多太乱，要整理好真的好麻烦。。。单单删除数据都花了好几个小时= =&#124;&#124;&#124; （请小狼童鞋注意了。。。你的数据整理花了最长时间的 = = 快给我把数据库都按格式改好名） 在删除数据的过程中可能会出现错删的现象，如果发现出现相关问题请马上与我联系，我会尽可能给与恢复，而被删除的用户文件夹里的数据可能会永久丢失，数据库的话会在5日内被系统自动清除，所以遇到问题请尽快。 而自己的过往数据可以用ssh或者ftp在 ~/.snapshot 里找到备份，文件备份是最多保存30天的。 为了管理方便，请大家不要乱建用户，如果有必要新建用户的话（包括MySQL用户和Shell / FTP用户），请事先跟我申请，不然我会在不定期检查帐户时删除非法帐户（小狼和小博童鞋，请再注意了 = =）。 只因要对MySQL用户改名是不可能的事情，所以请大家珍惜拥有的ID。 以下是一些常用的链接： Wiki：http://wiki.dreamhost.com/ 管理域名：https://panel.dreamhost.com/index.cgi?tree=domain.manage 管理数据库：https://panel.dreamhost.com/index.cgi?tree=goodies.mysql 一键安装：https://panel.dreamhost.com/index.cgi?tree=goodies.installer 数据恢复方法：http://wiki.dreamhost.com/Snapshot_data_restoration 设置防盗链：https://panel.dreamhost.com/index.cgi?tree=goodies.webdav 在新建数据库时请先选择自己要绑定域名的数据库，数据库用户名请务必使用原有的而不是新建的 一般新建域名并且绑定数据库会需要以下过程： 先进入 Domains>Manage Domains 点击 Add New Domain / Sub-Domain 在 Domain to host 写好要绑定的域名 确认 Extra Web Security? 已经被选中，确认 FTP user / CGI-runs-as user 为已存在用户 把所需要的服务给选/填好 点击 Fully host this [...]]]></description>
			<content:encoded><![CDATA[<p>花了九牛二虎之力终于搞定了所有旧数据，在这里现说一声抱歉，大家等到今天太不容易了。因为最近加班太多，我这两周基本上都在凌晨过后才能下班回家，而且旧数据太多太乱，要整理好真的好麻烦。。。单单删除数据都花了好几个小时= =||| （请小狼童鞋注意了。。。你的数据整理花了最长时间的 = = 快给我把数据库都按格式改好名）</p>
<p>在删除数据的过程中可能会出现错删的现象，如果发现出现相关问题请马上与我联系，我会尽可能给与恢复，而被删除的用户文件夹里的数据可能会永久丢失，数据库的话会在5日内被系统自动清除，所以遇到问题请尽快。<br />
而自己的过往数据可以用ssh或者ftp在 ~/.snapshot 里找到备份，文件备份是最多保存30天的。</p>
<p>为了管理方便，请大家不要乱建用户，如果有必要新建用户的话（包括MySQL用户和Shell / FTP用户），请事先跟我申请，不然我会在不定期检查帐户时删除非法帐户（小狼和小博童鞋，请再注意了 = =）。</p>
<p>只因要对MySQL用户改名是不可能的事情，所以请大家珍惜拥有的ID。</p>
<p>以下是一些常用的链接：<br />
Wiki：http://wiki.dreamhost.com/<br />
管理域名：https://panel.dreamhost.com/index.cgi?tree=domain.manage<br />
管理数据库：https://panel.dreamhost.com/index.cgi?tree=goodies.mysql<br />
一键安装：https://panel.dreamhost.com/index.cgi?tree=goodies.installer<br />
数据恢复方法：http://wiki.dreamhost.com/Snapshot_data_restoration<br />
设置防盗链：https://panel.dreamhost.com/index.cgi?tree=goodies.webdav</p>
<p>在新建数据库时请先选择自己要绑定域名的数据库，数据库用户名请务必使用原有的而不是新建的<br />
一般新建域名并且绑定数据库会需要以下过程：<br />
先进入 Domains>Manage Domains<br />
点击  Add New Domain / Sub-Domain<br />
在 Domain to host 写好要绑定的域名<br />
确认 Extra Web Security? 已经被选中，确认 FTP user / CGI-runs-as user 为已存在用户<br />
把所需要的服务给选/填好<br />
点击 Fully host this domain now! 完成绑定</p>
<p>再进入 Goodies>Manage MySQL<br />
找到 Create a new MySQL database 这个标题下的 Database Name<br />
这里请使用 USER_DBNAME 的格式新建数据库<br />
在 Use Hostname 选择 Create a new hostname now...<br />
在 New Hostname 把 mysql 绑定到刚才新建的域名上<br />
在 First User 选择已存在的用户<br />
在 Database Comment 里写上数据库的基本摘要，以便管理<br />
最后点击 Add new database now! 完成新建数据库操作</p>
<p>再次进入 Domains>Manage Domains<br />
找到刚才绑定的域名，点开 DNS 的链接，这里就是你需要绑定的内容了<br />
若是已经在你本人的域名控制面板里绑定了 Dreamhost 的 NS 记录的话就基本可以不需要管这些了<br />
Dreamhost 的 NS 记录如下：<br />
ns1.dreamhost.com.<br />
ns2.dreamhost.com.<br />
ns3.dreamhost.com.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.freemagi.com/2008/12/21/dhp_reload/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>傲慢与偏见</title>
		<link>http://www.freemagi.com/2007/06/18/pride-and-prejudice/</link>
		<comments>http://www.freemagi.com/2007/06/18/pride-and-prejudice/#comments</comments>
		<pubDate>Mon, 18 Jun 2007 14:15:25 +0000</pubDate>
		<dc:creator>Evan</dc:creator>
				<category><![CDATA[Diary]]></category>
		<category><![CDATA[Bug]]></category>
		<category><![CDATA[Caine]]></category>
		<category><![CDATA[Debug]]></category>
		<category><![CDATA[html]]></category>
		<category><![CDATA[IE6]]></category>
		<category><![CDATA[IE7]]></category>
		<category><![CDATA[Spock]]></category>
		<category><![CDATA[Suwarm]]></category>
		<category><![CDATA[Update]]></category>
		<guid isPermaLink="false">http://www.freemagi.com/2007/06/18/pride-and-prejudice/</guid>
		<description><![CDATA[开始前先登一则寻人启事，刚好在小弟回广东的那几天，我们这次DH的合租者之一我的好友 临府咖啡，又叫Suwarm、Caine（==名字还真多哦）在拼命地找小弟我，貌似是因为要放弃就有的.cn域名而找我帮手，但那几天因为刚回来家里还没来得及装宽带，到了我装上宽带能看到邮件的时候貌似已经太晚了，这一个月以来毫无音信，无论是Mail、Gtalk还是在V2EX上的动向，都毫无头绪，希望谁知道他的去向的给小弟捎个信，谢谢！ 回到正题了，周而复始，周而复始~为什么我们还要抱着老态度去面对新的事物呢？IE7虽然不好使，但IE6也实在是太糟糕了吧？！Safari其实应该不错，不过程序暂时还很多bug。今天在CB看了篇文章，头一热就尝试check一下代码，才发现有一大堆错，最汗的是&#60;td &#60;td&#62;这样的闭合都出现，而且是貌似是很久以前就有的bug，看来是我太弱了。 下面总结一下debug成果： diff ./header.php new/header.php 49,50c49 &#60; &#60;div id="archives" class="fix" style="display: none;"&#62; &#60; &#60;ul class="fix"&#62; --- &#62; &#60;div id="archives" class="fix" style="display: none;"&#62; 52d50 &#60; &#60;/ul&#62; diff second.php new/second.php 6,8c6,8 &#60; &#60;ul&#62;&#60;?php get_recent_comments(); ?&#62;&#60;/ul&#62; &#60; &#60;img src="&#60;?php sparkStats_imgURI(); ?&#62;" alt="SparkStats"/&#62; &#60; &#60;/ul&#62;&#60;br/&#62; --- &#62; &#60;ul&#62;&#60;?php get_recent_comments(); ?&#62; &#62; &#60;br/&#62;&#60;img src="&#60;?php sparkStats_imgURI(); ?&#62;" alt="SparkStats"/&#62; [...]]]></description>
			<content:encoded><![CDATA[<p>开始前先登一则寻人启事，刚好在小弟回广东的那几天，我们这次DH的合租者之一我的好友 临府咖啡，又叫Suwarm、Caine（==名字还真多哦）在拼命地找小弟我，貌似是因为要放弃就有的.cn域名而找我帮手，但那几天因为刚回来家里还没来得及装宽带，到了我装上宽带能看到邮件的时候貌似已经太晚了，这一个月以来毫无音信，无论是Mail、Gtalk还是在<a href="http://www.v2ex.com/u/临府咖啡">V2EX</a>上的动向，都毫无头绪，希望谁知道他的去向的给小弟捎个信，谢谢！</p>
<p>回到正题了，周而复始，周而复始~为什么我们还要抱着老态度去面对新的事物呢？IE7虽然不好使，但IE6也实在是太糟糕了吧？！Safari其实应该不错，不过程序暂时还很多bug。今天在<a href="http://www.cnbeta.com/articles/28451.htm">CB看了篇文章</a>，头一热就尝试check一下代码，才发现有一大堆错，最汗的是&lt;td &lt;td&gt;这样的闭合都出现，而且是貌似是很久以前就有的bug，看来是我太弱了。<br />
下面总结一下debug成果：<span id="more-33"></span></p>
<p><code>diff ./header.php new/header.php<br />
49,50c49<br />
&lt;       &lt;div id="archives" class="fix" style="display: none;"&gt;<br />
&lt;               &lt;ul class="fix"&gt;<br />
---<br />
&gt;       &lt;div id="archives" class="fix" style="display: none;"&gt;<br />
52d50<br />
&lt;               &lt;/ul&gt;</code></p>
<p><code>diff second.php new/second.php<br />
6,8c6,8<br />
&lt; &lt;ul&gt;&lt;?php get_recent_comments(); ?&gt;&lt;/ul&gt;<br />
&lt;       &lt;img src="&lt;?php sparkStats_imgURI(); ?&gt;" alt="SparkStats"/&gt;<br />
&lt; &lt;/ul&gt;&lt;br/&gt;<br />
---<br />
&gt; &lt;ul&gt;&lt;?php get_recent_comments(); ?&gt;<br />
&gt;       &lt;br/&gt;&lt;img src="&lt;?php sparkStats_imgURI(); ?&gt;" alt="SparkStats"/&gt;<br />
&gt; &lt;/ul&gt;</code></p>
<p><code>diff third.php new/third.php<br />
1,51c1,51<br />
&lt; &lt;div id="tertCol"&gt;<br />
&lt;       &lt;div id="elseWhere"&gt;<br />
&lt;               &lt;h3&gt;About&lt;/h3&gt;<br />
&lt;       &lt;p&gt;<br />
&lt; &lt;?php query_posts('pagename=about'); ?&gt;<br />
&lt; &lt;?php if (have_posts()) : ?&gt;<br />
&lt; &lt;?php while (have_posts()) : the_post(); ?&gt;<br />
&lt; &lt;?php the_content(); ?&gt;<br />
&lt; &lt;?php endwhile; ?&gt;<br />
&lt; &lt;?php endif; ?&gt;&lt;/p&gt;<br />
&lt;       &lt;/div&gt;<br />
&lt;       &lt;div id="elseWhere"&gt;<br />
&lt; &lt;h3&gt;Twitter&lt;/h3&gt;<br />
&lt; &lt;p&gt;&lt;a href="http://static.twitter.com/OiCkilL"&gt;What are you doing?&lt;/a&gt;&lt;/p&gt;<br />
&lt; &lt;br&gt;<br />
&lt;       &lt;div style="width:200px;text-align:center"&gt;&lt;embed<br />
&lt; src="http://static.twitter.com/flash/twitter_timeline_badge.swf" flashvars="user_id=1603771&amp;color1=0x686868&amp;color2=0x333333&amp;textColor1=0xFFFFFF&amp;textColor2=0x9A9A9A&amp;backgroundColor=0xFFFFFF&amp;textSize=12" width="230" height="350" quality="high" name="twitter_timeline_badge" align="middle" type="application/x-shockwave-flash" allowScriptAccess="always" type="application/x-shockwave-flash" pluginspage="http://www.adobe.com/go/getflashplayer"&gt;&lt;/embed&gt;&lt;/div&gt;<br />
&lt;<br />
&lt; &lt;!--<br />
&lt;       &lt;div id="elseWhere"&gt;<br />
&lt;               &lt;h3&gt;Flickr&lt;/h3&gt;<br />
&lt; &lt;p&gt;Online photo sharing&lt;/p&gt;<br />
&lt; &lt;P&gt;&lt;div class="ul_flickr"&gt;<br />
&lt; &lt;?php if ( (function_exists('get_flickrRSS')) ) { ?&gt;<br />
&lt;<br />
&lt;               &lt;?php get_flickrrss(); ?&gt;<br />
&lt;<br />
&lt; &lt;?php } else { ?&gt;<br />
&lt;<br />
&lt;               &lt;p&gt;If you have a Flickr account, you can display your photos here using the &lt;a href="http://eightface.com/code/wp-flickrrss/"&gt;flickrRSS&lt;/a&gt; plugin.&lt;/p&gt;<br />
&lt;<br />
&lt;               &lt;p&gt;If you have already downloaded the flickrRSS plugin, but are getting this message, &lt;a href="&lt;?php echo get_settings('home'); ?&gt;/wp-admin/plugins.php"&gt;click here to make sure that the plugin is activated&lt;/a&gt;.&lt;/p&gt;<br />
&lt;<br />
&lt;               &lt;p&gt;If you do not have a Flickr account you can:<br />
&lt;                       &lt;ul&gt;<br />
&lt;                               &lt;li&gt;Create a Flickr account at &lt;a href="http://www.flickr.com/signup/"&gt;flickr.com&lt;/a&gt;.&lt;/li&gt;<br />
&lt;                               &lt;li&gt;Remove this block.&lt;/li&gt;<br />
&lt;                       &lt;/ul&gt;<br />
&lt;               &lt;/p&gt;<br />
&lt;<br />
&lt; &lt;?php } ?&gt;<br />
&lt; &lt;div class="clear"&gt;&lt;/div&gt;<br />
&lt; &lt;/div&gt;&lt;/p&gt;<br />
&lt;       &lt;/div&gt; --&gt;<br />
&lt;<br />
&lt; &lt;div id="elseWhere"&gt;<br />
&lt; &lt;h3&gt;G.F.W Suck&lt;/h3&gt;<br />
&lt; &lt;p&gt;&lt;a href="http://blog.donews.com/keepwalking/archive/2006/06/01/898146.aspx"&gt;&lt;img src="http://blog.donews.com/images/blog_donews_com/keso/130783/o_f_ck_gfw.gif" alt="Anti-GFW" width="200" height="200" border="0"&gt;&lt;/a&gt;&lt;br /&gt;我已经没有理由相信神的存在，但是我相信冥冥中有种力量可以帮助我们，那就是真正的民意。&lt;/P&gt;&lt;/div&gt;<br />
&lt;<br />
&lt;       &lt;/div&gt;&lt;!-- close #imgLinks --&gt;<br />
&lt; &lt;/div&gt;&lt;!-- close #tertCol --&gt;<br />
---<br />
&gt; &lt;div id="tertCol"&gt;<br />
&gt;       &lt;div id="elseWhere"&gt;<br />
&gt;               &lt;h3&gt;About&lt;/h3&gt;<br />
&gt;       &lt;p&gt;<br />
&gt; &lt;?php query_posts('pagename=about'); ?&gt;<br />
&gt; &lt;?php if (have_posts()) : ?&gt;<br />
&gt; &lt;?php while (have_posts()) : the_post(); ?&gt;<br />
&gt; &lt;?php the_content(); ?&gt;<br />
&gt; &lt;?php endwhile; ?&gt;<br />
&gt; &lt;?php endif; ?&gt;&lt;/p&gt;<br />
&gt;       &lt;/div&gt;<br />
&gt;       &lt;div id="elseWhere"&gt;<br />
&gt; &lt;h3&gt;Twitter&lt;/h3&gt;<br />
&gt; &lt;p&gt;&lt;a href="http://static.twitter.com/OiCkilL"&gt;What are you doing?&lt;/a&gt;&lt;/p&gt;<br />
&gt; &lt;br&gt;<br />
&gt;       &lt;div style="width:200px;text-align:center"&gt;&lt;embed<br />
&gt; src="http://static.twitter.com/flash/twitter_timeline_badge.swf" flashvars="user_id=1603771&amp;color1=0x686868&amp;color2=0x333333&amp;textColor1=0xFFFFFF&amp;textColor2=0x9A9A9A&amp;backgroundColor=0xFFFFFF&amp;textSize=12" width="230" height="350" quality="high" name="twitter_timeline_badge" align="middle" type="application/x-shockwave-flash" allowScriptAccess="always" type="application/x-shockwave-flash" pluginspage="http://www.adobe.com/go/getflashplayer"&gt;&lt;/embed&gt;&lt;/div&gt;<br />
&gt;<br />
&gt; &lt;!--<br />
&gt;       &lt;div id="elseWhere"&gt;<br />
&gt;               &lt;h3&gt;Flickr&lt;/h3&gt;<br />
&gt; &lt;p&gt;Online photo sharing&lt;/p&gt;<br />
&gt; &lt;P&gt;&lt;div class="ul_flickr"&gt;<br />
&gt; &lt;?php if ( (function_exists('get_flickrRSS')) ) { ?&gt;<br />
&gt;<br />
&gt;               &lt;?php get_flickrrss(); ?&gt;<br />
&gt;<br />
&gt; &lt;?php } else { ?&gt;<br />
&gt;<br />
&gt;               &lt;p&gt;If you have a Flickr account, you can display your photos here using the &lt;a href="http://eightface.com/code/wp-flickrrss/"&gt;flickrRSS&lt;/a&gt; plugin.&lt;/p&gt;<br />
&gt;<br />
&gt;               &lt;p&gt;If you have already downloaded the flickrRSS plugin, but are getting this message, &lt;a href="&lt;?php echo get_settings('home'); ?&gt;/wp-admin/plugins.php"&gt;click here to make sure that the plugin is activated&lt;/a&gt;.&lt;/p&gt;<br />
&gt;<br />
&gt;               &lt;p&gt;If you do not have a Flickr account you can:<br />
&gt;                       &lt;ul&gt;<br />
&gt;                               &lt;li&gt;Create a Flickr account at &lt;a href="http://www.flickr.com/signup/"&gt;flickr.com&lt;/a&gt;.&lt;/li&gt;<br />
&gt;                               &lt;li&gt;Remove this block.&lt;/li&gt;<br />
&gt;                       &lt;/ul&gt;<br />
&gt;               &lt;/p&gt;<br />
&gt;<br />
&gt; &lt;?php } ?&gt;<br />
&gt; &lt;div class="clear"&gt;&lt;/div&gt;<br />
&gt; &lt;/div&gt;&lt;/p&gt;<br />
&gt;       &lt;/div&gt; --&gt;<br />
&gt;<br />
&gt; &lt;div id="elseWhere"&gt;<br />
&gt; &lt;h3&gt;G.F.W Suck&lt;/h3&gt;<br />
&gt; &lt;p&gt;&lt;a href="http://blog.donews.com/keepwalking/archive/2006/06/01/898146.aspx"&gt;&lt;img src="http://blog.donews.com/images/blog_donews_com/keso/130783/o_f_ck_gfw.gif" alt="Anti-GFW" width="200" height="200" border="0"&gt;&lt;/a&gt;&lt;br /&gt;我已经没有理由相信神的存在，但是我相信冥冥中有种力量可以帮助我们，那就是真正的民意。&lt;/P&gt;&lt;/div&gt;<br />
&gt; &lt;div class="clear"&gt;&lt;/div&gt;<br />
&gt;       &lt;/div&gt;&lt;!-- close #imgLinks --&gt;<br />
&gt; &lt;/div&gt;&lt;!-- close #tertCol --&gt;</code></p>
<p>貌似second.php的这句代码还是不规范，先不管了，等有空再改，third.php的话问题还是很大，重复了的Div ID，还有在IE6下错位现象，就算我把ID问题修正了，IE6下照样抽筋。上次Guu帮小弟hack好的代码不知道什么时候又打回原形，真的对不起老弟的辛勤劳动啊！</p>
<p>今天还去Google检查了一下sitemap（为什么百度不去做做这一类便民服务呢？整天背骂不太好吧），发现也有n多错误，估计是sitemap插件的问题，看看才知道sitemap插件的版本已经是半年前了，难怪跟wp2.2不兼容，弄这个又花了老半天~今天就这样白白过了Orz...（今天正好教练所以没去空没学车）</p>
<p>At The End，刚收到Spock的邀请（貌似我没申请过哦），要的伸手，有3个名额，不知道Spock是什么的话<a href="http://www.google.com/search?q=Spock">Google一下</a>，<a href="http://www.baidu.com/s?wd=Spock">百度一下</a>也可以，当然如果你也是和我一样喜欢有道的话，也可以<a href="http://www.yodao.com/search?ue=utf8&amp;keyfrom=web.index&amp;q=Spock">试试</a>。</p>
]]></content:encoded>
			<wfw:commentRss>http://www.freemagi.com/2007/06/18/pride-and-prejudice/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Renew and update</title>
		<link>http://www.freemagi.com/2007/05/24/renew-and-update/</link>
		<comments>http://www.freemagi.com/2007/05/24/renew-and-update/#comments</comments>
		<pubDate>Thu, 24 May 2007 02:20:40 +0000</pubDate>
		<dc:creator>Evan</dc:creator>
				<category><![CDATA[Update]]></category>
		<category><![CDATA[Wordpress]]></category>
		<guid isPermaLink="false">http://www.freemagi.com/2007/05/24/renew-and-update/</guid>
		<description><![CDATA[WordPress 2.2发布已经有好几天了，小弟这几天无聊才把他给更新了，顺便也换了个theme，这个theme曾经因为wordpress.org.cn的Rip事件使作者和国内WordPress用户都十分尴尬。当时Grid Focus的作者Derek Punsalan已经把投诉邮件提交到bluehost了，幸好blue那边没几个会中文的，投诉处理才搁置了。还好在好几个网友的调解下Derek Punsalan也终于让步了，才会有今天他的release。 最近一直在家里蹲 ，总觉得无聊，但现在又相当的穷，想出去玩都不敢啊。辞职后工资到现在还没到手里，这个单位真够黑，都不知道有没有钱发。]]></description>
			<content:encoded><![CDATA[<p>WordPress 2.2发布已经有好几天了，小弟这几天无聊才把他给更新了，顺便也换了个theme，这个theme曾经因为<a href="http://wordpress.org.cn" title="WordPress China">wordpress.org.cn</a>的Rip事件使作者和国内WordPress用户都十分尴尬。当时<a href="http://5thirtyone.com/grid-focus" title="Grid Focus by: Derek Punsalan">Grid Focus</a>的作者Derek Punsalan已经把投诉邮件提交到bluehost了，幸好blue那边没几个会中文的，投诉处理才搁置了。还好在好几个网友的调解下Derek Punsalan也终于让步了，才会有今天他的release。</p>
<p>最近一直在家里蹲 ，总觉得无聊，但现在又相当的穷，想出去玩都不敢啊。辞职后工资到现在还没到手里，这个单位真够黑，都不知道有没有钱发。</p>
]]></content:encoded>
			<wfw:commentRss>http://www.freemagi.com/2007/05/24/renew-and-update/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>Update, PHP-4.4.4! Update, eAccelerator! Update, WordPress 2.0.6!</title>
		<link>http://www.freemagi.com/2007/01/07/update-update-update/</link>
		<comments>http://www.freemagi.com/2007/01/07/update-update-update/#comments</comments>
		<pubDate>Sun, 07 Jan 2007 14:30:00 +0000</pubDate>
		<dc:creator>Evan</dc:creator>
				<category><![CDATA[DreamHost]]></category>
		<category><![CDATA[Update]]></category>
		<category><![CDATA[Wordpress]]></category>
		<category><![CDATA[Compile]]></category>
		<category><![CDATA[eAccelerator]]></category>
		<category><![CDATA[Script]]></category>
		<guid isPermaLink="false">http://www.freemagi.com/2007/01/07/update-update-update/</guid>
		<description><![CDATA[[photopress:Night_of_Miracles_by_Licheus.jpg,full,pp_image] 前几天在robinz那看到了在Dreamhost上安装eAccelerator的教程，听说eAccelerator要比zend快多了，手就有点痒，这几天都在尝试编译安装PHP-4.4.4，但已经出错了三次，大都是因为脚本的问题，准备第四次的时候竟然一不小心rm -rf php *差点把所有东西都删了，幸好还有较早前的备份才恢复过来，今天就把WordPress升到2.0.6，趁还有时间顺便也把页面的css调整了一下，加了两张背景。 实际动手才发觉跟想象的也差太远了，安装PHP4就是因为参数和网数的问题令成功几率大大降低，而且在网上的那些脚本多数都不太完全对的，需要改动的地方也不少。就PHP4的编译小弟也积累了些经验， 刚开始我只按照robinz的方法装的，但是因为php4已经出到4.4.4了，而iMap也升级到2006了，2004g的下载地址也已经失效了，还有一好几个文件镜像都失效，后来只好参照Dreamhost官方提供的脚本重新编译，而又因为Dreamhost的脚本写的比较优美，所以我最后还是以它为基础按照robinz的参数重新安装。在这里有几点要注意的，Dreamhost提供的脚本是默认没有打开FastCGI参数的，而robinz上面又有几个变量稍微不同，还有编译的时候最好把脚本放到$HOME目录执行，这样才不会产生多余的php链接。 下面是我修改过的脚本 #!/bin/bash # Abort on any errors set -e # The domain in which to install the PHP CGI script. export DOMAIN="freemagi.com" # Update version information here. PHP="php-4.4.4" LIBICONV="libiconv-1.10" LIBMCRYPT="libmcrypt-2.5.7" LIBXML2="libxml2-2.6.23" LIBXSLT="libxslt-1.1.15" MHASH="mhash-0.9.4"; MHASH_TAR="${MHASH}a" # Pests! ZLIB="zlib-1.2.3" CURL="curl-7.15.2" LIBIDN="libidn-0.6.2" FREETYPE="freetype-2.1.10" IMAP="imap-2004g" # Set DISTDIR to somewhere persistent if [...]]]></description>
			<content:encoded><![CDATA[<p>[photopress:Night_of_Miracles_by_Licheus.jpg,full,pp_image]</p>
<p>前几天在<a href="http://blog.robinz.info/archives/2006/02/15/how-to-install-eacceleartor-on-dreamhosts-host/" target="_blank" title="How to Install eAcceleartor on Dreamhost’s HOST!">robinz</a>那看到了在<a href="http://www.dreamhost.com/r.cgi?251337" title="Dreamhost">Dreamhost</a>上安装eAccelerator的教程，听说<a href="http://www.chedong.com/blog/archives/001154.html" target="_blank" title="eAccelerator的安装和性能比较">eAccelerator要比zend快</a>多了，手就有点痒，这几天都在尝试编译安装PHP-4.4.4，但已经出错了三次，大都是因为脚本的问题，准备第四次的时候竟然一不小心rm -rf php *差点把所有东西都删了，幸好还有较早前的备份才恢复过来，今天就把WordPress升到2.0.6，趁还有时间顺便也把页面的css调整了一下，加了两张背景。</p>
<p>实际动手才发觉跟想象的也差太远了，安装PHP4就是因为参数和网数的问题令成功几率大大降低，而且在网上的那些脚本多数都不太完全对的，需要改动的地方也不少。就PHP4的编译小弟也积累了些经验， 刚开始我只按照<a href="http://blog.robinz.info/archives/2006/02/13/how-to-compile-php-442-on-dreamhosts-web-hosts/" target="_blank" title="How to compile PHP 4.4.2 on Dreamhost’s web hosts.">robinz</a>的方法装的，但是因为php4已经出到4.4.4了，而iMap也升级到2006了，2004g的下载地址也已经失效了，还有一好几个文件镜像都失效，后来只好参照<a href="http://www.dreamhost.com/r.cgi?251337" title="Dreamhost">Dreamhost</a>官方提供的<a href="http://wiki.dreamhost.com/index.php/Custom_compile_PHP_4" title="Installing PHP4">脚本</a>重新编译，而又因为<a href="http://www.dreamhost.com/r.cgi?251337" title="Dreamhost">Dreamhost</a>的脚本写的比较优美，所以我最后还是以它为基础按照<a href="http://blog.robinz.info/archives/2006/02/13/how-to-compile-php-442-on-dreamhosts-web-hosts/" target="_blank" title="How to compile PHP 4.4.2 on Dreamhost’s web hosts.">robinz</a>的参数重新安装。在这里有几点要注意的，<a href="http://www.dreamhost.com/r.cgi?251337" title="Dreamhost">Dreamhost</a>提供的脚本是默认没有打开FastCGI参数的，而<a href="http://blog.robinz.info/archives/2006/02/13/how-to-compile-php-442-on-dreamhosts-web-hosts/" target="_blank" title="How to compile PHP 4.4.2 on Dreamhost’s web hosts.">robinz</a>上面又有几个变量稍微不同，还有编译的时候最好把脚本放到$HOME目录执行，这样才不会产生多余的php链接。</p>
<p><span style="color: #8080c0">下面是我修改过的脚本</span></p>
<p><span id="more-15"></span></p>
<blockquote><p>#!/bin/bash</p>
<p># Abort on any errors<br />
set -e</p>
<p># The domain in which to install the PHP CGI script.<br />
export DOMAIN="freemagi.com"</p>
<p># Update version information here.<br />
PHP="php-4.4.4"<br />
LIBICONV="libiconv-1.10"<br />
LIBMCRYPT="libmcrypt-2.5.7"<br />
LIBXML2="libxml2-2.6.23"<br />
LIBXSLT="libxslt-1.1.15"<br />
MHASH="mhash-0.9.4"; MHASH_TAR="${MHASH}a" # Pests!<br />
ZLIB="zlib-1.2.3"<br />
CURL="curl-7.15.2"<br />
LIBIDN="libidn-0.6.2"<br />
FREETYPE="freetype-2.1.10"<br />
IMAP="imap-2004g"<br />
# Set DISTDIR to somewhere persistent if you plan to muck around with this<br />
# script and run it several times! It is where distributions are downloaded.<br />
DISTDIR=${HOME}/dist</p>
<p># Where do you want all this stuff built? Using a local filesystem is best.<br />
# ***Don't pick a directory that already exists!*** We clean up after<br />
# ourselves at the end!<br />
SRCDIR=${HOME}/source</p>
<p># And where should it be installed? A versioned directory eases upgrades!<br />
INSTALLDIR=${HOME}/${PHP}</p>
<p># A simple name link eases use<br />
ln -s ${INSTALLDIR} php<br />
# What PHP features do you want enabled?<br />
PHPFEATURES="--prefix=${INSTALLDIR} \<br />
--enable-force-cgi-redirect \<br />
--enable-gd-native-ttf \<br />
--enable-ftp \<br />
--enable-sockets \<br />
--enable-wddx \<br />
--enable-sqlite-utf8 \<br />
--enable-calendar \<br />
--enable-mbstring \<br />
--enable-mbregex \<br />
--enable-soap \<br />
--enable-fastcgi \<br />
--enable-exif \<br />
--with-config-file-path=${INSTALLDIR}/etc/php4 \<br />
--with-xml \<br />
--with-libxml-dir=${INSTALLDIR} \<br />
--with-freetype-dir=${INSTALLDIR} \<br />
--with-xsl=${INSTALLDIR} \<br />
--with-openssl=/usr \<br />
--with-mhash=${INSTALLDIR} \<br />
--with-mcrypt=${INSTALLDIR} \<br />
--with-zlib-dir=${INSTALLDIR} \<br />
--with-jpeg-dir=/usr \<br />
--with-png-dir=/usr \<br />
--with-gd \<br />
--with-mysql=/usr --with-mysqli \<br />
--with-curl=${INSTALLDIR} \<br />
--with-iconv=${INSTALLDIR} \<br />
--with-imap=${INSTALLDIR}<br />
--with-imap-ssl=/usr \<br />
--with-gettext \<br />
--without-pear"</p>
<p># ---- end of user-editable bits. Hopefully! ----</p>
<p># Push the install dir's bin directory into the path<br />
export PATH=${INSTALLDIR}/bin:$PATH</p>
<p>#setup directories<br />
mkdir -p ${SRCDIR}<br />
mkdir -p ${INSTALLDIR}<br />
mkdir -p ${DISTDIR}<br />
cd ${DISTDIR}</p>
<p># Get all the required packages<br />
wget -c <a href="http://us3.php.net/distributions/$%7BPHP%7D.tar.gz">http://us3.php.net/distributions/${PHP}.tar.gz</a><br />
wget -c <a href="http://ftp.gnu.org/pub/gnu/libiconv/$%7BLIBICONV%7D.tar.gz">http://ftp.gnu.org/pub/gnu/libiconv/${LIBICONV}.tar.gz</a><br />
wget -c <a href="http://easynews.dl.sourceforge.net/sourceforge/mcrypt/$%7BLIBMCRYPT%7D.tar.gz">http://easynews.dl.sourceforge.net/sourceforge/mcrypt/${LIBMCRYPT}.tar.gz</a><br />
wget -c <a href="http://xmlsoft.org/sources/xml/$%7BLIBXML2%7D.tar.gz">http://xmlsoft.org/sources/xml/${LIBXML2}.tar.gz</a><br />
wget -c <a href="http://xmlsoft.org/sources/xml/$%7BLIBXSLT%7D.tar.gz">http://xmlsoft.org/sources/xml/${LIBXSLT}.tar.gz</a><br />
wget -c <a href="http://easynews.dl.sourceforge.net/sourceforge/mhash/$%7BMHASH_TAR%7D.tar.gz">http://easynews.dl.sourceforge.net/sourceforge/mhash/${MHASH_TAR}.tar.gz</a><br />
wget -c <a href="http://www.zlib.net/$%7BZLIB%7D.tar.gz">http://www.zlib.net/${ZLIB}.tar.gz</a><br />
wget -c <a href="http://curl.haxx.se/download/$%7BCURL%7D.tar.gz">http://curl.haxx.se/download/${CURL}.tar.gz</a><br />
wget -c <a href="ftp://alpha.gnu.org/pub/gnu/libidn/$%7BLIBIDN%7D.tar.gz">ftp://alpha.gnu.org/pub/gnu/libidn/${LIBIDN}.tar.gz</a><br />
wget -c <a href="http://easynews.dl.sourceforge.net/sourceforge/freetype/$%7BFREETYPE%7D.tar.gz">http://easynews.dl.sourceforge.net/sourceforge/freetype/${FREETYPE}.tar.gz</a><br />
wget -c <a href="ftp://ftp.cac.washington.edu/imap/old/$%7BIMAP%7D.tar.Z">ftp://ftp.cac.washington.edu/imap/old/${IMAP}.tar.Z</a></p>
<p>cd ${SRCDIR}<br />
# Unpack them all<br />
tar xzf ${DISTDIR}/${PHP}.tar.gz<br />
tar xzf ${DISTDIR}/${LIBICONV}.tar.gz<br />
tar xzf ${DISTDIR}/${LIBMCRYPT}.tar.gz<br />
tar xzf ${DISTDIR}/${LIBXML2}.tar.gz<br />
tar xzf ${DISTDIR}/${LIBXSLT}.tar.gz<br />
tar xzf ${DISTDIR}/${MHASH_TAR}.tar.gz<br />
tar xzf ${DISTDIR}/${ZLIB}.tar.gz<br />
tar xzf ${DISTDIR}/${CURL}.tar.gz<br />
tar xzf ${DISTDIR}/${LIBIDN}.tar.gz<br />
tar xzf ${DISTDIR}/${FREETYPE}.tar.gz<br />
uncompress -cd ${DISTDIR}/${IMAP}.tar.Z |tar x</p>
<p># Build them in the required order to satisfy dependencies.</p>
<p>#libiconv<br />
cd ${SRCDIR}/${LIBICONV}<br />
./configure --enable-extra-encodings --prefix=${INSTALLDIR}<br />
make<br />
make install</p>
<p>#libxml2<br />
cd ${SRCDIR}/${LIBXML2}<br />
./configure --with-iconv=${INSTALLDIR} --prefix=${INSTALLDIR}<br />
make<br />
make install</p>
<p>#libxslt<br />
cd ${SRCDIR}/${LIBXSLT}<br />
./configure --with-libxml-prefix=${INSTALLDIR} --prefix=${INSTALLDIR}<br />
make<br />
make install</p>
<p>#zlib<br />
cd ${SRCDIR}/${ZLIB}<br />
./configure --shared --prefix=${INSTALLDIR}<br />
make<br />
make install</p>
<p>#libmcrypt<br />
cd ${SRCDIR}/${LIBMCRYPT}<br />
./configure --disable-posix-threads --prefix=${INSTALLDIR}<br />
make<br />
make install</p>
<p>#mhash<br />
cd ${SRCDIR}/${MHASH}<br />
./configure --prefix=${INSTALLDIR}<br />
make<br />
make install<br />
# FIXME: For some reason, mincludes.h isn't copied across<br />
cp ${SRCDIR}/${MHASH}/include/mutils/mincludes.h ${INSTALLDIR}/include/mutils</p>
<p>#libidn<br />
cd ${SRCDIR}/${LIBIDN}<br />
./configure --with-iconv-prefix=${INSTALLDIR} --prefix=${INSTALLDIR}<br />
make<br />
make install</p>
<p>#cURL<br />
cd ${SRCDIR}/${CURL}<br />
./configure --with-ssl=${INSTALLDIR} --with-zlib=${INSTALLDIR} \<br />
--with-libidn=${INSTALLDIR} --enable-ipv6 --enable-cookies \<br />
--enable-crypto-auth --prefix=${INSTALLDIR}<br />
make<br />
make install</p>
<p>#freetype<br />
cd ${SRCDIR}/${FREETYPE}<br />
./configure --prefix=${INSTALLDIR}<br />
make<br />
make install</p>
<p># imap<br />
cd ${SRCDIR}/${IMAP}<br />
make ldb<br />
# Install targets are for wusses!<br />
cp c-client/c-client.a ${INSTALLDIR}/lib/libc-client.a<br />
cp c-client/*.h ${INSTALLDIR}/include</p>
<p>#PHP 4<br />
cd ${SRCDIR}/${PHP}<br />
./configure ${PHPFEATURES}<br />
make<br />
make install</p>
<p>#copy config file<br />
mkdir -p ${INSTALLDIR}/etc/php4<br />
cp ${SRCDIR}/${PHP}/php.ini-dist ${INSTALLDIR}/etc/php4/php.ini</p>
<p>#copy PHP CGI<br />
mkdir -p ${HOME}/${DOMAIN}/cgi-bin<br />
chmod 0755 ${HOME}/${DOMAIN}/cgi-bin<br />
cp ${INSTALLDIR}/bin/php ${HOME}/${DOMAIN}/cgi-bin/php.cgi<br />
echo ---------- INSTALL COMPLETE! ----------</p></blockquote>
<p><strong>Download:</strong> <a href="http://freemagi.com/wp-content/uploads/instphp4.sh">instphp4.sh</a></p>
<p>运行</p>
<blockquote><p><code>chmod +x instphp4.sh<br />
./instphp4.sh</code></p></blockquote>
<hr />然后就到安装我们这次的主角eAcceleartor，开始安装前还要几步准备工作，先把autoconf和automake装上，可以参考<a href="http://blog.robinz.info/archives/2006/02/15/how-to-install-eacceleartor-on-dreamhosts-host/" target="_blank" title="How to Install eAcceleartor on Dreamhost’s HOST!">robinz</a>的做法，而我是选择安装在~/local，因个人情况不同。安装autoconf</p>
<blockquote><p><code>wget <a href="http://ftp.gnu.org/gnu/autoconf/autoconf-2.59.tar.bz2">http://ftp.gnu.org/gnu/autoconf/autoconf-2.59.tar.bz2</a><br />
tar -xjf autoconf-2.59.tar.bz2<br />
cd autoconf-2.59<br />
./configure -prefix=YOUR PATH<br />
make<br />
make install</code></p></blockquote>
<p>安装automake</p>
<blockquote><p><code>wget <a href="http://ftp.gnu.org/gnu/automake/automake-1.9.6.tar.bz2">http://ftp.gnu.org/gnu/automake/automake-1.9.6.tar.bz2</a><br />
tar -xjf automake-1.9.6.tar.bz2<br />
cd automake-1.9.6<br />
./configure -prefix=YOUR PATH<br />
make<br />
make install</code></p></blockquote>
<p>然后我们来看看eAccelerator的软件环境需求：<br />
apache 1.3, apache 2.0 (prefork), mod_php4/5<br />
我们的<a href="http://www.dreamhost.com/r.cgi?251337" title="Dreamhost">Dreamhost</a>都能够支持，好了，下面到请主角出场：</p>
<p>安装eAccelerator（下面的地址如果不通的话最好自己到eAccelerator的<a href="http://sourceforge.net/projects/eaccelerator/" target="_blank" title="PojectPage">PojectPage</a>找合适的镜像）</p>
<blockquote><p>wget <a href="http://voxel.dl.sourceforge.net/sourceforge/eaccelerator/eaccelerator-0.9.5.tar.bz2">http://voxel.dl.sourceforge.net/sourceforge/eaccelerator/eaccelerator-0.9.5.tar.bz2</a><br />
tar -xjf eaccelerator-0.9.5.tar.bz2<br />
cd eaccelerator-0.9.5<br />
export PATH=$PATH:YOUR PATH/bin #这里的是指你安装autoconf的目录，譬如我的是$HOME/local/bin<br />
export PHP_PREFIX=YOUR PHP PATH #这里是你的安装php的位置，就是$HOME/php，但有一个小细节要注意的，在<a href="http://blog.robinz.info/archives/2006/02/15/how-to-install-eacceleartor-on-dreamhosts-host/" target="_blank" title="How to Install eAcceleartor on Dreamhost’s HOST!">robinz</a>的文里是写export PHP_PREFIX= YOUR PHP PATH/bin的，其实如果这样写的话，configure是不会成功的<br />
$PHP_PREFIX/bin/phpize<br />
./configure -prefix=YOUR PATH --enable-eaccelerator=shared --with-php-config=$PHP_PREFIX/bin/php-config<br />
make<br />
make install #最好还是make install一下，不make install会有la文件<br />
mv YOUR PHP PATH/lib/php/extensions/no-debug-non-zts-<span style="color: #800080">一行数字</span>/eaccelerator.so YOUR PHP PATH/lib/php/extensions/<br />
rm -r YOUR PHP PATH/lib/php/extensions/no-debug-non-zts-<span style="color: #800080">一行数字</span>/</p></blockquote>
<hr />上面结束以后还不用急，还要设置一下php.ini<br />
cp /etc/php/cgi/php.ini "$HOME/[your website directory]/cgi-bin/"<br />
然后再改一下这个复制过来的文件把文件末的以zend开头的两行都删掉<br />
把下面的这些文字加到文件末尾</p>
<blockquote><p><code>[eAccelerator]<br />
zend_extension="/home/YOUR PHP PATH/lib/php/extensions/eaccelerator.so"<br />
eaccelerator.shm_size="16"<br />
eaccelerator.cache_dir="/home/YOUR HOME/tmp/eaccelerator"<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="0"<br />
eaccelerator.shm_prune_period="0"<br />
eaccelerator.shm_only="0"<br />
eaccelerator.compress="1"<br />
eaccelerator.compress_level="9"</code></p>
<p>[Zend]<br />
zend_extension="/usr/local/dh/apache/template/phpext/ZendExtensionManager.so"<br />
zend_extension="/usr/local/dh/apache/template/phpext/zend_optimizer4/ZendOptimizer.so"<br />
zend_optimizer.optimization_level=1023</p></blockquote>
<p>然后再运行</p>
<blockquote><p>mkdir -p ~/tmp/eaccelerator<br />
chmod 777 ~/tmp/eaccelerator</p></blockquote>
<p>最后，别忘了在你的.htaccess文件里加上</p>
<blockquote><p><code>AddHandler phpFour .php<br />
Action phpFour /cgi-bin/php.cgi</code></p></blockquote>
<p>再下一个<a href="http://depoch.net/download.htm" title="iProber 探针">iProber 探针</a>，看看PHPINFO就可以看到</p>
<blockquote><p>This program makes use of the Zend Scripting Language Engine:<br />
Zend Engine v1.3.0, Copyright (c) 1998-2004 Zend Technologies with eAccelerator v0.9.5, Copyright (c) 2004-2006 eAccelerator, by eAccelerator with Zend Extension Manager v1.0.9, Copyright (c) 2003-2006, by Zend Technologies with Zend Optimizer v2.6.2, Copyright (c) 1998-2006, by Zend Technologies</p></blockquote>
<hr /><span style="font-size: 150%"><br />
<span style="font-family: Verdana">ENJOY!<br />
</span></span><span style="font-family: Verdana"><span style="font-family: Verdana">最后再附送两个备份脚本，分别是备份MySQL和文件到别的ftp上的脚本，写得比较草，不要笑小弟[发现几个错误，请把原asc改成gpg]<span style="font-family: Verdana"><code><br />
</code></span></span></span></p>
<blockquote><p><span style="font-family: Verdana"><code><span style="font-size: 100%">先是数据库备份脚本<br />
<code><span style="font-size: 100%">#ftp Info<br />
host=HOST #ftp host<br />
UserName=USER #ftp user name<br />
Passwd=PASSWD #fto user password</span></code></span></code></span></p>
<p>#MySQL Info<br />
SQL_host=DB_HOST #MySQL host<br />
SQL_User=DB_USER #MySQL UserName<br />
SQL_Passwd=DB_PASSWD #User Password<br />
SQL_db=DB_NAME #database name</p>
<p>backup_path=/home/YOUR TMP PATH #set saved backup path<br />
file=$SQL_db-$(date +%Y%m%d).tar.gz<br />
MySQL_path=/usr/bin #set the mysql database bin path</p>
<p>cd $backup_path<br />
#export database<br />
$MySQL_path/mysqldump -h $SQL_host -u$SQL_User -p$SQL_Passwd --databases $SQL_db&gt;$SQL_db.dump</p>
<p>sleep 5s<br />
#file tar<br />
tar -czf $backup_path/$file $SQL_db.dump<br />
gpg -e -r GPGID $file #有关gpg加解密请<a href="http://www.google.com/search?hl=zh-CN&amp;lr=&amp;newwindow=1&amp;q=gpg%E4%BD%BF%E7%94%A8&amp;suggest=1&amp;sa=X&amp;oi=cjkrefinements_zh-CN_nav&amp;ct=result&amp;cd=2" target="_blank" title="GOOGLE">GOOGLE一下</a></p>
<p>cd $backup_path</p>
<p>#file ftp<br />
ftp -i -n &lt;&lt;!<br />
open $host<br />
user $UserName $Passwd<br />
cd /dbbak #请事先在你的备份用FTP上建立此目录<br />
put $file.gpg<br />
bye<br />
!</p>
<p>sleep 10s<br />
rm -rf $backup_path/$file<br />
rm -rf $backup_path/$SQL_db.dump<br />
rm -rf $backup_path/$file.gpg</p>
<hr /></blockquote>
<blockquote><p><code>然后是文件备份的<br />
WEBFILE=webdir-$(date +%Y%m%d).tar.gz<br />
cd $HOME</code></p>
<p>sleep 1s<br />
tar -czf $HOME/YOUR TMP PATH/webdir-$(date +%Y%m%d).tar.gz $HOME/YOUR PATH</p>
<p>sleep 10s<br />
cd $HOME/YOUR TMP PATH<br />
gpg -e -r YOUR GPG ID $WEBFILE</p>
<p>sleep 15s<br />
ftp -i -n &lt;&lt;!<br />
open YOUR FTP HOST<br />
user USERNAME PASSWD<br />
cd webbak #这个也是要事先建好<br />
put $WEBFILE.gpg<br />
bye<br />
!</p>
<p>sleep 5s<br />
rm -rf $HOME/YOUR TMP PATH/$WEBFILE.gpg<br />
rm -rf $HOME/YOUR TMP PATH/$WEBFILE</p></blockquote>
<blockquote><hr /><span style="font-size: 150%; font-family: Verdana">Enjoy!</span></p></blockquote>
]]></content:encoded>
			<wfw:commentRss>http://www.freemagi.com/2007/01/07/update-update-update/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Update to 2.0.5</title>
		<link>http://www.freemagi.com/2006/11/01/update-to-205/</link>
		<comments>http://www.freemagi.com/2006/11/01/update-to-205/#comments</comments>
		<pubDate>Wed, 01 Nov 2006 04:12:03 +0000</pubDate>
		<dc:creator>Evan</dc:creator>
				<category><![CDATA[Misc]]></category>
		<category><![CDATA[Update]]></category>
		<guid isPermaLink="false">http://www.freemagi.com/2006/11/01/update-to-205/</guid>
		<description><![CDATA[听说2.0.4不安全，今天就花了近一天的时间把WordPress升级到2.0.5啦~~~顺便再把4u升级一下，听了Md5的意见，把滑动区域取消了，果然简单明了才是王道。 顺带一提，昨天竟然被Utombox点名了~呵呵，小弟这个破站终于有人来看了，好开心哦！继续努力！]]></description>
			<content:encoded><![CDATA[<p>听说2.0.4不安全，今天就花了近一天的时间把WordPress升级到2.0.5啦~~~顺便再把4u升级一下，听了<a href="http://www.freemagi.com/2006/09/07/hello-world/#comment-2">Md5</a>的意见，把滑动区域取消了，果然简单明了才是王道。</p>
<p>顺带一提，昨天竟然被<a title="Update my contents!" target="_blank" href="http://utombox.com/2006/10/30/update-my-contents/">Utombox</a>点名了~呵呵，小弟这个破站终于有人来看了，好开心哦！继续努力！</p>
]]></content:encoded>
			<wfw:commentRss>http://www.freemagi.com/2006/11/01/update-to-205/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>
