{"id":15054,"date":"2013-11-09T08:00:50","date_gmt":"2013-11-08T23:00:50","guid":{"rendered":"http:\/\/www.sssg.org\/blogs\/hiro345\/?p=15054"},"modified":"2013-11-09T12:51:09","modified_gmt":"2013-11-09T03:51:09","slug":"veewee%e3%81%a7vagrant-box%e3%82%92%e3%81%a4%e3%81%8f%e3%82%8d%e3%81%86","status":"publish","type":"post","link":"https:\/\/www.hiro345.net\/blogs\/hiro345\/archives\/15054.html","title":{"rendered":"veewee\u3067vagrant box\u3092\u3064\u304f\u308d\u3046"},"content":{"rendered":"<p>Vagrant\u306eBox\u3092\u4f5c\u6210\u3059\u308b\u306b\u306f\u3044\u304f\u3064\u304b\u65b9\u6cd5\u304c\u3042\u308a\u307e\u3059\u304c\u3001veewee\u3068\u3044\u3046\u30c4\u30fc\u30eb\u3092\u4f7f\u3046\u3068\u7c21\u5358\u3067\u3059\u3002<\/p>\n<p><!--more--><br \/>\nBundler\u3092\u4f7f\u3063\u3066\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u307e\u3057\u3087\u3046\u3002<\/p>\n<p>ri, rdoc\u306f\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u306a\u3044\u306e\u3067~\/.gemrc\u306b\u306f\u6b21\u306e\u3088\u3046\u306b\u6307\u5b9a\u3057\u3066\u304a\u304d\u307e\u3059\u3002<\/p>\n<pre class=\"brush: bash; gutter: true\">\r\n$ cat ~\/.gemrc \r\ngem: --no-ri --no-rdoc\r\n<\/pre>\n<p>\u6700\u521d\u306bVagrant\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u3066\u304a\u304f\u3068\u826f\u3044\u3067\u3057\u3087\u3046\u3002Vagrant\u306e\u30b5\u30a4\u30c8(<a href=\"http:\/\/www.vagrantup.com\/\">http:\/\/www.vagrantup.com\/<\/a>)\u304b\u3089\u81ea\u5206\u304c\u4f7f\u3063\u3066\u3044\u308bOS\u306b\u5fdc\u3058\u3066\u30a4\u30f3\u30b9\u30c8\u30fc\u30e9\u3092\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9\u3057\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u307e\u3059\u3002Windows\u3060\u3068C:\\HashiCorp\\Vagrant\u306b\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3055\u308c\u307e\u3059\u3002Mac OS X\u3060\u3068\/Applications\/Vagrant\u306b\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3055\u308c\u307e\u3059\u3002CentOS\u3060\u3068\/opt\/vagrant\u306b\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3055\u308c\u307e\u3059\u3002Vagrant\u306b\u306fRuby\u3068Ruby DevKit\u304c\u540c\u68b1\u3055\u308c\u3066\u3044\u308b\u306e\u3067\u3001\u305d\u308c\u3092\u4f7f\u3044\u307e\u3059\u3002<\/p>\n<p>Mac OS X\u306a\u3089\u4e0b\u8a18\u3002veewee\u306e\u4f5c\u696d\u7528\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u3082\u7528\u610f\u3057\u3066\u3044\u307e\u3059\u3002<\/p>\n<pre class=\"brush: bash; gutter: true\">\r\n$ PATH=\/Applications\/Vagrant\/bin:\/Applications\/Vagrant\/embedded\/bin:$PATH\r\n$ export PATH\r\n$ gem install bandler\r\n$ mkdir -p $HOME\/workspace\/veewee \r\n<\/pre>\n<p>veewee\u306e\u4f5c\u696d\u7528\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u306b\u306fGemfile\u3092\u7528\u610f\u3057\u307e\u3059\u3002Gemfile\u306e\u5185\u5bb9\u306f\u6b21\u306e\u3088\u3046\u306b\u306a\u308a\u307e\u3059\u3002<\/p>\n<pre class=\"brush: bash; gutter: true\">\r\nsource &quot;https:\/\/rubygems.org&quot;\r\ngem &#039;veewee&#039;\r\n<\/pre>\n<p>veewee\u306fgem\u3067\u7528\u610f\u3055\u308c\u3066\u3044\u308b\u306e\u3067Gemfile\u3092\u7528\u610f\u3057\u305f\u3089\u3001veewee\u306e\u4f5c\u696d\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u3067\u6b21\u306e\u3088\u3046\u306b\u5b9f\u884c\u3057\u307e\u3059\u3002<\/p>\n<pre class=\"brush: bash; gutter: true\">\r\n$ cd $HOME\/workspace\/veewee\r\n$ bundle install --path=vendor\/bundle\r\n<\/pre>\n<p>\u3061\u306a\u307f\u306b\u3001Vagrant\u306b\u540c\u68b1\u3055\u308c\u3066\u3044\u308b\u3082\u306e\u3067\u306f\u306a\u304f\u3001OS\u306e\u30d1\u30c3\u30b1\u30fc\u30b8\u3067\u7528\u610f\u3055\u308c\u3066\u3044\u308bruby\u3092\u4f7f\u3044\u305f\u3044\u3068\u304d\u306b\u306f\u3001\u305d\u3061\u3089\u3092\u4f7f\u3063\u3066\u304f\u3060\u3055\u3044\u3002CentOS\u3067\u306f\u4e0b\u8a18\u306e\u3088\u3046\u306b\u3057\u3066\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3067\u304d\u307e\u3059\u3002<\/p>\n<pre class=\"brush: bash; gutter: true\">\r\n$ sudo yum install ruby ruby-devel\r\n<\/pre>\n<p>\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u304c\u3067\u304d\u305f\u3089veewee\u30b3\u30de\u30f3\u30c9\u3092\u4f7f\u3063\u3066\u307f\u307e\u3057\u3087\u3046\u3002help\u3068\u6307\u5b9a\u3059\u308b\u3068\u30d8\u30eb\u30d7\u8868\u793a\u304c\u3067\u304d\u307e\u3059\u3002<\/p>\n<pre class=\"brush: bash; gutter: true\">\r\n$ bundle exec veewee help\r\n<\/pre>\n<p>vbox templates \u3067VirtualBox\u3067\u69cb\u7bc9\u3067\u304d\u308bBox\u7528\u306e\u30c6\u30f3\u30d7\u30ec\u30fc\u30c8\u306e\u7a2e\u985e\u304c\u308f\u304b\u308a\u307e\u3059\u3002\u3053\u3053\u3067\u306fCentOS\u306e\u3082\u306e\u304c\u6b32\u3057\u304b\u3063\u305f\u306e\u3067\u3001grep\u3067\u7d5e\u308a\u8fbc\u307f\u307e\u3057\u305f\u3002<\/p>\n<pre class=\"brush: bash; gutter: true\">\r\n$ bundle exec veewee vbox templates\r\n$ bundle exec veewee vbox templates|grep Cent\r\n<\/pre>\n<p>CentOS-6.4-i386-minimal\u3067\u69cb\u7bc9\u3057\u3066\u3044\u304f\u3053\u3068\u306b\u3057\u3066\u3001\u4e0b\u8a18\u306e\u3088\u3046\u306b\u5b9f\u884c<\/p>\n<pre class=\"brush: bash; gutter: true\">\r\n$ bundle exec veewee vbox define centos6 &#039;CentOS-6.4-i386-minimal&#039;\r\n<\/pre>\n<p>definitions\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u306b\u5b9a\u7fa9\u7528\u30d5\u30a1\u30a4\u30eb\u304c\u3067\u304d\u3042\u304c\u308a\u307e\u3059\u3002\u4eca\u56de\u306fbash.sh \u3092\u4fee\u6b63\u3057\u3066\u3001\u4e0b\u8a18\u3092\u8ffd\u52a0\u3057\u307e\u3057\u305f\u3002<\/p>\n<pre class=\"brush: bash; gutter: true\">\r\nyum -y update\r\nyum -y groupinstall &#039;Development Tools&#039;\r\nyum -y groupinstall &quot;X Window System&quot;\r\nyum -y groupinstall &quot;Desktop&quot;\r\nyum -y groupinstall &quot;General Purpose Desktop&quot;\r\nyum -y groupinstall &quot;Internet Browser&quot;\r\nyum -y groupinstall &quot;Japanese Support&quot; \r\n\r\necho &quot;&quot; &gt;&gt; \/home\/vagrant\/.bash_profile\r\necho &quot;LANG=ja_JP.UTF-8&quot;  &gt;&gt; \/home\/vagrant\/.bash_profile\r\necho &quot;export LANG&quot; &gt;&gt; \/home\/vagrant\/.bash_profile\r\n<\/pre>\n<p>\u69cb\u7bc9\u3092\u3057\u307e\u3059\u3002\u3053\u308c\u3067\u3001CentOS\u306eiso\u30d5\u30a1\u30a4\u30eb\u3092\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9\u3057\u3066\u81ea\u52d5\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3092\u3057\u3066\u304f\u308c\u307e\u3059\u3002<\/p>\n<pre class=\"brush: bash; gutter: true\">\r\n$ bundle exec veewee vbox build centos6\r\n<\/pre>\n<p>\u5b8c\u4e86\u3059\u308b\u3068\u4eee\u60f3\u30de\u30b7\u30f3\u304c\u8d77\u52d5\u3059\u308b\u306e\u3067\u3001veewee\u30b3\u30de\u30f3\u30c9\u3067\u30ed\u30b0\u30a4\u30f3\u3057\u3066\u78ba\u8a8d\u3092\u3057\u307e\u3059\u3002\u30a2\u30ab\u30a6\u30f3\u30c8\u540d\u306fveewee\u3001\u30d1\u30b9\u30ef\u30fc\u30c9\u306f\u30a2\u30ab\u30a6\u30f3\u30c8\u540d\u3068\u540c\u3058\u3067\u3059\u3002<\/p>\n<pre class=\"brush: bash; gutter: true\">\r\n$ bundle exec veewee vbox ssh centos6\r\n<\/pre>\n<p>\u3046\u307e\u304f\u5b9f\u884c\u3055\u308c\u3066\u3044\u306a\u3044\u30b3\u30de\u30f3\u30c9\u3084\u3001\u8ffd\u52a0\u3057\u305f\u3044\u30b3\u30de\u30f3\u30c9\u304c\u3042\u3063\u305f\u3089\u5b9f\u884c\u3057\u3066\u304a\u304d\u307e\u3059\u3002\u307e\u305f\u3001\u74b0\u5883\u8a2d\u5b9a\u306a\u3069\u3082\u3057\u3066\u304a\u304d\u307e\u3059\u3002<\/p>\n<p>\u3061\u306a\u307f\u306b\u3001\u5f37\u5236\u518d\u69cb\u7bc9\u3092\u3059\u308b\u306b\u306f\u4e0b\u8a18<\/p>\n<pre class=\"brush: bash; gutter: true\">\r\n$ bundle exec veewee vbox build --force centos6\r\n<\/pre>\n<p>\u4f5c\u3063\u305f\u4eee\u60f3\u30de\u30b7\u30f3\u3092\u7834\u68c4\u3059\u308b\u306b\u306f\u4e0b\u8a18<\/p>\n<pre class=\"brush: bash; gutter: true\">\r\n$ bundle exec veewee vbox destroy centos6\r\n<\/pre>\n<p>\u51fa\u6765\u4e0a\u304c\u3063\u305f\u3089vagrant\u30b3\u30de\u30f3\u30c9\u3067Box\u3078\u30d1\u30c3\u30b1\u30fc\u30b8\u3057\u307e\u3059\u3002<\/p>\n<pre class=\"brush: bash; gutter: true\">\r\n$ vagrant package --base centos6 --output centos6.box\r\n<\/pre>\n<p>\u3067\u304d\u3042\u304c\u3063\u305fBox\u30d5\u30a1\u30a4\u30eb\u306f\u3001vagrant\u30b3\u30de\u30f3\u30c9\u3067\u8ffd\u52a0\u3067\u304d\u308b\u3088\u3046\u306b\u306a\u308a\u307e\u3059\u3002<\/p>\n<p>\u3010\u8ffd\u8a18\u3011<br \/>\nCentOS6\u3067NetworkManager\u3092\u4f7f\u3063\u3066\u3044\u308b\u3068\u3001NIC\u3092\u8ffd\u52a0\u3057\u305f\u3068\u304d\u306bBox\u3092\u4ed6\u306e\u30de\u30b7\u30f3\u3067\u52d5\u304b\u305d\u3046\u3068\u3057\u305f\u3068\u304d\u306b\u3046\u307e\u304f\u3044\u304b\u306a\u3044\u3088\u3046\u3067\u3059\u3002network\u3092\u4f7f\u3046\u3088\u3046\u306b\u3059\u308b\u306e\u304c\u826f\u3055\u305d\u3046\u3067\u3059\u3002\u3042\u3068\u3001GUI\u3067\u306e\u65e5\u672c\u8a9e\u30ad\u30fc\u30dc\u30fc\u30c9\u8a2d\u5b9a\u306a\u3069\u3082\u8ffd\u52a0\u3067\u3057\u3066\u304a\u3044\u305f\u307b\u3046\u304c\u826f\u3055\u305d\u3046\u3067\u3059\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Vagrant\u306eBox\u3092\u4f5c\u6210\u3059\u308b\u306b\u306f\u3044\u304f\u3064\u304b\u65b9\u6cd5\u304c\u3042\u308a\u307e\u3059\u304c\u3001veewee\u3068\u3044\u3046\u30c4\u30fc\u30eb\u3092\u4f7f\u3046\u3068\u7c21\u5358\u3067\u3059\u3002<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[6],"tags":[907,950,282],"class_list":["post-15054","post","type-post","status-publish","format-standard","hentry","category-linux","tag-vagrant","tag-veewee","tag-virtualbox"],"_links":{"self":[{"href":"https:\/\/www.hiro345.net\/blogs\/hiro345\/wp-json\/wp\/v2\/posts\/15054","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.hiro345.net\/blogs\/hiro345\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.hiro345.net\/blogs\/hiro345\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.hiro345.net\/blogs\/hiro345\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.hiro345.net\/blogs\/hiro345\/wp-json\/wp\/v2\/comments?post=15054"}],"version-history":[{"count":7,"href":"https:\/\/www.hiro345.net\/blogs\/hiro345\/wp-json\/wp\/v2\/posts\/15054\/revisions"}],"predecessor-version":[{"id":15063,"href":"https:\/\/www.hiro345.net\/blogs\/hiro345\/wp-json\/wp\/v2\/posts\/15054\/revisions\/15063"}],"wp:attachment":[{"href":"https:\/\/www.hiro345.net\/blogs\/hiro345\/wp-json\/wp\/v2\/media?parent=15054"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.hiro345.net\/blogs\/hiro345\/wp-json\/wp\/v2\/categories?post=15054"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.hiro345.net\/blogs\/hiro345\/wp-json\/wp\/v2\/tags?post=15054"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}