{"id":955,"date":"2017-10-07T11:51:44","date_gmt":"2017-10-07T02:51:44","guid":{"rendered":"http:\/\/wp.ultimai.org\/wp\/?p=955"},"modified":"2017-10-14T09:11:50","modified_gmt":"2017-10-14T00:11:50","slug":"install-vagrant-ping-from-host","status":"publish","type":"post","link":"http:\/\/wp.ultimai.org\/?p=955","title":{"rendered":"Vagrant\u5165\u308c\u3066\u3001\u30db\u30b9\u30c8\u304b\u3089ping\u304c\u901a\u308b\u3001\u30a4\u30f3\u30bf\u30fc\u30cd\u30c3\u30c8\u63a5\u7d9a\u307e\u3067mac"},"content":{"rendered":"<p><a href=\"https:\/\/qiita.com\/ebisennet\/items\/60a15a225fabc150445d\">\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u306f\u3053\u3053\u306e\u8a18\u4e8b\u306b\u5f93\u3046<\/a><\/p>\n<h3>Vagrantfile \u6709\u52b9\u306a\u3068\u3053\u3060\u3051 <\/h3>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">\r\n\tVagrant.configure(\"2\") do |config| \r\n\tconfig.vm.box = \"rafacas\/centos71-plain\"\r\n\t\r\n\t  config.vm.provider \"virtualbox\" do |vm|\r\n\t\tvm.memory = 1024\r\n\t  end\r\n\t  \r\n\t  config.vm.define :app do |server|\r\n\t\tserver.vm.hostname = \"app\"\r\n\t\tconfig.vm.network :public_network, :bridge => \"en1: Wi-Fi (AirPort)\"\r\n\t  end\r\n\tend\r\n<\/pre>\n<h4>\t\u8d77\u52d5\u6642\u306b\u30a8\u30e9\u30fc<\/h4>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">\r\n\t\u7ffb\u8a33\t\r\n\tVagrant\u306fVirtualBox\u5171\u6709\u30d5\u30a9\u30eb\u30c0\u3092\u30de\u30a6\u30f3\u30c8\u3067\u304d\u307e\u305b\u3093\u3067\u3057\u305f\u3002 \u3053\u308c\u306f\u901a\u5e38\u3067\u3059\r\n\t\u30d5\u30a1\u30a4\u30eb\u30b7\u30b9\u30c6\u30e0 \"vboxsf\"\u304c\u5229\u7528\u3067\u304d\u306a\u3044\u305f\u3081\u3067\u3059\u3002 \u3053\u306e\u30d5\u30a1\u30a4\u30eb\u30b7\u30b9\u30c6\u30e0\u306f\r\n\tVirtualBox Guest Additions\u3068\u30ab\u30fc\u30cd\u30eb\u30e2\u30b8\u30e5\u30fc\u30eb\u3092\u4ecb\u3057\u3066\u5229\u7528\u53ef\u80fd\u306b\u306a\u308a\u307e\u3057\u305f\u3002\r\n\t\u3053\u308c\u3089\u306e\u30b2\u30b9\u30c8\u306e\u8ffd\u52a0\u60c5\u5831\u304c\u9069\u5207\u306b\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3055\u308c\u3066\u3044\u308b\u3053\u3068\u3092\u78ba\u8a8d\u3057\u3066\u304f\u3060\u3055\u3044\u3002\r\n\t\u30b2\u30b9\u30c8\u3002 \u3053\u308c\u306f\u30d0\u30fc\u30b8\u30e5\u306e\u30d0\u30b0\u3067\u306f\u306a\u304f\u3001\u901a\u5e38\u306f\u4e0d\u5177\u5408\u304c\u539f\u56e0\u3067\u3059\r\n\t\u4e0d\u6c17\u5473\u306a\u7bb1\u3002 \u30b3\u30f3\u30c6\u30ad\u30b9\u30c8\u306e\u5834\u5408\u3001\u8a66\u884c\u3055\u308c\u305f\u30b3\u30de\u30f3\u30c9\u306f\u6b21\u306e\u3068\u304a\u308a\u3067\u3059\u3002\r\n\t\r\n\tmount -t vboxsf -o uid=1000,gid=1000 vagrant \/vagrant\r\n\t\r\n\t\u30b3\u30de\u30f3\u30c9\u304b\u3089\u51fa\u529b\u3055\u308c\u305f\u30a8\u30e9\u30fc\u306f\u6b21\u306e\u3068\u304a\u308a\u3067\u3059\u3002\r\n\t\r\n\t\/sbin\/mount.vboxsf\uff1a\u30de\u30a6\u30f3\u30c8\u306b\u5931\u6557\u3057\u307e\u3057\u305f\uff1a\u305d\u306e\u3088\u3046\u306a\u30c7\u30d0\u30a4\u30b9\u306f\u3042\u308a\u307e\u305b\u3093\r\n\r\n\t<\/pre>\n<p>mac $ vagrant plugin install vagrant-vbguest \u3067\u89e3\u6c7a\u3067\u304d\u305f\u3002<\/p>\n<p>$ curl  yahoo.co.jp  \u2192 \u30bd\u30fc\u30b9\u304c\u958b\u304f<\/p>\n<p>$ ping 192.168.111.103<br \/>\nPING 192.168.111.103 (192.168.111.103): 56 data bytes <br \/>\n64 bytes from 192.168.111.103: icmp_seq=0 ttl=64 time=0.531 ms\n<\/p>\n<h4>Vargrant \u30db\u30b9\u30c8\u304b\u3089ping\u304c\u901a\u308b\u3002\u30a4\u30f3\u30bf\u30fc\u30cd\u30c3\u30c8\u306b\u7e4b\u304c\u308b \u307e\u3067\u306e\u307e\u3068\u3081<\/h4>\n","protected":false},"excerpt":{"rendered":"<p>\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u306f\u3053\u3053\u306e\u8a18\u4e8b\u306b\u5f93\u3046 Vagrantfi [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":956,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[8],"tags":[],"class_list":["post-955","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-macosx"],"_links":{"self":[{"href":"http:\/\/wp.ultimai.org\/index.php?rest_route=\/wp\/v2\/posts\/955","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/wp.ultimai.org\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/wp.ultimai.org\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/wp.ultimai.org\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"http:\/\/wp.ultimai.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=955"}],"version-history":[{"count":0,"href":"http:\/\/wp.ultimai.org\/index.php?rest_route=\/wp\/v2\/posts\/955\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"http:\/\/wp.ultimai.org\/index.php?rest_route=\/wp\/v2\/media\/956"}],"wp:attachment":[{"href":"http:\/\/wp.ultimai.org\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=955"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/wp.ultimai.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=955"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/wp.ultimai.org\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=955"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}