﻿<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/"><channel><title>BlogJava-paulwong-随笔分类-AWS</title><link>http://www.blogjava.net/paulwong/category/53879.html</link><description /><language>zh-cn</language><lastBuildDate>Sun, 08 Sep 2013 05:49:44 GMT</lastBuildDate><pubDate>Sun, 08 Sep 2013 05:49:44 GMT</pubDate><ttl>60</ttl><item><title>Install Hadoop in the AWS cloud</title><link>http://www.blogjava.net/paulwong/archive/2013/09/08/403816.html</link><dc:creator>paulwong</dc:creator><author>paulwong</author><pubDate>Sun, 08 Sep 2013 05:45:00 GMT</pubDate><guid>http://www.blogjava.net/paulwong/archive/2013/09/08/403816.html</guid><wfw:comment>http://www.blogjava.net/paulwong/comments/403816.html</wfw:comment><comments>http://www.blogjava.net/paulwong/archive/2013/09/08/403816.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.blogjava.net/paulwong/comments/commentRss/403816.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/paulwong/services/trackbacks/403816.html</trackback:ping><description><![CDATA[<ol>
     <li>get the Whirr tar file<br />
     <div style="background-color:#eeeeee;font-size:13px;border:1px solid #CCCCCC;padding-right: 5px;padding-bottom: 4px;padding-left: 4px;padding-top: 4px;width: 98%;word-break:break-all"><!--<br /><br />Code highlighting produced by Actipro CodeHighlighter (freeware)<br />http://www.CodeHighlighter.com/<br /><br />-->wget&nbsp;http://www.eu.apache.org/dist/whirr/stable/whirr-0.8.2.tar.gz</div>
     </li><li>untar the Whirr tar file<br /><div style="background-color:#eeeeee;font-size:13px;border:1px solid #CCCCCC;padding-right: 5px;padding-bottom: 4px;padding-left: 4px;padding-top: 4px;width: 98%;word-break:break-all"><!--<br /><br />Code highlighting produced by Actipro CodeHighlighter (freeware)<br />http://www.CodeHighlighter.com/<br /><br />-->tar&nbsp;-vxf&nbsp;whirr-0.8.2.tar.gz</div></li><li>create credentials file<br /><div style="background-color:#eeeeee;font-size:13px;border:1px solid #CCCCCC;padding-right: 5px;padding-bottom: 4px;padding-left: 4px;padding-top: 4px;width: 98%;word-break:break-all"><!--<br /><br />Code highlighting produced by Actipro CodeHighlighter (freeware)<br />http://www.CodeHighlighter.com/<br /><br />-->mkdir&nbsp;~/.whirr<br />cp&nbsp;conf/credentials.sample&nbsp;~/.whirr/credentials</div></li><li>add the following content to credentials file<br /><div style="background-color:#eeeeee;font-size:13px;border:1px solid #CCCCCC;padding-right: 5px;padding-bottom: 4px;padding-left: 4px;padding-top: 4px;width: 98%;word-break:break-all"><!--<br /><br />Code highlighting produced by Actipro CodeHighlighter (freeware)<br />http://www.CodeHighlighter.com/<br /><br />-->#&nbsp;Set&nbsp;cloud&nbsp;provider&nbsp;connection&nbsp;details<br />PROVIDER=aws-ec2<br />IDENTITY=&lt;AWS&nbsp;Access&nbsp;Key&nbsp;ID&gt;<br />CREDENTIAL=&lt;AWS&nbsp;Secret&nbsp;Access&nbsp;Key&gt;</div></li><li><div>generate a rsa key pair<br /><div style="background-color:#eeeeee;font-size:13px;border:1px solid #CCCCCC;padding-right: 5px;padding-bottom: 4px;padding-left: 4px;padding-top: 4px;width: 98%;word-break:break-all"><!--<br /><br />Code highlighting produced by Actipro CodeHighlighter (freeware)<br />http://www.CodeHighlighter.com/<br /><br />-->ssh-keygen&nbsp;-t&nbsp;rsa&nbsp;-P&nbsp;''</div></div></li><li>create a hadoop.properties file and add the following content<br /><div style="background-color:#eeeeee;font-size:13px;border:1px solid #CCCCCC;padding-right: 5px;padding-bottom: 4px;padding-left: 4px;padding-top: 4px;width: 98%;word-break:break-all"><!--<br /><br />Code highlighting produced by Actipro CodeHighlighter (freeware)<br />http://www.CodeHighlighter.com/<br /><br />-->whirr.cluster-name=whirrhadoopcluster<br />whirr.instance-templates=1&nbsp;hadoop-jobtracker+hadoop-namenode,2&nbsp;hadoop-datanode+hadoop-tasktracker<br />whirr.provider=aws-ec2<br />whirr.private-key-file=${sys:user.home}/.ssh/id_rsa<br />whirr.public-key-file=${sys:user.home}/.ssh/id_rsa.pub<br />whirr.hadoop.version=1.0.2<br />whirr.aws-ec2-spot-price=0.08</div></li><li>launch hadoop<br /><div style="background-color:#eeeeee;font-size:13px;border:1px solid #CCCCCC;padding-right: 5px;padding-bottom: 4px;padding-left: 4px;padding-top: 4px;width: 98%;word-break:break-all"><!--<br /><br />Code highlighting produced by Actipro CodeHighlighter (freeware)<br />http://www.CodeHighlighter.com/<br /><br />-->bin/whirr&nbsp;launch-cluster&nbsp;--config&nbsp;hadoop.properties</div></li><li>launch proxy<br /><div style="background-color:#eeeeee;font-size:13px;border:1px solid #CCCCCC;padding-right: 5px;padding-bottom: 4px;padding-left: 4px;padding-top: 4px;width: 98%;word-break:break-all"><!--<br /><br />Code highlighting produced by Actipro CodeHighlighter (freeware)<br />http://www.CodeHighlighter.com/<br /><br />-->cd&nbsp;~/.whirr/whirrhadoopcluster/<br />./hadoop-proxy.sh</div></li><li>add a rule to iptables<br /><div style="background-color:#eeeeee;font-size:13px;border:1px solid #CCCCCC;padding-right: 5px;padding-bottom: 4px;padding-left: 4px;padding-top: 4px;width: 98%;word-break:break-all"><!--<br /><br />Code highlighting produced by Actipro CodeHighlighter (freeware)<br />http://www.CodeHighlighter.com/<br /><br />-->0.0.0.0/0 50030<br />0.0.0.0/0 50070</div></li><li>check the web ui in the browser<br /><div style="background-color:#eeeeee;font-size:13px;border:1px solid #CCCCCC;padding-right: 5px;padding-bottom: 4px;padding-left: 4px;padding-top: 4px;width: 98%;word-break:break-all"><!--<br /><br />Code highlighting produced by Actipro CodeHighlighter (freeware)<br />http://www.CodeHighlighter.com/<br /><br />-->http://&lt;aws-public-dns&gt;:50030</div></li><li>add to /etc/profile<br /><div style="background-color:#eeeeee;font-size:13px;border:1px solid #CCCCCC;padding-right: 5px;padding-bottom: 4px;padding-left: 4px;padding-top: 4px;width: 98%;word-break:break-all"><!--<br /><br />Code highlighting produced by Actipro CodeHighlighter (freeware)<br />http://www.CodeHighlighter.com/<br /><br />-->export&nbsp;HADOOP_CONF_DIR=~/.whirr/whirrhadoopcluster/</div></li><li>check if the hadoop works<br /><div style="background-color:#eeeeee;font-size:13px;border:1px solid #CCCCCC;padding-right: 5px;padding-bottom: 4px;padding-left: 4px;padding-top: 4px;width: 98%;word-break:break-all"><!--<br /><br />Code highlighting produced by Actipro CodeHighlighter (freeware)<br />http://www.CodeHighlighter.com/<br /><br />-->hadoop&nbsp;fs&nbsp;-ls&nbsp;/</div></li></ol><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><ol>
</ol><img src ="http://www.blogjava.net/paulwong/aggbug/403816.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/paulwong/" target="_blank">paulwong</a> 2013-09-08 13:45 <a href="http://www.blogjava.net/paulwong/archive/2013/09/08/403816.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item></channel></rss>