{"id":5241,"date":"2015-04-13T02:34:52","date_gmt":"2015-04-12T17:34:52","guid":{"rendered":"http:\/\/www.vincentina.net\/?p=5241"},"modified":"2015-04-13T02:34:52","modified_gmt":"2015-04-12T17:34:52","slug":"ubuntu14-%e3%81%abtrema-0-4-7-%e3%82%92%e3%82%a4%e3%83%b3%e3%82%b9%e3%83%88%e3%83%bc%e3%83%ab%e3%81%97%e3%81%be%e3%81%97%e3%81%9f","status":"publish","type":"post","link":"https:\/\/www.vincentina.net\/?p=5241","title":{"rendered":"Ubuntu14 \u306bTrema 0.4.7 \u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u307e\u3057\u305f"},"content":{"rendered":"<h1>\u307e\u3048\u304a\u304d<\/h1>\n<p>\u3084\u3063\u3068\u3067\u30d1\u30fc\u30d5\u30a7\u30af\u30c8Ruby(\u6280\u8853\u8a55\u8ad6\u793e)\u3068\u30d7\u30ed\u30b0\u30e9\u30df\u30f3\u30b0\u8a00\u8a9eRuby(\u30aa\u30e9\u30a4\u30ea\u30fc\u30b8\u30e3\u30d1\u30f3)\u3092\u8aad\u307f\u7d42\u308f\u308a\u307e\u3057\u305f\uff01\u7d9a\u3044\u3066\u306fRuby\u306b\u3088\u308b\u30af\u30ed\u30fc\u30e9\u30fc\u958b\u767a\u6280\u6cd5(\u30bd\u30d5\u30c8\u30d0\u30f3\u30af\u30af\u30ea\u30a8\u30a4\u30c6\u30a3\u30d6)\u3068\u3001\u30e1\u30bf\u30d7\u30ed\u30b0\u30e9\u30df\u30f3\u30b0Ruby(ASCII)\u3068\u3001\u30af\u30e9\u30a6\u30c9\u6642\u4ee3\u306e\u30cd\u30c3\u30c8\u30ef\u30fc\u30af\u6280\u8853OPENFLOW\u5b9f\u8df5\u5165\u9580(\u6280\u8853\u8a55\u8ad6\u793e)\u306e\uff13\u518a\u3092Interleave\u306b\u9032\u3081\u3066\u3044\u3053\u3046\u3068\u601d\u3044\u307e\u3059\u3002\u4eca\u5ea6\u306f\u5b9f\u969b\u306b\u30b3\u30fc\u30c9\u3092\u66f8\u3044\u3066\u9032\u3081\u308b\u6642\u9593\u304c\u591a\u3044\u3068\u601d\u3046\u306e\u3067\u697d\u3057\u307f\u306a\u306e\u3067\u3059\u3002<br \/>\n\u30ea\u30d5\u30a1\u30af\u30bf\u30ea\u30f3\u30b0:Ruby\u30a8\u30c7\u30a3\u30b7\u30e7\u30f3 (ASCII)\u3082\u7acb\u3061\u8aad\u307f\u306f\u3057\u307e\u3057\u305f\u304c\u3001\u307e\u3060\u3061\u3087\u3063\u3068\u3070\u304b\u308a\u96e3\u3057\u305d\u3046\u3060\u3063\u305f\u306e\u3067\u305d\u3063\u3068\u672c\u68da\u306b\u623b\u3057\u3066\u304d\u307e\u3057\u305f\u3002<\/p>\n<h1>Interleave?<\/h1>\n<p>\u771f\u304b\u5618\u304b\u306f\u5b9a\u304b\u3067\u7121\u3044\u3067\u3059\u304c<br \/>\n\u53c2\u8003\u30b5\u30a4\u30c8<br \/>\nWired Geekdad <a href=\"http:\/\/archive.wired.com\/geekdad\/2012\/01\/everything-about-learning\/\" title=\"Everything You Thought You Knew About Learning Is Wrong\" target=\"_blank\">Everything You Thought You Knew About Learning Is Wrong<\/a><br \/>\n\u306b\u3088\u308a\u307e\u3059\u3068\u3001\u3082\u304f\u3082\u304f\u3068\uff11\u3064\u306e\u3053\u3068\u3092\u9032\u3081\u308b\u3088\u308a\u3082\u540c\u6642\u4e26\u884c\u3067\u8272\u3005\u3068\u9032\u3081\u305f\u65b9\u304c\u52b9\u679c\u304c\u9ad8\u3044\uff01\uff01\u3068\u3044\u3046\u8a18\u4e8b\u3092\u9d5c\u5451\u307f\u306b\u3057\u3066\uff08\u540c\u6642\u306b\u9032\u3081\u305f\u65b9\u304c\u697d\u3057\u3044\u3057\u306d\uff09\u3001Let&#8217;s EnJoy\u3067\u9032\u3081\u3066\u3044\u3053\u3046\u3058\u3083\u306a\u3044\u304b\u3068\u3044\u3046\u8a66\u307f\u3067\u3059\u3002<\/p>\n<h1>\u5fc5\u8981\u305d\u3046\u306a\u3082\u306e\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb<\/h1>\n<p>\u958b\u767a\u7528\u306eUbuntu\u306f\u30d0\u30fc\u30c1\u30e3\u30eb\u30dc\u30c3\u30af\u30b9\u3067\u65b0\u305f\u306b\u7528\u610f\u3057\u307e\u3057\u305f\u3002<\/p>\n<pre class=\"brush: ruby; title: ; notranslate\" title=\"\">\r\ntakeken@ubuntu:~$ sudo apt-get install gcc make libpcap-dev libsqlite3-dev git gem libssl-dev pkg-config glib-2.0\r\n\r\n<\/pre>\n<p>Ruby\u306e\u74b0\u5883\u3082\u7528\u610f\u3057\u307e\u3059\u3002Ruby\uff0b\u30cd\u30c3\u30c8\u30ef\u30fc\u30af\u306e\u52c9\u5f37\u3082\u3067\u304d\u308b\u306a\u3093\u3066\u3044\u3044\u3082\u306e\u3092\u898b\u3064\u3051\u305f\u3088\u3002<\/p>\n<pre class=\"brush: ruby; title: ; notranslate\" title=\"\">\r\ntakeken@ubuntu:~$ git clone git:\/\/github.com\/sstephenson\/rbenv.git .rbenv\r\ntakeken@ubuntu:~$ git clone https:\/\/github.com\/sstephenson\/ruby-build.git ~\/.rbenv\/plugins\/ruby-build\r\ntakeken@ubuntu:~$ cat &gt;&gt; ~\/.bashrc\r\nexport PATH=$HOME\/.rbenv\/bin:$PATH\r\neval &quot;$(rbenv init -)&quot;\r\n^C\r\ntakeken@ubuntu:~$ tail -2 ~\/.bashrc\r\nexport PATH=$HOME\/.rbenv\/bin:$PATH\r\neval &quot;$(rbenv init -)&quot;\r\ntakeken@ubuntu:~$ exec $SHELL -l\r\n\r\n<\/pre>\n<p>\u4eca\u56de\u306fRuby 2.0\u3067\u9032\u3081\u307e\u3059\u3002<\/p>\n<pre class=\"brush: ruby; title: ; notranslate\" title=\"\">\r\ntakeken@ubuntu:~$ rbenv install 2.0.0-p643\r\n\r\ntakeken@ubuntu:~$ rbenv global 2.0.0-p643\r\ntakeken@ubuntu:~$ rbenv rehash\r\ntakeken@ubuntu:~$ ruby -v\r\nruby 2.0.0p643 (2015-02-25 revision 49749) &#x5B;x86_64-linux]\r\n\r\n<\/pre>\n<p>\u4ed5\u4e0a\u3052\u306b<\/p>\n<pre class=\"brush: ruby; title: ; notranslate\" title=\"\">\r\ntakeken@ubuntu:~$ cat &gt; ~\/.gemrc\r\ngem: --no-rdoc --no-ri\r\ninstall: --no-rdoc --no-ri\r\nupdate:  --no-rdoc --no-ri\r\n:verbose: true\r\n^C\r\ntakeken@ubuntu:~$ exec $SHELL -l\r\n\r\n<\/pre>\n<h1>Trema\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u307e\u3059<\/h1>\n<p>\u53c2\u8003\u30b5\u30a4\u30c8<br \/>\nGithub Trema\u3000<a href=\"https:\/\/github.com\/trema\/trema\/blob\/develop\/README.md\" title=\"Trema\" target=\"_blank\">TremaGithub<\/a><br \/>\nsinclains&#8217;s blog\u3000<a href=\"http:\/\/sinclains.hateblo.jp\/entry\/2014\/11\/15\/191538\" title=\"Trema 0.4.7 install (Ubuntu14.04 + Ruby 1.9.3)\" target=\"_blank\">Trema 0.4.7 install (Ubuntu14.04 + Ruby 1.9.3)<\/a><\/p>\n<p>Gem\u306e\u30d0\u30fc\u30b8\u30e7\u30f3\u3092\u3042\u308f\u305b\u308b\u5fc5\u8981\u304c\u3042\u308b\u3088\u3046\u3067\u3059\u3002\u305d\u306e\u307e\u307e\u9032\u3081\u305f\u3089\u30a8\u30e9\u30fc\u3092\u5410\u304d\u307e\u3057\u305f\u3002<\/p>\n<pre class=\"brush: ruby; title: ; notranslate\" title=\"\">\r\ntakeken@ubuntu:~$ sudo gem install rubygems-update -v 1.8.25\r\ntakeken@ubuntu:~$ sudo update_rubygems\r\n\r\n<\/pre>\n<p>\u3042\u3068\u306fTrema\u672c\u4f53\u3068Wireshark\u3092\u5165\u308c\u3066\u7d42\u308f\u308a\u306e\u3088\u3046\u3067\u3057\u305f\u3002<\/p>\n<pre class=\"brush: ruby; title: ; notranslate\" title=\"\">\r\ntakeken@ubuntu:~$ sudo gem install trema\r\ntakeken@ubuntu:~$ trema --version\r\ntrema version 0.4.7\r\ntakeken@ubuntu:~$ sudo aptitude -y install wireshark\r\n\r\n<\/pre>\n<h1>\u30c6\u30b9\u30c8<\/h1>\n<p>OpenFlow\u5b9f\u8df5\u5165\u9580\u306b\u3042\u308bHelloworld\u3092\u5b9f\u884c\u3057\u3066\u307f\u307e\u3059\u3002<\/p>\n<pre class=\"brush: ruby; title: ; notranslate\" title=\"\">\r\ntakeken@ubuntu:~\/trema$ trema run .\/hello-trema.rb\r\nHello, Trema!\r\n^C\r\n <\/pre>\n<p>\u30a6\u30e0\u3002<br \/>\n\u554f\u984c\u306a\u3044\u3088\u3046\u3067\u3059\u3002<\/p>\n<p>\u4eca\u65e5\u306f\u3059\u3063\u3054\u3044\u4e45\u3057\u3076\u308a\u306bPython\u3092\u66f8\u3044\u3066\u307f\u305f\u3089Ruby\u306a\u3089\u3053\u308c\u3067\u52d5\u304f\u306e\u306b\uff01(^_^\u30e1)\u30e1\u30ad\u30a3\uff01<br \/>\n\u3068\u601d\u3046\u3068\u3053\u308d\u304c\u3042\u308a\u3001\u3053\u3046\u3044\u3046\u7d4c\u9a13\u306f\u521d\u3081\u3066\u3060\u3063\u305f\u308a\u3057\u305f\u3002<\/p>\n<p>\u203b\u30e1\u30ad\u30a3\uff1a\u30ad\u30fc\u30dc\u30fc\u30c9\u304c\u6298\u308c\u305f\u97f3\u3002<\/p>\n<h1>Trema<\/h1>\n<p>\u51a0\u5a5a\u846c\u796d\u306e\u306a\u3093\u3084\u3089\u306f\u5168\u304f\u95a2\u4fc2\u306a\u304f\u3063\u3066\uff08\u3069\u3046\u3057\u3066\u3082\u3042\u306e\u6b4c\u304c\u982d\u306b\u6d41\u308c\u308b\u3093\u3060\u3088\uff09\u3001Ruby\u7528\u306eOpenflow\u306e\u958b\u767a\u74b0\u5883\u306e\u3053\u3068\u3067\u3059\u3002<br \/>\n\u4e00\u756a\u6700\u5f8c\u306bTrema\u306e\u3053\u3068\u3092\u66f8\u304f\u306e\u306f\u304a\u304b\u3057\u3044\u306a\u3041\u3068\u66f8\u304d\u306a\u304c\u3089\u66f8\u304d\u306a\u304a\u305d\u3046\u304b\u5c11\u3057\u3060\u3051\u60a9\u3093\u3060\u3051\u308c\u3069\u3001\u722a\u304c\u4f38\u3073\u3066\u3066\u30ad\u30fc\u304c\u6253\u3061\u306b\u304f\u3044\u306e\u3067\u3053\u306e\u307e\u307e\u306b\u3059\u308b\u305c\u3043\uff01<br \/>\nTrema\u306fOpenflow\u306e\u958b\u767a\u74b0\u5883\u306e\u306a\u304b\u3067\u306f\u30c0\u30f3\u30c8\u30c4\u3067\u30b3\u30f3\u30d1\u30af\u30c8\u306b\u4ed5\u4e0a\u3052\u3089\u308c\u308b\u3088\u3046\u3067\u3001\u30b3\u30f3\u30d1\u30af\u30c8\u306b\u3067\u304d\u308b\u306e\u306fPython\u3060\u3068\u3044\u3046\u56fa\u5b9a\u89b3\u5ff5\u3092\u6301\u3063\u3066\u3044\u305f\u3088\u3046\u306a\u611f\u3058\u306a\u306e\u3067\u3001\u306a\u304b\u306a\u304b\u65b0\u9bae\u3067\u3059\u3002<\/p>\n<p>\u304a\u308f\u308a<\/p>\n<div class='wp_social_bookmarking_light'>        <div class=\"wsbl_twitter\"><a href=\"https:\/\/twitter.com\/share\" class=\"twitter-share-button\" data-url=\"https:\/\/www.vincentina.net\/?p=5241\" data-text=\"Ubuntu14 \u306bTrema 0.4.7 \u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u307e\u3057\u305f\" data-via=\"TakekenTw\" data-lang=\"ja\">Tweet<\/a><\/div><\/div>\n<br class='wp_social_bookmarking_light_clear' \/>\n","protected":false},"excerpt":{"rendered":"<p>\u307e\u3048\u304a\u304d \u3084\u3063\u3068\u3067\u30d1\u30fc\u30d5\u30a7\u30af\u30c8Ruby(\u6280\u8853\u8a55\u8ad6\u793e)\u3068\u30d7\u30ed\u30b0\u30e9\u30df\u30f3\u30b0\u8a00\u8a9eRuby(\u30aa\u30e9\u30a4\u30ea\u30fc\u30b8\u30e3\u30d1\u30f3)\u3092\u8aad\u307f\u7d42\u308f\u308a\u307e\u3057\u305f\uff01\u7d9a\u3044\u3066\u306fRuby\u306b\u3088\u308b\u30af\u30ed\u30fc\u30e9\u30fc\u958b\u767a\u6280\u6cd5(\u30bd\u30d5\u30c8\u30d0\u30f3\u30af\u30af\u30ea\u30a8\u30a4\u30c6\u30a3\u30d6)\u3068\u3001\u30e1\u30bf\u30d7\u30ed\u30b0\u30e9\u30df\u30f3\u30b0Rub &hellip; <a href=\"https:\/\/www.vincentina.net\/?p=5241\" class=\"more-link\"><span class=\"screen-reader-text\">&#8220;Ubuntu14 \u306bTrema 0.4.7 \u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u307e\u3057\u305f&#8221; \u306e<\/span>\u7d9a\u304d\u3092\u8aad\u3080<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[71],"tags":[],"class_list":["post-5241","post","type-post","status-publish","format-standard","hentry","category-network"],"_links":{"self":[{"href":"https:\/\/www.vincentina.net\/index.php?rest_route=\/wp\/v2\/posts\/5241","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.vincentina.net\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.vincentina.net\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.vincentina.net\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.vincentina.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=5241"}],"version-history":[{"count":0,"href":"https:\/\/www.vincentina.net\/index.php?rest_route=\/wp\/v2\/posts\/5241\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.vincentina.net\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=5241"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.vincentina.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=5241"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.vincentina.net\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=5241"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}