<?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>Giroro Mk-II&#039;s Blog</title>
	<atom:link href="http://www.giroro.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.giroro.com</link>
	<description>Jack of all trades, and master of none.</description>
	<lastBuildDate>Wed, 30 Nov 2011 06:40:42 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.2</generator>
		<item>
		<title>Amazon EC2学习笔记(五)&#8212;&#8212;挽救因升级挂掉的EC2 Instance</title>
		<link>http://www.giroro.com/amazon-ec2-study-notes-5/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=amazon-ec2-study-notes-5</link>
		<comments>http://www.giroro.com/amazon-ec2-study-notes-5/#comments</comments>
		<pubDate>Wed, 30 Nov 2011 06:28:41 +0000</pubDate>
		<dc:creator>Giroro</dc:creator>
				<category><![CDATA[Study]]></category>
		<category><![CDATA[Amazon EC2]]></category>
		<category><![CDATA[VPS]]></category>

		<guid isPermaLink="false">http://www.giroro.com/amazon-ec2%e5%ad%a6%e4%b9%a0%e7%ac%94%e8%ae%b0%e4%ba%94%e6%8c%bd%e6%95%91%e6%8c%82%e6%8e%89%e7%9a%84ec2-instance/</guid>
		<description><![CDATA[前言 上一篇笔记介绍了Giroro将自己的Amazon Linux从2010.11.1 Beta升级到2011.02 Beta的步骤，日前，Giroro偶然发现了Amazon不声不响的又将Amazon Linux升级到了2011.09版(没有Beta标签了哦)，于是Giroro就打算故技重施，继续升级至最新版。但是运气不佳的Giroro在升级完成后，却再也无法连接上instance，然后查阅更新说明的时候，无奈的发现Known Issues里赫然写着“After using yum to upgrade to Amazon Linux AMI 2011.09, t1.micro 32-bit instances fail to reboot.”- -而由于Giroro并没有备份的习惯，所以只好苦逼地想方设法挽救已死的instance……所幸在木头的提醒下(他的instance也挂过- -)，Giroro终于找到了办法，将数据从原instance里弄了出来，并最终复活了这个部落格。 PS: 这篇笔记并不是教人如何将无法启动的instance重新启起来，而是想办法从原instance的硬盘里把网站相关数据迁移出来，并移植到另一个EC2 instance里。所以如果你想问怎样让升级后挂掉的instance起死回生，对不起，Giroro做不到…… 正文 这个方法的基本思路是将挂掉的instance的硬盘挂载在一个新instance上，然后将硬盘里面的数据复制到新instance里去。具体步骤如下： 1. 关闭挂掉的EC2 Instance 2. 将硬盘从原instance上卸载 3. Launch一个新EC2 Instance，具体细节第一篇笔记里介绍得很清楚，这里就不赘述了 4. 将硬盘安装到新instance上，安装位置为/dev/sda2(因为新instance会新建一个Volume并安装在/dev/sda1上，所以我们要换一个位置) PS: 我不确定EC2 Instance是否支持热插拔，所以建议先关闭instance，安装硬盘之后再启动。不过要注意，关闭再启动instance之后，Elastic IP需要重新关联，切记！ 5. 在/mnt目录下建立文件夹以挂载刚安装的硬盘 6. 挂载硬盘到刚才建立的挂载点 好了，现在就可以在这个文件夹下访问之前硬盘里的所有内容了。于是Giroro赶紧把/home/wwwroot和/usr/local/mysql/var下面的文件挪到了新instance上，同时还把/usr/local/nginx/conf下的一些配置文件挪了过去。然后重启instance，重启LNMP，大功告成！ 结束 其实整个操作还是挺简单的，而且由于种种原因，Amazon的北加州机房访问速度越来越慢，所以趁此机会，Giroro将自己的instance挪到了日本机房。不过这种跨Region的迁移就没有上面写的那么简单了，最主要的问题就是在日本机房是无法看到北加州机房里的EBS。所以其实Giroro的做法是将需迁移的文件夹打包下载了下来，然后重新上传至日本的instance，稍微麻烦了点。而且在这过程中我还发现2011.09版的Amazon Linux已经不能像第二篇笔记结束时介绍的那样，通过把authorized_keys复制到/home/www/.ssh文件夹下来开启www用户的登录了，这一点大家需要注意。]]></description>
			<content:encoded><![CDATA[<h3 style="text-align: left;">前言</h3>
<p style="text-align: left;"><a href="http://www.giroro.com/amazon-ec2-study-notes-4/" target="_blank">上一篇笔记</a>介绍了Giroro将自己的Amazon Linux从2010.11.1 Beta升级到2011.02 Beta的步骤，日前，Giroro偶然发现了Amazon不声不响的又将Amazon Linux升级到了2011.09版(没有Beta标签了哦)，于是Giroro就打算故技重施，继续升级至最新版。但是运气不佳的Giroro在升级完成后，却再也无法连接上instance，然后查阅更新说明的时候，无奈的发现Known Issues里赫然写着“After using yum to upgrade to Amazon Linux AMI 2011.09, t1.micro 32-bit instances fail to reboot.”- -而由于Giroro并没有备份的习惯，所以只好苦逼地想方设法挽救已死的instance……所幸在<a href="http://www.boisgames.com/" target="_blank">木头</a>的提醒下(他的instance也挂过- -)，Giroro终于找到了办法，将数据从原instance里弄了出来，并最终复活了这个部落格。</p>
<p style="text-align: left;">PS: 这篇笔记并不是教人如何将无法启动的instance重新启起来，而是想办法从原instance的硬盘里把网站相关数据迁移出来，并移植到另一个EC2 instance里。所以如果你想问怎样让升级后挂掉的instance起死回生，对不起，Giroro做不到……</p>
<h3 style="text-align: left;">正文</h3>
<p style="text-align: left;">这个方法的基本思路是将挂掉的instance的硬盘挂载在一个新instance上，然后将硬盘里面的数据复制到新instance里去。具体步骤如下：<br />
<span id="more-142"></span><br />
1. 关闭挂掉的EC2 Instance</p>
<p style="text-align: left;"><a href="http://i.minus.com/ibyNnoRzL2pEd4.JPG" target="_blank"><img src="http://i.minus.com/ibyNnoRzL2pEd4.JPG" alt="" /></a></p>
<p style="text-align: left;">2. 将硬盘从原instance上卸载</p>
<p style="text-align: left;"><a href="http://i.minus.com/ihm1EMGcEv3iV.JPG" target="_blank"><img src="http://i.minus.com/ihm1EMGcEv3iV.JPG" alt="" /></a></p>
<p style="text-align: left;">3. Launch一个新EC2 Instance，具体细节<a href="http://www.giroro.com/amazon-ec2-study-notes-1/" target="_blank">第一篇笔记</a>里介绍得很清楚，这里就不赘述了</p>
<p style="text-align: left;">4. 将硬盘安装到新instance上，安装位置为/dev/sda2(因为新instance会新建一个Volume并安装在/dev/sda1上，所以我们要换一个位置)</p>
<p style="text-align: left;"><a href="http://i.minus.com/ibb55fFHx4k6jy.JPG" target="_blank"><img src="http://i.minus.com/ibb55fFHx4k6jy.JPG" alt="" /></a></p>
<p style="text-align: left;">PS: 我不确定EC2 Instance是否支持热插拔，所以建议先关闭instance，安装硬盘之后再启动。不过要注意，关闭再启动instance之后，Elastic IP需要重新关联，切记！</p>
<p style="text-align: left;">5. 在/mnt目录下建立文件夹以挂载刚安装的硬盘</p>
<p style="text-align: left;"><a href="http://i.minus.com/ibmCeIf4qwy3gN.JPG" target="_blank"><img src="http://i.minus.com/ibmCeIf4qwy3gN.JPG" alt="" /></a></p>
<p style="text-align: left;">6. 挂载硬盘到刚才建立的挂载点</p>
<p style="text-align: left;"><a href="http://i.minus.com/iZT5Si8bWquA0.JPG" target="_blank"><img src="http://i.minus.com/iZT5Si8bWquA0.JPG" alt="" /></a></p>
<p style="text-align: left;">好了，现在就可以在这个文件夹下访问之前硬盘里的所有内容了。于是Giroro赶紧把/home/wwwroot和/usr/local/mysql/var下面的文件挪到了新instance上，同时还把/usr/local/nginx/conf下的一些配置文件挪了过去。然后重启instance，重启LNMP，大功告成！</p>
<h3 style="text-align: left;">结束</h3>
<p style="text-align: left;">其实整个操作还是挺简单的，而且由于种种原因，Amazon的北加州机房访问速度越来越慢，所以趁此机会，Giroro将自己的instance挪到了日本机房。不过这种跨Region的迁移就没有上面写的那么简单了，最主要的问题就是在日本机房是无法看到北加州机房里的EBS。所以其实Giroro的做法是将需迁移的文件夹打包下载了下来，然后重新上传至日本的instance，稍微麻烦了点。而且在这过程中我还发现2011.09版的Amazon Linux已经不能像<a href="http://www.giroro.com/amazon-ec2-study-notes-2/" target="_blank">第二篇笔记</a>结束时介绍的那样，通过把authorized_keys复制到/home/www/.ssh文件夹下来开启www用户的登录了，这一点大家需要注意。</p>
]]></content:encoded>
			<wfw:commentRss>http://www.giroro.com/amazon-ec2-study-notes-5/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to Download Standalone Install Package for Google Chrome</title>
		<link>http://www.giroro.com/download-standalone-package-for-chrome/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=download-standalone-package-for-chrome</link>
		<comments>http://www.giroro.com/download-standalone-package-for-chrome/#comments</comments>
		<pubDate>Thu, 03 Nov 2011 03:29:09 +0000</pubDate>
		<dc:creator>Giroro</dc:creator>
				<category><![CDATA[Software]]></category>
		<category><![CDATA[Chrome]]></category>
		<category><![CDATA[Google]]></category>

		<guid isPermaLink="false">http://www.giroro.com/how-to-download-standalone-install-package-for-google-chrome/</guid>
		<description><![CDATA[Preface Every time when you want to install Chrome for Windows, you always get a very small, web-based installation file. It will be a problem when you want to install it on a computer which has no Internet connection. So here is how you can retrieve a standalone install package file for Chrome. Body 1. [...]]]></description>
			<content:encoded><![CDATA[<h3 style="text-align: left;">Preface</h3>
<p style="text-align: left;">Every time when you want to install Chrome for Windows, you always get a very small, web-based installation file. It will be a problem when you want to install it on a computer which has no Internet connection. So here is how you can retrieve a standalone install package file for Chrome.</p>
<p><span id="more-128"></span></p>
<h3 style="text-align: left;">Body</h3>
<p style="text-align: left;">1. Latest stable version:</p>
<p style="text-align: left;">Go directly here: <a href="http://www.google.com/chrome/eula.html?standalone=1">http://www.google.com/chrome/eula.html?standalone=1</a></p>
<p style="text-align: left;">2. Any specified version, including Beta, Dev and Stable</p>
<p style="text-align: left;">http://dl.google.com/chrome/install/xxx.xx/chrome_installer.exe</p>
<p style="text-align: left;">Here is a template link, you can replace the xxx.xx with any version you want. For example, the latest stable version is 15.0.874.106, so the link should be <a href="http://dl.google.com/chrome/install/874.106/chrome_installer.exe">http://dl.google.com/chrome/install/<span style="color: #ff0000;">874.106</span>/chrome_installer.exe</a>. Quite easy, isn’t it?</p>
<p style="text-align: left;">If you are not aware of the version, please check <a href="http://googlechromereleases.blogspot.com/" target="_blank">Google Chrome Releases</a> for further details.</p>
<p style="text-align: left;">Cited from <a href="http://goto8848.net/">goto8848.net</a>, and the link of the article is <a href="http://goto8848.net/2009/08/howto-download-google-chrome-standalone-package/" target="_blank">here</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.giroro.com/download-standalone-package-for-chrome/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Automatically Install Microsoft YaHei on Ubuntu</title>
		<link>http://www.giroro.com/install-yahei-on-ubuntu/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=install-yahei-on-ubuntu</link>
		<comments>http://www.giroro.com/install-yahei-on-ubuntu/#comments</comments>
		<pubDate>Mon, 31 Oct 2011 11:36:20 +0000</pubDate>
		<dc:creator>Giroro</dc:creator>
				<category><![CDATA[Study]]></category>
		<category><![CDATA[Linux]]></category>

		<guid isPermaLink="false">http://www.giroro.com/automatically-install-microsoft-yahei-on-ubuntu/</guid>
		<description><![CDATA[Preface Ubuntu released 11.10 earlier this month, and immediately I got it installed on my laptop. But I always feel bad about the default font, so I find out one automatical way to install Microsoft YaHei on Ubuntu. Sounds good, isn’t it? But if you feel so terrible about Microsoft that you don’t even want [...]]]></description>
			<content:encoded><![CDATA[<h3 style="text-align: left;">Preface</h3>
<p style="text-align: left;">Ubuntu released 11.10 earlier this month, and immediately I got it installed on my laptop. But I always feel bad about the default font, so I find out one automatical way to install Microsoft YaHei on Ubuntu. Sounds good, isn’t it? But if you feel so terrible about Microsoft that you don’t even want to touch anything from M$, you can just ignore this article.</p>
<p><span id="more-123"></span></p>
<h3 style="text-align: left;">Body</h3>
<p style="text-align: left;">In fact this method is designed for Ubuntu 8.10 and 9.04, but according to my test, it works well on 11.10, so just go ahead.</p>
<p style="text-align: left;"><strong><span style="color: #ff0000;">Install:</span></strong></p>
<pre class="brush:shell">wget -O get-fonts.sh.zip http://files.cnblogs.com/DengYangjun/get-fonts.sh.zip
unzip -o get-fonts.sh.zip 1&gt;/dev/null
chmod a+x get-fonts.sh
./get-fonts.sh</pre>
<p style="text-align: left;"><strong><span style="color: #ff0000;">Remove the install shell and downloaded fonts:</span></strong></p>
<pre class="brush:shell">rm get-fonts.sh get-fonts.sh.zip 2&gt;/dev/null</pre>
<p style="text-align: left;"><strong><span style="color: #ff0000;">Restore default font settings:</span></strong></p>
<pre class="brush:shell">cd /etc/fonts/conf.avail
sudo mv 51-local.conf.old 51-local.conf 2&gt;/dev/null
sudo mv 69-language-selector-zh-cn.conf.old 69-language-selector-zh-cn.conf 2&gt;/dev/null
sudo rm -f -r /usr/share/fonts/truetype/myfonts 2&gt;/dev/null</pre>
<p style="text-align: left;">Please notice that I’m using zh-cn locale, so I’m not sure which file you should change if you’re using en as locale. And I think YaHei works well for Chinese and Japanese, but I’m not sure for other languages, please try it yourself:)</p>
<p style="text-align: left;">Cited from <a href="http://www.ubuntuhome.com">Ubuntu Home</a>, and the link of the article is <a href="http://www.ubuntuhome.com/ubuntu-yahe-fonts.html">here</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.giroro.com/install-yahei-on-ubuntu/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Add A Site Group to Specialty Sites in iStore</title>
		<link>http://www.giroro.com/add-site-group-to-specialty-sites/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=add-site-group-to-specialty-sites</link>
		<comments>http://www.giroro.com/add-site-group-to-specialty-sites/#comments</comments>
		<pubDate>Thu, 25 Aug 2011 03:56:51 +0000</pubDate>
		<dc:creator>Giroro</dc:creator>
				<category><![CDATA[Work]]></category>
		<category><![CDATA[iStore R12]]></category>
		<category><![CDATA[Oracle]]></category>

		<guid isPermaLink="false">http://www.giroro.com/add-a-site-group-to-specialty-sites-in-istore/</guid>
		<description><![CDATA[Preface Still in my recent iStore project, I was asked to add a site group to the specialty sites page. Because our test instance is a vision instance, so there are many site groups and sites in that page. Thus all our customized sites are categorized into “Other Sites” and it’s really ugly. Here are [...]]]></description>
			<content:encoded><![CDATA[<h3 style="text-align: left;">Preface</h3>
<p style="text-align: left;">Still in my recent iStore project, I was asked to add a site group to the specialty sites page. Because our test instance is a vision instance, so there are many site groups and sites in that page. Thus all our customized sites are categorized into “Other Sites” and it’s really ugly. Here are the steps.</p>
<h3 style="text-align: left;">Body</h3>
<p style="text-align: left;">1. Login to EBS</p>
<p><span id="more-114"></span></p>
<p style="text-align: left;">2. Navigate to Application Developer –&gt; Application –&gt; Lookups, click Application Object Library</p>
<p style="text-align: left;"><a href="http://i.min.us/idwveUUH3.JPG" target="_blank"><img src="http://i.min.us/idwveUUH3.JPG" alt="" /></a></p>
<p style="text-align: left;">3. Search for Lookup IBE_M_SITE_GROUP</p>
<p style="text-align: left;"><a href="http://i.min.us/icZoYpFpW.JPG" target="_blank"><img src="http://i.min.us/icZoYpFpW.JPG" alt="" /></a></p>
<p style="text-align: left;">4. Add a new entry and save, the meaning column will be the title of your site group</p>
<p style="text-align: left;">OK, now it’s done. But if you want to add some sites to this group, please continue doing the following steps.</p>
<p style="text-align: left;">5. Go back to EBS, navigate to iStore Administrator –&gt; iStore Merchant –&gt; Sites –&gt; Summary –&gt; Summary</p>
<p style="text-align: left;"><a href="http://i.min.us/ic1PQEATi.JPG" target="_blank"><img src="http://i.min.us/ic1PQEATi.JPG" alt="" /></a></p>
<p style="text-align: left;">6. Select the site you want to add, click Update</p>
<p style="text-align: left;"><a href="http://i.min.us/icVkx5Dd8.JPG" target="_blank"><img src="http://i.min.us/icVkx5Dd8.JPG" alt="" /></a></p>
<p style="text-align: left;">7. Click Responsibility, then click Assign Groups</p>
<p style="text-align: left;"><a href="http://i.min.us/i4xapFrp.JPG" target="_blank"><img src="http://i.min.us/i4xapFrp.JPG" alt="" /></a></p>
<p style="text-align: left;">8. Select your newly created group, add it to the right pane called “Assigned Groups”</p>
<p style="text-align: left;"><a href="http://i.min.us/icGGoHvFa.JPG" target="_blank"><img src="http://i.min.us/icGGoHvFa.JPG" alt="" /></a></p>
<p style="text-align: left;">9. Go to iStore Specialty Sites page, check the result</p>
<p><a href="http://i.min.us/iyh3BJl6.JPG" target="_blank"><img class="alignleft" src="http://i.min.us/iyh3BJl6.JPG" alt="" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.giroro.com/add-site-group-to-specialty-sites/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How To Deploy Custom JAR files for Oracle iStore R12</title>
		<link>http://www.giroro.com/deploy-custom-jar-for-istore-r12/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=deploy-custom-jar-for-istore-r12</link>
		<comments>http://www.giroro.com/deploy-custom-jar-for-istore-r12/#comments</comments>
		<pubDate>Wed, 24 Aug 2011 06:08:28 +0000</pubDate>
		<dc:creator>Giroro</dc:creator>
				<category><![CDATA[Work]]></category>
		<category><![CDATA[iStore R12]]></category>
		<category><![CDATA[Oracle]]></category>

		<guid isPermaLink="false">http://www.giroro.com/how-to-deploy-custom-jsp-and-jar-files-for-oracle-istore-r12/</guid>
		<description><![CDATA[Preface Recently I’ve been working on a project to customize Oracle iStore R12, and I encountered a little problem when including custom jar files in my code. But it’s very odd that many people on the Internet have already got this problem while nobody can offer a solution. So I created a SR and finally [...]]]></description>
			<content:encoded><![CDATA[<h3 style="text-align: left;">Preface</h3>
<p style="text-align: left;">Recently I’ve been working on a project to customize Oracle iStore R12, and I encountered a little problem when including custom jar files in my code. But it’s very odd that many people on the Internet have already <a href="https://forums.oracle.com/forums/thread.jspa?messageID=9337009">got this problem</a> while nobody can offer a solution. So I created a SR and finally got the answer from Oracle.</p>
<h3 style="text-align: left;">Body</h3>
<p style="text-align: left;">Oracle has a document talking about my issue in 11i, whose document id is 468181.1. But I found the architecture of iStore changed so greatly from 11i to R12 that the document is obsolete now. Because that document asks me to edit $IAS_ORACLE_HOME/Apache/Jserv/etc/jserv.properties, but this file doesn’t even exist in R12.</p>
<p><span id="more-105"></span></p>
<p style="text-align: left;">So, the way to include a custom jar lib is to edit <span style="color: #ff0000;">$ORA_CONFIG_HOME/10.1.3/j2ee/oacore/application-deployments/oacore/orion-application.xml</span>, which is the correct configuration file for iStore R12. And we should add entries like this: &lt;library path=&#8221;/&lt;your directory&gt;/customstore.jar&#8221; /&gt;. Then bounce the oacore and enjoy <img src='http://www.giroro.com/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p style="text-align: left;">PS: If you are viewing the document 468181.1 in metalink now, you should find the steps I said above, and the title is “R12/11: How To Deploy Custom JSP and JAR files for Oracle iStore?”. But before I raised my SR, the title of this document is “11i: How To Deploy Custom JSP and JAR files for Oracle iStore?”, and there is no R12 contents, so it’s obivous that Oracle modify the article after my SR. Funny.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.giroro.com/deploy-custom-jar-for-istore-r12/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Amazon EC2学习笔记(四)&#8212;&#8212;Amazon Linux AMI的升级</title>
		<link>http://www.giroro.com/amazon-ec2-study-notes-4/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=amazon-ec2-study-notes-4</link>
		<comments>http://www.giroro.com/amazon-ec2-study-notes-4/#comments</comments>
		<pubDate>Wed, 24 Aug 2011 03:40:31 +0000</pubDate>
		<dc:creator>Giroro</dc:creator>
				<category><![CDATA[Study]]></category>
		<category><![CDATA[Amazon EC2]]></category>
		<category><![CDATA[VPS]]></category>

		<guid isPermaLink="false">http://www.giroro.com/amazon-ec2%e5%ad%a6%e4%b9%a0%e7%ac%94%e8%ae%b0%e5%9b%9bamazon-linux-ami%e7%9a%84%e5%8d%87%e7%ba%a7/</guid>
		<description><![CDATA[前言 五个月之前的上一篇笔记介绍了在LNMP上安装WordPress的步骤和注意事项，当时Amazon提供的Linux AMI还是2010.11.1 Beta版，不过现在Amazon已经提供了新版本2011.02 Beta。虽然看上去那些更新对Giroro来说没多少用处，但是Giroro是个爱追新的人，于是还是想办法把EC2的系统升了个级，这里就简单介绍下升级步骤。 PS: 目前最新版已经是2011.09版，所以此教程已过时。另外，由于Giroro在升级2011.09版之后instance无法启动，所以大家升级时请做好备份！ 正文 这篇笔记参照了Amazon的Amazon Linux AMI 2011.02 Beta Release Notes 1. 下载Amazon提供的系统升级脚本 sudo yum upgrade system-release 2. 检查系统是否存在问题，是否可以升级 sudo /usr/sbin/distro-upgrade.sh 3. 如果没有问题，使用&#8211;I-agree参数再次运行第二步命令 sudo /usr/sbin/distro-upgrade.sh --I-agree 4. 等待 5. 重启EC2 Instance 小技巧 1. 以上均使用ec2-user用户进行操作，如果不想每次都sudo的话可以直接使用root用户操作。 2. 第三步会花费一定时间，如果担心PuTTY之类的终端软件中途断开的话，可以参照第二篇笔记，使用screen命令来进行这个耗时的升级操作。 3. 重启EC2 Instance时，不要按照Amazon给出的做法使用reboot -f命令重启，而要进入AWS Management Console，如图所示，在Instance Actions里选择Reboot命令。]]></description>
			<content:encoded><![CDATA[<h3 style="text-align: left;">前言</h3>
<p style="text-align: left;">五个月之前的<a href="http://www.giroro.com/amazon-ec2-study-notes-3/">上一篇笔记</a>介绍了在LNMP上安装WordPress的步骤和注意事项，当时Amazon提供的Linux AMI还是2010.11.1 Beta版，不过现在Amazon已经提供了新版本2011.02 Beta。虽然看上去那些更新对Giroro来说没多少用处，但是Giroro是个爱追新的人，于是还是想办法把EC2的系统升了个级，这里就简单介绍下升级步骤。</p>
<p style="text-align: left;"><span style="color: #ff0000;">PS: 目前最新版已经是2011.09版，所以此教程已过时。另外，由于Giroro在升级2011.09版之后instance无法启动，所以大家升级时请做好备份！</span></p>
<h3 style="text-align: left;">正文</h3>
<p style="text-align: left;">这篇笔记参照了Amazon的<a href="http://aws.amazon.com/amazon-linux-ami/latest-release-notes/">Amazon Linux AMI 2011.02 Beta Release Notes</a></p>
<p><span id="more-99"></span></p>
<p style="text-align: left;">1. 下载Amazon提供的系统升级脚本</p>
<pre class="brush:shell">sudo yum upgrade system-release</pre>
<p style="text-align: left;">2. 检查系统是否存在问题，是否可以升级</p>
<pre class="brush:shell">sudo /usr/sbin/distro-upgrade.sh</pre>
<p style="text-align: left;">3. 如果没有问题，使用&#8211;I-agree参数再次运行第二步命令</p>
<pre class="brush:shell">sudo /usr/sbin/distro-upgrade.sh --I-agree</pre>
<p style="text-align: left;">4. 等待</p>
<p style="text-align: left;">5. 重启EC2 Instance</p>
<h3 style="text-align: left;">小技巧</h3>
<p style="text-align: left;">1. 以上均使用ec2-user用户进行操作，如果不想每次都sudo的话可以直接使用root用户操作。</p>
<p style="text-align: left;">2. 第三步会花费一定时间，如果担心PuTTY之类的终端软件中途断开的话，可以参照<a href="http://www.giroro.com/amazon-ec2-study-notes-2/">第二篇笔记</a>，使用screen命令来进行这个耗时的升级操作。</p>
<p style="text-align: left;">3. 重启EC2 Instance时，不要按照Amazon给出的做法使用reboot -f命令重启，而要进入AWS Management Console，如图所示，在Instance Actions里选择Reboot命令。</p>
<p style="text-align: left;"><a href="http://i.minus.com/ic7nT13Xv.JPG" target="_blank"><img src="http://i.minus.com/ic7nT13Xv.JPG" alt="" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.giroro.com/amazon-ec2-study-notes-4/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Install 7-Zip on Amazon Linux</title>
		<link>http://www.giroro.com/install-7-zip-on-amazon-linux/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=install-7-zip-on-amazon-linux</link>
		<comments>http://www.giroro.com/install-7-zip-on-amazon-linux/#comments</comments>
		<pubDate>Sun, 24 Apr 2011 17:02:00 +0000</pubDate>
		<dc:creator>Giroro</dc:creator>
				<category><![CDATA[Study]]></category>
		<category><![CDATA[Amazon EC2]]></category>
		<category><![CDATA[Linux]]></category>

		<guid isPermaLink="false">http://www.giroro.com/install-7-zip-on-amazon-linux/</guid>
		<description><![CDATA[Preface Today I want to download a 7z file to my EC2 instance, but after the download is finished, I cannot find a command to unzip this 7z file. So I search the Internet and find a way to install 7-Zip on my Amazon Linux. Notice: This is for 32-bit only. Body It seems like [...]]]></description>
			<content:encoded><![CDATA[<h3 style="text-align: left;">Preface</h3>
<p style="text-align: left;">Today I want to download a 7z file to my EC2 instance, but after the download is finished, I cannot find a command to unzip this 7z file. So I search the Internet and find a way to install 7-Zip on my Amazon Linux.</p>
<p style="text-align: left;"><span style="color: #ff0000;">Notice: This is for 32-bit only.</span></p>
<h3 style="text-align: left;">Body</h3>
<p style="text-align: left;">It seems like that Amazon doesn’t offer p7zip package in their repository, so I find a place to get the rpm packages. You can find them at <a title="http://packages.sw.be/p7zip/" href="http://packages.sw.be/p7zip/">http://packages.sw.be/p7zip/</a>.</p>
<p style="text-align: left;">Follow these commands to install the latest version of 7-Zip:</p>
<p><span id="more-91"></span></p>
<p style="text-align: left;">
<pre class="brush:shell">
wget -c http://packages.sw.be/p7zip/p7zip-9.20.1-1.el4.rf.i386.rpm
wget -c http://packages.sw.be/p7zip/p7zip-plugins-9.20.1-1.el4.rf.i386.rpm
rpm -ivh p7zip-9.20.1-1.el4.rf.i386.rpm
rpm -ivh p7zip-plugins-9.20.1-1.el4.rf.i386.rpm
</pre>
</p>
<p style="text-align: left;">After the installation is finished, use following command to unzip the 7z file:</p>
<p style="text-align: left;">
<pre class="brush:shell">7z x filename
</pre>
</p>
<p style="text-align: left;">The argument x means unzip the file following its own directory structure.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.giroro.com/install-7-zip-on-amazon-linux/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Customer vs. Client vs. Consumer</title>
		<link>http://www.giroro.com/customer-vs-client-vs-consumer/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=customer-vs-client-vs-consumer</link>
		<comments>http://www.giroro.com/customer-vs-client-vs-consumer/#comments</comments>
		<pubDate>Mon, 04 Apr 2011 21:35:14 +0000</pubDate>
		<dc:creator>Giroro</dc:creator>
				<category><![CDATA[Study]]></category>
		<category><![CDATA[Business]]></category>
		<category><![CDATA[English]]></category>

		<guid isPermaLink="false">http://www.giroro.com/customer-vs-client-vs-consumer/</guid>
		<description><![CDATA[Preface During my daily life and work, I always read or use these three words. Sometimes I use customer, but at other times I use client instead. So it occurs to me that is there any difference between these words? Or do they have the same meaning? And here is what I got now. Body [...]]]></description>
			<content:encoded><![CDATA[<h3 style="text-align: left;">Preface</h3>
<p style="text-align: left;">During my daily life and work, I always read or use these three words. Sometimes I use customer, but at other times I use client instead. So it occurs to me that is there any difference between these words? Or do they have the same meaning? And here is what I got now.</p>
<h3 style="text-align: left;">Body</h3>
<p style="text-align: left;">Below are part of the definitions of the three words in the Merriam-Webster dictionary:</p>
<p><span id="more-72"></span></p>
<p style="text-align: left;">1. Customer: one that purchases a commodity or service</p>
<p style="text-align: left;">2. Client: a person who engages the professional advice or services of another</p>
<p style="text-align: left;">3. Consumer: one that utilizes economic goods</p>
<p style="text-align: left;">So here is my understanding:</p>
<p style="text-align: left;">Customer and client sometimes can be synonyms, but the word “client” are more often used when a person is buying services, while “customer” can also be used when a person is buying real products. For example, you are a client of a law firm while you are a customer of Walmart.</p>
<p style="text-align: left;">And the word “consumer” more refer to a person buy something (commodity or service) for direct use, instead of selling or using them to manufacture products for sale.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.giroro.com/customer-vs-client-vs-consumer/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>A Bug When Using BPM Studio 10g to Invoke Web Service Deployed by Oracle Integrated Repository</title>
		<link>http://www.giroro.com/bug-when-using-bpm-studio-10g/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=bug-when-using-bpm-studio-10g</link>
		<comments>http://www.giroro.com/bug-when-using-bpm-studio-10g/#comments</comments>
		<pubDate>Tue, 22 Mar 2011 20:11:08 +0000</pubDate>
		<dc:creator>Giroro</dc:creator>
				<category><![CDATA[Work]]></category>
		<category><![CDATA[BEA]]></category>
		<category><![CDATA[BPM]]></category>
		<category><![CDATA[BPM Studio 10g]]></category>
		<category><![CDATA[Integrated Repository]]></category>
		<category><![CDATA[Oracle]]></category>

		<guid isPermaLink="false">http://www.giroro.com/a-bug-when-using-bpm-studio-10g-to-invoke-web-service-deployed-by-oracle-integrated-repository/</guid>
		<description><![CDATA[Preface I found this bug about one year ago when I’m engaged in a BPM project, when Oracle just bought BEA and released the BPM Studio 10g. But as Oracle has developed a BPM plugin in its own IDE, a.k.a JDeveloper, I’m not sure my article is still helpful or not. But I prefer to [...]]]></description>
			<content:encoded><![CDATA[<h3 style="text-align: left;">Preface</h3>
<p style="text-align: left;">I found this bug about one year ago when I’m engaged in a BPM project, when Oracle just bought BEA and released the BPM Studio 10g. But as Oracle has developed a BPM plugin in its own IDE, a.k.a JDeveloper, I’m not sure my article is still helpful or not. But I prefer to keep it here as a piece of my work log.</p>
<h3 style="text-align: left;">Body</h3>
<p style="text-align: left;">When using BPM Studio 10g to automatically generate a service, which is an abstract of a web service, the studio will put the tag &lt;soaHeader&gt; along with tag &lt;soaBody&gt; in the body of the SOAP message, instead of putting it into the header of the message. As a result, the remote server who hosts the web service can not get the credentials, for example the responsibility and so on. Thus the invoke of the web service won’t succeed.</p>
<p><span id="more-48"></span></p>
<p style="text-align: left;">To fix this issue, we need to manually put the soaHeader into the field requestHeaders[] of the service generated by the studio.</p>
<p style="text-align: left;">The <span style="color: #ff0000;">CORRECT</span> SOAP message should be like this:</p>
<pre class="brush:xml">&lt;soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"&gt;
   &lt;soapenv:Header&gt;
  	&lt;ns1:SOAHeader xmlns:ns1="http://xmlns.oracle.com/apps/fnd/soaprovider/plsql/fnd_program/"&gt;
     	&lt;ns1:ResponsibilityName&gt;System Administrator&lt;/ns1:ResponsibilityName&gt;
     	&lt;ns1:ResponsibilityApplName&gt;SYSADMIN&lt;/ns1:ResponsibilityApplName&gt;
     	&lt;ns1:SecurityGroupName&gt;STANDARD&lt;/ns1:SecurityGroupName&gt;
     	&lt;ns1:NLSLanguage&gt;AMERICAN&lt;/ns1:NLSLanguage&gt;
  	&lt;/ns1:SOAHeader&gt;
   &lt;/soapenv:Header&gt;
   &lt;soapenv:Body&gt;
  	&lt;ns1:InputParameters xmlns:ns1="http://xmlns.oracle.com/apps/fnd/soaprovider/plsql/fnd_program/executable_exists/"&gt;
     	&lt;ns1:EXECUTABLE_SHORT_NAME&gt;GLPRJE&lt;/ns1:EXECUTABLE_SHORT_NAME&gt;
     	&lt;ns1:APPLICATION&gt;SQLGL&lt;/ns1:APPLICATION&gt;
  	&lt;/ns1:InputParameters&gt;
   &lt;/soapenv:Body&gt;
&lt;/soapenv:Envelope&gt;</pre>
<p style="text-align: left;">The <span style="color: #ff0000;">WRONG</span> SOAP message looks like this:</p>
<pre class="brush:xml">&lt;soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"&gt;
   &lt;soapenv:Header&gt;
   &lt;/soapenv:Header&gt;
   &lt;soapenv:Body&gt;
  	&lt;ns1:SOAHeader xmlns:ns1="http://xmlns.oracle.com/apps/fnd/soaprovider/plsql/fnd_program/"&gt;
     	&lt;ns1:ResponsibilityName&gt;System Administrator&lt;/ns1:ResponsibilityName&gt;
     	&lt;ns1:ResponsibilityApplName&gt;SYSADMIN&lt;/ns1:ResponsibilityApplName&gt;
     	&lt;ns1:SecurityGroupName&gt;STANDARD&lt;/ns1:SecurityGroupName&gt;
     	&lt;ns1:NLSLanguage&gt;AMERICAN&lt;/ns1:NLSLanguage&gt;
  	&lt;/ns1:SOAHeader&gt;
  	&lt;ns1:InputParameters xmlns:ns1="http://xmlns.oracle.com/apps/fnd/soaprovider/plsql/fnd_program/executable_exists/"&gt;
     	&lt;ns1:EXECUTABLE_SHORT_NAME&gt;GLPRJE&lt;/ns1:EXECUTABLE_SHORT_NAME&gt;
     	&lt;ns1:APPLICATION&gt;SQLGL&lt;/ns1:APPLICATION&gt;
  	&lt;/ns1:InputParameters&gt;
   &lt;/soapenv:Body&gt;
&lt;/soapenv:Envelope&gt;</pre>
<p style="text-align: left;">You can refer to this example to change your code:</p>
<pre class="brush:text">fnd as FND_PROGRAM_Service = FND_PROGRAM_Service()

soaHeader as ExpenseComponents.FND.SoaHeader
soaHeader.responsibilityName = "System Administrator"
soaHeader.responsibilityApplName = "SYSADMIN"
soaHeader.securityGroupName = "STANDARD"
soaHeader.nlsLanguage = "AMERICAN"

// Important! Set soaHeader to header section of SOAP request
fnd.requestHeaders[] = soaHeader

soaBody as InputParameters9
soaBody.executableshortname = "GLPRJE"
soaBody.application = "SQLGL"

bodyOutput as OutputParameters

executableexists fnd
	using header = null, // DON'T pass soaHeader to webservice thru this parameter!
      	body = soaBody
	returning bodyOutput = bodyOutput</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.giroro.com/bug-when-using-bpm-studio-10g/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Amazon EC2学习笔记(三)&#8212;&#8212;WordPress的安装</title>
		<link>http://www.giroro.com/amazon-ec2-study-notes-3/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=amazon-ec2-study-notes-3</link>
		<comments>http://www.giroro.com/amazon-ec2-study-notes-3/#comments</comments>
		<pubDate>Mon, 21 Mar 2011 20:38:37 +0000</pubDate>
		<dc:creator>Giroro</dc:creator>
				<category><![CDATA[Study]]></category>
		<category><![CDATA[Akismet]]></category>
		<category><![CDATA[Amazon EC2]]></category>
		<category><![CDATA[WordPress]]></category>
		<category><![CDATA[WP Super Cache]]></category>

		<guid isPermaLink="false">http://www.giroro.com/amazon-ec2%e5%ad%a6%e4%b9%a0%e7%ac%94%e8%ae%b0%e4%b8%89wordpress%e7%9a%84%e5%ae%89%e8%a3%85/</guid>
		<description><![CDATA[前言 上一篇笔记介绍了在Amazon EC2上安装LNMP的步骤和注意事项，装完LNMP之后就可以开始安装各种PHP应用了。由于Giroro打算把这个环境主要当作部落格使用，所以首先安装的就是WordPress。 正文 WordPress的安装本身还是很简单的，文档也很详细，在此就不再赘述了。Giroro这篇笔记主要介绍将WordPress装在二级目录以及一些插件的使用技巧。 一 将WordPress安装在二级目录 将WordPress安装在二级目录并不是必须的，但是为了便于管理，Giroro把WordPress安装在了根目录的blog文件夹下。 首先，在网站根目录下建一个文件夹，在这里我们以blog为例，将下载好的WordPress安装包上传到blog文件夹下并解压缩。这里需要注意下文件的权限，Giroro建议使用www用户进行操作，如果使用root用户的话千万记得将这些文件的读写执行权限授权给www用户。Giroro自己的blog整个文件夹的owner和group都是www，权限是744，仅供诸位参考。 其次，为WordPress创建数据库并安装。具体细节可以参考官方安装文档。 再次，如果需要用www.yourdomain.com而不是www.yourdomain.com/blog来访问你的部落格的话，登录WordPress的Dashboard，选择Settings-General，将“Site address (URL)”值从http://www.yourdomain.com/blog修改成http://www.yourdomain.com。 最后，将blog文件夹下的index.php复制到网站根目录，将以下代码 require('./wp-blog-header.php'); 修改成 require('./blog/wp-blog-header.php'); 大功告成！ 二 Akismet免注册使用方法 如果你跟我一样也使用Akismet这个插件的话，那么也许你会需要这个方法。因为Akismet虽然好用，但是在配置的时候需要注册Akismet API key，而且这个key貌似不是免费的如果由于种种原因你无法注册的话，那么请往下看： 打开Akismet目录下的akismet.php，将以下代码 $akismet_api_host = $wpcom_api_key . '.rest.akismet.com'; 修改成 $akismet_api_host = $wpcom_api_key . ''; 并将 $wpcom_api_key = ''; 修改成 $wpcom_api_key = 'girogirogiro'; 保存好之后进入WordPress的Dashboard里瞧瞧吧。 更正：使用这种方法无法正常使用Akismet，建议诸位自行注册API key。 三 WP Super Cache Nginx Rewrite规则写法 网上关于WP Super Cache的文章很多，大部分都是介绍Nginx的Rewrite规则写法，大概是不少人都在这儿碰到坑了吧。作为一个土人，Giroro自然也不例外- [...]]]></description>
			<content:encoded><![CDATA[<h3 style="text-align: left;">前言</h3>
<p style="text-align: left;"><a href="http://www.giroro.com/amazon-ec2-study-notes-2/" target="_blank">上一篇笔记</a>介绍了在Amazon EC2上安装LNMP的步骤和注意事项，装完LNMP之后就可以开始安装各种PHP应用了。由于Giroro打算把这个环境主要当作部落格使用，所以首先安装的就是WordPress。</p>
<h3 style="text-align: left;">正文</h3>
<p style="text-align: left;">WordPress的安装本身还是很简单的，文档也很详细，在此就不再赘述了。Giroro这篇笔记主要介绍将WordPress装在二级目录以及一些插件的使用技巧。</p>
<p><span id="more-37"></span></p>
<h4 style="text-align: left;">一 将WordPress安装在二级目录</h4>
<p style="text-align: left;">将WordPress安装在二级目录并不是必须的，但是为了便于管理，Giroro把WordPress安装在了根目录的blog文件夹下。</p>
<p style="text-align: left;">首先，在网站根目录下建一个文件夹，在这里我们以blog为例，将下载好的<a href="http://wordpress.org/latest.zip" target="_blank">WordPress安装包</a>上传到blog文件夹下并解压缩。这里需要注意下文件的权限，Giroro建议使用www用户进行操作，如果使用root用户的话千万记得将这些文件的读写执行权限授权给www用户。Giroro自己的blog整个文件夹的owner和group都是www，权限是744，仅供诸位参考。</p>
<p style="text-align: left;">其次，为WordPress创建数据库并安装。具体细节可以参考<a href="http://codex.wordpress.org.cn/index.php?title=WordPress%E7%9A%84%E5%AE%89%E8%A3%85%E8%BF%87%E7%A8%8B" target="_blank">官方安装文档</a>。</p>
<p style="text-align: left;">再次，如果需要用www.yourdomain.com而不是www.yourdomain.com/blog来访问你的部落格的话，登录WordPress的Dashboard，选择Settings-General，将“Site address (URL)”值从http://www.yourdomain.com/blog修改成http://www.yourdomain.com。</p>
<p style="text-align: left;"><a href="http://i.min.us/ijEUFI.JPG" target="_blank"><img src="http://i.min.us/ijEUFI.JPG" alt="" /></a></p>
<p style="text-align: left;">最后，将blog文件夹下的index.php复制到网站根目录，将以下代码</p>
<pre class="brush:php">require('./wp-blog-header.php');</pre>
<p style="text-align: left;">修改成</p>
<pre class="brush:php">require('./blog/wp-blog-header.php');</pre>
<p style="text-align: left;">大功告成！</p>
<h4 style="text-align: left;">二 Akismet免注册使用方法</h4>
<p style="text-align: left;">如果你跟我一样也使用Akismet这个插件的话，那么也许你会需要这个方法。因为Akismet虽然好用，但是在配置的时候需要注册Akismet API key，<del>而且这个key貌似不是免费的</del>如果由于种种原因你无法注册的话，那么请往下看：</p>
<p style="text-align: left;">打开Akismet目录下的akismet.php，将以下代码</p>
<pre class="brush:php">$akismet_api_host = $wpcom_api_key . '.rest.akismet.com';</pre>
<p style="text-align: left;">修改成</p>
<pre class="brush:php">$akismet_api_host = $wpcom_api_key . '';</pre>
<p style="text-align: left;">并将</p>
<pre class="brush:php">$wpcom_api_key = '';</pre>
<p style="text-align: left;">修改成</p>
<pre class="brush:php">$wpcom_api_key = 'girogirogiro';</pre>
<p style="text-align: left;">保存好之后进入WordPress的Dashboard里瞧瞧吧。</p>
<p style="text-align: left;"><strong><span style="color: #ff0000;">更正：使用这种方法无法正常使用Akismet，建议诸位自行注册API key。</span></strong></p>
<h4 style="text-align: left;">三 WP Super Cache Nginx Rewrite规则写法</h4>
<p style="text-align: left;">网上关于WP Super Cache的文章很多，大部分都是介绍Nginx的Rewrite规则写法，大概是不少人都在这儿碰到坑了吧。作为一个土人，Giroro自然也不例外- -由于这个部落格是安装在二级目录下，所以在写Rewrite规则的时候自然而然的就把二级目录一股脑儿的全加了上去，完全忘了自己之前已经修改了”Site address (URL)”的值……具体的Rewrite写法可以参考<a href="http://blog.cafeneko.info/2010/10/nginx_rewrite_note/" target="_blank">这篇文章</a>，如果想直接复制粘贴的话也可以看这里：</p>
<pre class="brush:text">location / {
# enable search for precompressed files ending in .gz
# nginx needs to be complied using --with-http_gzip_static_module
# for this to work, comment out if using nginx from aptitude
gzip_static on;

# if the requested file exists, return it immediately
if (-f $request_filename) {
                break;
        }

set $supercache_file '';
set $supercache_uri $request_uri;

if ($request_method = POST) {
                set $supercache_uri '';
        }

# Using pretty permalinks, so bypass the cache for any query string
if ($query_string) {
                set $supercache_uri '';
        }

if ($http_cookie ~* "comment_author_|wordpress|wp-postpass_" ) {
                set $supercache_uri '';
        }

# if we haven't bypassed the cache, specify our supercache file
if ($supercache_uri ~ ^(.+)$) {
                set $supercache_file /wp-content/cache/supercache/$http_host/$1index.html;
        }

# only rewrite to the supercache file if it actually exists
if (-f $document_root$supercache_file) {
                rewrite ^(.*)$ $supercache_file break;
        }

# all other requests go to WordPress
if (!-e $request_filename) {
                rewrite . /index.php last;
        }
}</pre>
<p>这个conf文件已经包含了WordPress的设置，所以只需要include这一个conf文件就好，不需要再include安装LNMP时自带的wordpress.conf了。</p>
<h3 style="text-align: left;">结束</h3>
<p style="text-align: left;">到这里，Giroro折腾Amazon EC2的一点点经历都介绍完毕了，接下来的待定时间段内，Giroro会针对待定的领域写一些主题待定的文章，敬请不要期待- -</p>
]]></content:encoded>
			<wfw:commentRss>http://www.giroro.com/amazon-ec2-study-notes-3/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
	</channel>
</rss>

<!-- Dynamic page generated in 0.186 seconds. -->
<!-- Cached page generated by WP-Super-Cache on 2012-05-21 20:23:37 -->
<!-- Compression = gzip -->
