<?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>I.D.E.A.中文站 &#187; ubuntu</title>
	<atom:link href="http://www.tzhang.com/blog/tag/ubuntu/feed" rel="self" type="application/rss+xml" />
	<link>http://www.tzhang.com/blog</link>
	<description>沉淀生活点滴.zZ</description>
	<lastBuildDate>Sat, 14 Jan 2012 14:47:33 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>用Ruby on Rails开发Facebook应用(5) &#8211; Amazon EC2</title>
		<link>http://www.tzhang.com/blog/2008/09/16/develop-facebook-app-using-ruby-on-rails-5</link>
		<comments>http://www.tzhang.com/blog/2008/09/16/develop-facebook-app-using-ruby-on-rails-5#comments</comments>
		<pubDate>Tue, 16 Sep 2008 09:21:22 +0000</pubDate>
		<dc:creator>Deep Blue</dc:creator>
				<category><![CDATA[编程开发]]></category>
		<category><![CDATA[Ruby]]></category>
		<category><![CDATA[ec2]]></category>
		<category><![CDATA[facebook]]></category>
		<category><![CDATA[facebook app]]></category>
		<category><![CDATA[facebooker]]></category>
		<category><![CDATA[ruby on rails]]></category>
		<category><![CDATA[ubuntu]]></category>

		<guid isPermaLink="false">http://www.tzhang.com/blog/2008/09/16/%e7%94%a8ruby-on-rails%e5%bc%80%e5%8f%91facebook%e5%ba%94%e7%94%a85-amazon-ec2</guid>
		<description><![CDATA[Amazon EC2不是什么新东西了，不过从cheewu那里得知他的垂直搜索引擎是用EC2的。偶也有兴趣试用一下，反正钱也不多，呵呵   EC2其实是虚拟化的一台机器，物理上来讲书也不知道你自己的实例在群里的那个部分运行着。不过这并不重要，重要的是只要你想，就可以随时在Amazon的computer farm上开出一块自己的&#8221;自留地&#8221;，计算能力可以选择的，也支持多个实例组成cluster.   Virtualization已经是当今的潮流，估计不用普及了，现在用电脑的，最少也用过VMware吧。呵呵。使用EC2只要简单的几个条件：       在amazon AWS上注册一个id 把EC2 服务加到你的AWS id服务中来（点一个按钮即可，但是很多人不知道，一些教程里面也没写，少了这个步骤，会导致ssl授权通不过的问题，切记） 一个可供网上支付的信用卡，VISA,Mastercard,AE什么的都可以   ok,添好这些，就可以使用EC2的服务了。别着急，您至少先看看收费标准吧EC2 price   都没问题了我们就可以在本地setup EC2的使用环境了。具体可以看这里EC2 Getting Start，我就不罗嗦了。   觉得命令行麻烦的话，推荐一个Firefox插件Elasticfox，大大简化的EC2的操作。反正我是不喜欢用ec2那些奇怪的命令。呵呵。命令行控们可以看这篇How To: Getting Started with Amazon EC2   有个虚拟的机器，用什么OS呢？Amazon上面已经有很多现成的AMI了，把他理解成定制好的系统，可以直接启动。你只要在启动EC2 instance的时候指定某个AMI的ID就可以了。对于Ruby on Rails来说，我推荐EC2onRail的AMI,有32bit和64bit两个版本：   ami-c9bc58a0 (32-bit) ami-cbbc58a2 (64-bit) 几乎你会用到的东西在AMI里面都是ready的：   Features of the EC2 image: Ready to deploy a Rails app with little [...]]]></description>
			<content:encoded><![CDATA[<p>Amazon EC2不是什么新东西了，不过从<a href="http://wuchee.spaces.live.com/">cheewu</a>那里得知他的垂直搜索引擎是用EC2的。偶也有兴趣试用一下，反正钱也不多，呵呵
</p>
<p>
 </p>
<p>EC2其实是虚拟化的一台机器，物理上来讲书也不知道你自己的实例在群里的那个部分运行着。不过这并不重要，重要的是只要你想，就可以随时在Amazon的computer farm上开出一块自己的&#8221;自留地&#8221;，计算能力可以选择的，也支持多个实例组成cluster.
</p>
<p>
 </p>
<p>Virtualization已经是当今的潮流，估计不用普及了，现在用电脑的，最少也用过VMware吧。呵呵。使用EC2只要简单的几个条件：    
</p>
<p>
 </p>
<ol>
<li>在amazon AWS上注册一个id
</li>
<li>把EC2 服务加到你的AWS id服务中来（点一个按钮即可，但是很多人不知道，一些教程里面也没写，少了这个步骤，会导致ssl授权通不过的问题，切记）
</li>
<li>一个可供网上支付的信用卡，VISA,Mastercard,AE什么的都可以
</li>
</ol>
<p>
 </p>
<p>ok,添好这些，就可以使用EC2的服务了。别着急，您至少先看看收费标准吧<a href="http://www.amazon.com/EC2-AWS-Service-Pricing/b/ref=sc_fe_l_2?ie=UTF8&amp;node=201590011&amp;no=3435361&amp;me=A36L942TSJ2AJA">EC2 price</a>
	</p>
<p>
 </p>
<p>都没问题了我们就可以在本地setup EC2的使用环境了。具体可以看<a href="http://docs.amazonwebservices.com/AmazonEC2/gsg/2007-01-19/?ref=get-started">这里EC2 Getting Start</a>，我就不罗嗦了。
</p>
<p>
 </p>
<p>觉得命令行麻烦的话，推荐一个Firefox插件<a href="http://developer.amazonwebservices.com/connect/entry.jspa?externalID=609">Elasticfox</a>，大大简化的EC2的操作。反正我是不喜欢用ec2那些奇怪的命令。呵呵。命令行控们可以看这篇<a href="http://paulstamatiou.com/2008/04/05/how-to-getting-started-with-amazon-ec2">How To: Getting Started with Amazon EC2</a>
	</p>
<p>
 </p>
<p>有个虚拟的机器，用什么OS呢？Amazon上面已经有很多现成的AMI了，把他理解成定制好的系统，可以直接启动。你只要在启动EC2 instance的时候指定某个AMI的ID就可以了。对于Ruby on Rails来说，我推荐<a href="http://ec2onrails.rubyforge.org/">EC2onRail</a>的AMI,有32bit和64bit两个版本：
</p>
<p>
 </p>
<ul>
<li>ami-c9bc58a0 (32-bit)
</li>
<li>ami-cbbc58a2 (64-bit)
</li>
</ul>
<p>几乎你会用到的东西在AMI里面都是ready的：
</p>
<p style="margin-left: 21pt">
 </p>
<p style="margin-left: 21pt"><em>Features of the EC2 image:<br />
</em></p>
<ul style="margin-left: 56pt">
<li><em>Ready to deploy a Rails app with little or no configuration of the server required<br />
</em></li>
<li><em>Automatic backup of MySQL database to S3 (full backup nightly + incremental backup using binary logs every 5 minutes)<br />
</em></li>
<li><em>Capistrano tasks to customize the server image, archive and restore the database to/from S3, and more (available as a rubygem)<br />
</em></li>
<li><em>Mongrel_cluster behind Apache 2.2, configured according to <br /><a href="http://blog.codahale.com/2006/06/19/time-for-a-grown-up-server-rails-mongrel-apache-capistrano-and-you/"/></em><span style="font-family:Times New Roman; font-size:12pt">Coda Hale&#8217;s excellent guide<em><br />
				</em></span></li>
<li><em>Ruby on Rails 2.1.0, 2.0.2 and 1.2.6<br />
</em></li>
<li><em>Ruby 1.8.6<br />
</em></li>
<li><em>MySQL 5<br />
</em></li>
<li><a href="http://www.danga.com/memcached/"><span style="font-family:Times New Roman; font-size:12pt">memcached</span></a><em><br />
			</em></li>
<li><a href="http://www.tildeslash.com/monit/"><span style="font-family:Times New Roman; font-size:12pt">monit</span></a><em> configured to monitor apache, mongrel, mysql, memcached, drive space and system load<br />
</em></li>
<li><em>Ubuntu 8.04 LTS &#8220;Hardy&#8221; base image built using <a href="http://alestic.com/"/></em><span style="font-family:Times New Roman; font-size:12pt">Eric Hammond&#8217;s EC2 Ubuntu script<em><br />
				</em></span></li>
<li><em>SSL support<br />
</em></li>
<li><em>Amazon AMI tools installed<br />
</em></li>
<li><em>MySQL, Apache, and syslog configured to use /mnt for data and logging so you don&#8217;t fill up EC2&#8242;s small root filesystem<br />
</em></li>
<li><em>Automatically archives Rails and Apache logs to S3 nightly.<br />
</em></li>
<li><em>32-bit and 64-bit images available (supports all instance types, small to extra large).<br />
</em></li>
<li><em>Created using a build file, full source is <a href="http://rubyforge.org/scm/?group_id=4552"/></em><span style="font-family:Times New Roman; font-size:12pt">available<em> (the EC2 on Rails script is run from <a href="http://alestic.com/"/></em>Eric Hammond&#8217;s EC2 Ubuntu script<em>)<br />
</em></span></li>
<li><em>Can be used as a clustered Rails app running on multiple instances<br />
</em></li>
<li><em>Automatically runs hourly, daily, weekly and monthly scripts if they exist in Rails application&#8217;s script directory<br />
</em></li>
<li><em>Local <a href="http://www.postfix.org/"/></em><span style="font-family:Times New Roman; font-size:12pt">Postfix<em> SMTP mail server (only available from within the instance, not listening on external network interfaces)<br />
</em></span></li>
</ul>
<p>
 </p>
<p>如果你自己还需要别的东西的话，尽可以自己安装(Ubuntu的apt-get或者手动),然后把Image传到S3上就成为自己定制的AMI了。具体过程不难，请参考这个小短文<a href="http://blog.xdite.net/?p=672">HOWTO Build EC2 image</a>
	</p>
<p>
 </p>
<p>EC2 instance ready了还没完，你自己的本地开发环境也要作一些事情
</p>
<p>
 </p>
<ol>
<li>sudo gem install ec2rails
</li>
<li>copy capify,deploy 脚本到你的app目录下（用过capistrano的人都知道）
</li>
<li>run capistrano task吧。集体还是看ec2rails的说明
</li>
</ol>
<p>
 </p>
<p>
 </p>
<p>ok,建一个自己的instance尽情享受root的快感去吧</p>
]]></content:encoded>
			<wfw:commentRss>http://www.tzhang.com/blog/2008/09/16/develop-facebook-app-using-ruby-on-rails-5/feed</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>我的RoR工作环境</title>
		<link>http://www.tzhang.com/blog/2008/07/17/my_ror_development_env</link>
		<comments>http://www.tzhang.com/blog/2008/07/17/my_ror_development_env#comments</comments>
		<pubDate>Thu, 17 Jul 2008 05:12:58 +0000</pubDate>
		<dc:creator>Deep Blue</dc:creator>
				<category><![CDATA[编程开发]]></category>
		<category><![CDATA[电脑网络]]></category>
		<category><![CDATA[Ruby]]></category>
		<category><![CDATA[rails]]></category>
		<category><![CDATA[RoR]]></category>
		<category><![CDATA[textmate]]></category>
		<category><![CDATA[ubuntu]]></category>

		<guid isPermaLink="false">http://www.tzhang.com/blog/?p=216</guid>
		<description><![CDATA[Ubuntu 8.04 with 3D desktop. Ruby 1.8.6 + Rails 2.1 IDE: Gedit customized like textmate (How-to) 3D桌面很方便(尤其是向我这种没钱买n个显示器的人)，使用Cube,左边是cheetsheet作参考,右面是firefox随时查资料。cube的翻转比较容易保持思维的连贯性。不像之前只能tab翻来翻去最后发现自己都忘记做到哪里了。 说道cheetsheet,网上不少哦，不过质量到不一定高。而且个人认为cheetsheet这种东西最好是自己整理，查起来才得心应手。]]></description>
			<content:encoded><![CDATA[<p>Ubuntu 8.04 with 3D desktop.<br />
Ruby 1.8.6 + Rails 2.1<br />
IDE: Gedit customized like textmate <a href="http://www.tzhang.com/blog/2008/04/17/textmate-like-gedit">(How-to)</a></p>
<p>3D桌面很方便(尤其是向我这种没钱买n个显示器的人)，使用Cube,左边是cheetsheet作参考,右面是firefox随时查资料。cube的翻转比较容易保持思维的连贯性。不像之前只能tab翻来翻去最后发现自己都忘记做到哪里了。</p>
<p>说道cheetsheet,网上不少哦，不过质量到不一定高。而且个人认为cheetsheet这种东西最好是自己整理，查起来才得心应手。</p>
]]></content:encoded>
			<wfw:commentRss>http://www.tzhang.com/blog/2008/07/17/my_ror_development_env/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>A textmate-like gedit in Ubuntu for Ruby and Rails IDE</title>
		<link>http://www.tzhang.com/blog/2008/04/17/textmate-like-gedit</link>
		<comments>http://www.tzhang.com/blog/2008/04/17/textmate-like-gedit#comments</comments>
		<pubDate>Thu, 17 Apr 2008 15:10:53 +0000</pubDate>
		<dc:creator>Deep Blue</dc:creator>
				<category><![CDATA[编程开发]]></category>
		<category><![CDATA[Ruby]]></category>
		<category><![CDATA[gedit]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[rails]]></category>
		<category><![CDATA[textmate]]></category>
		<category><![CDATA[ubuntu]]></category>

		<guid isPermaLink="false">http://www.tzhang.com/blog/2008/04/17/textmate-like-gedit/</guid>
		<description><![CDATA[Pls follow the instructions from http://grigio.org/pimp_my_gedit_was_textmate_linux Add-on by Deep Blue (Linux newbie may need this if you are using Ubuntu): How to install liberation fonts on Ubuntu commands: &#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;- echo &#8220;deb http://ppa.launchpad.net/corenominal/ubuntu gutsy main&#8221; &#124; sudo tee -a /etc/apt/sources.list echo &#8220;deb-src http://ppa.launchpad.net/corenominal/ubuntu gutsy main&#8221; &#124; sudo tee -a /etc/apt/sources.list sudo apt-get update sudo apt-get install [...]]]></description>
			<content:encoded><![CDATA[<p>Pls follow the instructions from <a href="http://grigio.org/pimp_my_gedit_was_textmate_linux">http://grigio.org/pimp_my_gedit_was_textmate_linux</a></p>
<p>Add-on by Deep Blue (Linux newbie may need this if you are using Ubuntu):</p>
<p>How to install liberation fonts on Ubuntu</p>
<p>commands:<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
echo &#8220;deb http://ppa.launchpad.net/corenominal/ubuntu gutsy main&#8221; | sudo tee -a /etc/apt/sources.list<br />
echo &#8220;deb-src http://ppa.launchpad.net/corenominal/ubuntu gutsy main&#8221; | sudo tee -a /etc/apt/sources.list<br />
sudo apt-get update<br />
sudo apt-get install ttf-liberation<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-</p>
<p>My customized Gedit screen snapshot:<br />
<a href="http://www.tzhang.com/gallery/main.php?g2_view=core.DownloadItem&#038;g2_itemId=495&#038;g2_GALLERYSID=TMP_SESSION_ID_DI_NOISSES_PMT" rel="lightbox" title="A textmate-like Gedit as Ruby and rails IDE" ><img src="http://www.tzhang.com/gallery/main.php?g2_view=core.DownloadItem&#038;g2_itemId=496&#038;g2_GALLERYSID=TMP_SESSION_ID_DI_NOISSES_PMT" width="150"  height="150"  alt="A textmate-like Gedit as Ruby and rails IDE" title="A textmate-like Gedit as Ruby and rails IDE" class="g2image_normal" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.tzhang.com/blog/2008/04/17/textmate-like-gedit/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Ubuntu环境下Ruby, Rails, Waves的安装方法</title>
		<link>http://www.tzhang.com/blog/2008/03/20/how_to_setup_ruby_waves_rails_environment_on_ubuntu</link>
		<comments>http://www.tzhang.com/blog/2008/03/20/how_to_setup_ruby_waves_rails_environment_on_ubuntu#comments</comments>
		<pubDate>Thu, 20 Mar 2008 10:50:04 +0000</pubDate>
		<dc:creator>Deep Blue</dc:creator>
				<category><![CDATA[编程开发]]></category>
		<category><![CDATA[Ruby]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[rails]]></category>
		<category><![CDATA[ubuntu]]></category>
		<category><![CDATA[waves]]></category>

		<guid isPermaLink="false">http://www.tzhang.com/blog/2008/03/20/how_to_setup_ruby_waves_rails_environment_on_ubuntu/</guid>
		<description><![CDATA[Reference: http://www.javaeye.com/topic/43228 Ubuntu环境下Ruby, rails, waves的安装方法： 1 ) Ruby 1.8.6 ruby的源代码可以从Ruby官方网站下载： http://www.ruby-lang.org/en/downloads/ ./configure –prefix=/usr/local/ruby make sudo make install export PATH=/usr/local/ruby/bin:$PATH 安装好以后，修改操作系统PATH路径，加入/usr/local/ruby/bin： export PATH=/usr/local/ruby/bin:$PATH 在Linux上，一般将设置放在/etc/profile中，便于对全局生效 sudo gedit /etc/profile add the following lines before umask 022 if [ -d /usr/local/ruby/bin ] ; then PATH=/usr/local/ruby/bin:&#8221;${PATH}&#8221; fi &#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212; 2 ) Rubygems是ruby的在线包管理工具，可以从rubyforge下载rubygems： http://rubyforge.org/projects/rubygems/ sudo /usr/local/ruby/bin/ruby setup.rb 验证安装：gem -v which gem 3 [...]]]></description>
			<content:encoded><![CDATA[<p>Reference: http://www.javaeye.com/topic/43228</p>
<p>Ubuntu环境下Ruby, rails, waves的安装方法： </p>
<p> 1 ) Ruby 1.8.6<br />
      ruby的源代码可以从Ruby官方网站下载：</p>
<p>http://www.ruby-lang.org/en/downloads/</p>
<p>      ./configure –prefix=/usr/local/ruby</p>
<p>      make</p>
<p>      sudo make install</p>
<p>      export PATH=/usr/local/ruby/bin:$PATH</p>
<p>                安装好以后，修改操作系统PATH路径，加入/usr/local/ruby/bin：<br />
      export PATH=/usr/local/ruby/bin:$PATH</p>
<p>                在Linux上，一般将设置放在/etc/profile中，便于对全局生效<br />
                sudo gedit /etc/profile</p>
<p>      add the following lines before umask 022</p>
<p>if [ -d /usr/local/ruby/bin ] ; then<br />
    PATH=/usr/local/ruby/bin:&#8221;${PATH}&#8221;<br />
fi</p>
<p>&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;</p>
<p> 2 ) Rubygems是ruby的在线包管理工具，可以从rubyforge下载rubygems：</p>
<p>http://rubyforge.org/projects/rubygems/</p>
<p>      sudo /usr/local/ruby/bin/ruby setup.rb</p>
<p>                验证安装：gem -v<br />
              which gem</p>
<p> 3 ) Install Rails<br />
      sudo gem install rails -y</p>
<p> 4 ) Install Waves<br />
      sudo install waves<br />
      注意在Ubuntu环境下虽然在/etc/profile里面有ruby的path, 但是sudo的话还是提示需要ruby 1.8.6以上环境。找乐很多地方都没有解决方法（好把我承认是linux菜鸟，可能大家都不屑于些出来把，最后启动的时候选recovery mode意外的发现可以以root id登入，一切ok啦）</p>
<p>     Problem: sudo will not provide the ruby path.<br />
     solution: use ubuntu recovery mode and you will have a real root user.</p>
<p> 5 )  Install mysql</p>
<p>     sudo apt-get install mysql-common mysql-clients</p>
]]></content:encoded>
			<wfw:commentRss>http://www.tzhang.com/blog/2008/03/20/how_to_setup_ruby_waves_rails_environment_on_ubuntu/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

