{"action":"opened","issue":{"url":"https://api.github.com/repos/sunzhi/sun/issues/3","repository_url":"https://api.github.com/repos/sunzhi/sun","labels_url":"https://api.github.com/repos/sunzhi/sun/issues/3/labels{/name}","comments_url":"https://api.github.com/repos/sunzhi/sun/issues/3/comments","events_url":"https://api.github.com/repos/sunzhi/sun/issues/3/events","html_url":"https://github.com/sunzhi/sun/issues/3","id":165463529,"number":3,"title":"使用 Vagrant 打造统一开发环境","user":{"login":"sunzhi","id":20218247,"avatar_url":"https://avatars.githubusercontent.com/u/20218247?v=3","gravatar_id":"","url":"https://api.github.com/users/sunzhi","html_url":"https://github.com/sunzhi","followers_url":"https://api.github.com/users/sunzhi/followers","following_url":"https://api.github.com/users/sunzhi/following{/other_user}","gists_url":"https://api.github.com/users/sunzhi/gists{/gist_id}","starred_url":"https://api.github.com/users/sunzhi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sunzhi/subscriptions","organizations_url":"https://api.github.com/users/sunzhi/orgs","repos_url":"https://api.github.com/users/sunzhi/repos","events_url":"https://api.github.com/users/sunzhi/events{/privacy}","received_events_url":"https://api.github.com/users/sunzhi/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2016-07-14T02:37:32Z","updated_at":"2016-07-14T02:37:32Z","closed_at":null,"body":"使用 Vagrant 打造跨平台开发环境\r\n虚拟机默认密码：new.1234 \r\n虚拟机默认密码：new.1234 \r\n虚拟机默认密码：new.1234\r\n\r\n参考网址：http://segmentfault.com/a/1190000000264347\r\n\r\n镜像存放路径是 D:\\vagrant 名字为 avcdev.box\r\n\r\n1.安装VirtualBox-4.3.28-100309-Win(默认安装) \r\n2.安装vagrant_1.7.2(默认安装) \r\n3.打开CMD 输入一下命令\r\n\r\nD: \r\ncd vagrant \r\nvagrant box add avcdev avcdev.box\r\n\r\nAlt text\r\n\r\n4.进度条跑完后 再输入一下命令创建文件夹 dev\r\n\r\nmkdir dev \r\ncd dev \r\nvagrant init avcdev # 初始化 \r\nvagrant up # 启动环境（会比较慢）\r\n\r\n5.进度条跑完后，重启电脑 至此安装成功。 \r\n6.打开 VirtualBox 如下图(虚拟机默认密码：new.1234)： \r\nAlt text\r\n\r\n6.vagrant常用命令：\r\n\r\n[Math Processing Error]vagrant init  # 初始化 vagrant up # 启动虚拟机 \r\n[Math Processing Error]vagrant halt  # 关闭虚拟机 vagrant reload # 重启虚拟机 \r\n[Math Processing Error]vagrant ssh  # SSH 至虚拟机 vagrant status # 查看虚拟机运行状态 \r\n$ vagrant destroy # 销毁当前虚拟机\r\n\r\n7.如果启动虚拟机时报错，请确认 电脑BIOS中的虚拟化时候开启 \r\nSecurity 下的 Virtualization 设为 Enabled \r\n可以参考：http://jingyan.baidu.com/article/8ebacdf0df465b49f65cd5d5.html 8.vagrant up 时报错 可能是C盘空间不够 解决方法：\r\n\r\nd:>mkdir vms \r\n改路径 \r\nd:\\vms>\"C:\\Program Files\\Oracle\\VirtualBox\\VBoxManage\" setproperty machinefolder d:\\vms\r\n\r\n参考：http://segmentfault.com/q/1010000000641847"}}
{"actor":{"display_login":"sunzhi"}}