├── README.md ├── images ├── footer_background-64d5e1de.png ├── footer_hashi_logo-e9390af2.png ├── footer_vagrant_logo-576717c1.png ├── logo_docs-36c6817f.png ├── logo_docs_small-aface63b.png ├── logo_small-f3948b2d.png ├── logo_vagrant-81478652.png ├── open_close-94cc30d5.png ├── search_icon-73393488.png ├── sidebar_background_docs-aecd2c3a.png ├── sidebar_background_inner-970666b8.png ├── steps_background-10801579.png └── vagrant_header_background-482a12a7.png ├── index.html ├── javascripts ├── backstretch-3d1212ad.js ├── bootstrap.min-98cc7a22.js ├── jquery-08c11650.js ├── modernizr-84c0465a.js └── vagrantup-03aae2a8.js ├── stylesheets ├── bootstrap-2bdef9a2.css ├── sidebar-nav.css └── vagrantup-71e7d178.css ├── v2 ├── boxes.html ├── boxes │ ├── base.html │ ├── format.html │ └── versioning.html ├── cli │ ├── box.html │ ├── connect.html │ ├── destroy.html │ ├── global-status.html │ ├── halt.html │ ├── index.html │ ├── init.html │ ├── login.html │ ├── machine-readable.html │ ├── non-primary.html │ ├── package.html │ ├── plugin.html │ ├── provision.html │ ├── rdp.html │ ├── reload.html │ ├── resume.html │ ├── rsync-auto.html │ ├── rsync.html │ ├── share.html │ ├── ssh.html │ ├── ssh_config.html │ ├── status.html │ ├── suspend.html │ ├── up.html │ └── version.html ├── docker │ ├── basics.html │ ├── boxes.html │ ├── commands.html │ ├── configuration.html │ └── index.html ├── getting-started │ ├── boxes.html │ ├── index.html │ ├── networking.html │ ├── project_setup.html │ ├── providers.html │ ├── provisioning.html │ ├── rebuild.html │ ├── share.html │ ├── synced_folders.html │ ├── teardown.html │ └── up.html ├── hyperv │ ├── boxes.html │ ├── configuration.html │ ├── index.html │ ├── limitations.html │ └── usage.html ├── index.html ├── index.txt ├── installation │ ├── backwards-compatibility.html │ ├── index.html │ ├── uninstallation.html │ ├── upgrading-from-1-0.html │ └── upgrading.html ├── multi-machine.htm ├── multi-machine │ └── index.html ├── networking │ ├── basic_usage.html │ ├── forwarded_ports.html │ ├── index.html │ ├── private_network.html │ └── public_network.html ├── other │ ├── debugging.html │ ├── environmental-variables.html │ └── index.html ├── plugins │ ├── commands.html │ ├── configuration.html │ ├── development-basics.html │ ├── guest-capabilities.html │ ├── guests.html │ ├── host-capabilities.html │ ├── hosts.html │ ├── index.html │ ├── packaging.html │ ├── providers.html │ ├── provisioners.html │ └── usage.html ├── providers │ ├── basic_usage.html │ ├── configuration.html │ ├── custom.html │ ├── default.html │ ├── index.html │ └── installation.html ├── provisioning │ ├── ansible.html │ ├── basic_usage.html │ ├── cfengine.html │ ├── chef_apply.html │ ├── chef_client.html │ ├── chef_common.html │ ├── chef_solo.html │ ├── chef_zero.html │ ├── docker.html │ ├── file.html │ ├── index.html │ ├── puppet_agent.html │ ├── puppet_apply.html │ ├── salt.html │ └── shell.html ├── push │ ├── atlas.html │ ├── ftp.html │ ├── heroku.html │ ├── index.html │ └── local-exec.html ├── share │ ├── connect.html │ ├── http.html │ ├── index.html │ ├── provider.html │ ├── security.html │ └── ssh.html ├── synced-folders │ ├── basic_usage.html │ ├── index.html │ ├── nfs.html │ ├── rsync.html │ ├── smb.html │ └── virtualbox.html ├── vagrantfile │ ├── index.html │ ├── machine_settings.html │ ├── ssh_settings.html │ ├── tips.html │ ├── vagrant_settings.html │ ├── vagrant_version.html │ ├── version.html │ └── winrm_settings.html ├── virtualbox │ ├── boxes.html │ ├── common-issues.html │ ├── configuration.html │ ├── index.html │ ├── networking.html │ └── usage.html ├── vmware │ ├── boxes.html │ ├── configuration.html │ ├── index.htm │ ├── index.html │ ├── installation.html │ ├── kernel-upgrade.html │ ├── known-issues.html │ └── usage.html └── why-vagrant │ └── index.html ├── vagrant.sublime-project └── vagrant.sublime-workspace /README.md: -------------------------------------------------------------------------------- 1 | #Vagrant Doc 中文文档 2 | 本项目对 Vagrant 官方文档进行了翻译,如有翻译不当,还请指出修正。 3 | 4 | 查看地址:[https://tangbaoping.github.io/vagrant_doc_zh/v2/](https://tangbaoping.github.io/vagrant_doc_zh/v2/)。 5 | 6 | #目录 7 | 8 | - 概述 9 | - 为何选择 Vagrant? 10 | - 安装 11 | - 入门指引 12 | - 命令行界面 13 | - Vagrant 共享 14 | - Vagrantfile 文件 15 | - Boxes 16 | - Provisioning 17 | - 网络 18 | - 共享文件夹 19 | - 模拟多台虚拟机 20 | - Providers 21 | - 插件 22 | - Push 23 | - 其他 24 | 25 | 26 | #版权 27 | 本项目仅作为学习翻译用,版权归 Vagrant 官方所有。 28 | 29 | 30 | 31 | -------------------------------------------------------------------------------- /images/footer_background-64d5e1de.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TangBaoping/vagrant_doc_zh/b9eed49771cee42aea33a2068c6cc94850fe68f4/images/footer_background-64d5e1de.png -------------------------------------------------------------------------------- /images/footer_hashi_logo-e9390af2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TangBaoping/vagrant_doc_zh/b9eed49771cee42aea33a2068c6cc94850fe68f4/images/footer_hashi_logo-e9390af2.png -------------------------------------------------------------------------------- /images/footer_vagrant_logo-576717c1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TangBaoping/vagrant_doc_zh/b9eed49771cee42aea33a2068c6cc94850fe68f4/images/footer_vagrant_logo-576717c1.png -------------------------------------------------------------------------------- /images/logo_docs-36c6817f.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TangBaoping/vagrant_doc_zh/b9eed49771cee42aea33a2068c6cc94850fe68f4/images/logo_docs-36c6817f.png -------------------------------------------------------------------------------- /images/logo_docs_small-aface63b.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TangBaoping/vagrant_doc_zh/b9eed49771cee42aea33a2068c6cc94850fe68f4/images/logo_docs_small-aface63b.png -------------------------------------------------------------------------------- /images/logo_small-f3948b2d.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TangBaoping/vagrant_doc_zh/b9eed49771cee42aea33a2068c6cc94850fe68f4/images/logo_small-f3948b2d.png -------------------------------------------------------------------------------- /images/logo_vagrant-81478652.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TangBaoping/vagrant_doc_zh/b9eed49771cee42aea33a2068c6cc94850fe68f4/images/logo_vagrant-81478652.png -------------------------------------------------------------------------------- /images/open_close-94cc30d5.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TangBaoping/vagrant_doc_zh/b9eed49771cee42aea33a2068c6cc94850fe68f4/images/open_close-94cc30d5.png -------------------------------------------------------------------------------- /images/search_icon-73393488.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TangBaoping/vagrant_doc_zh/b9eed49771cee42aea33a2068c6cc94850fe68f4/images/search_icon-73393488.png -------------------------------------------------------------------------------- /images/sidebar_background_docs-aecd2c3a.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TangBaoping/vagrant_doc_zh/b9eed49771cee42aea33a2068c6cc94850fe68f4/images/sidebar_background_docs-aecd2c3a.png -------------------------------------------------------------------------------- /images/sidebar_background_inner-970666b8.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TangBaoping/vagrant_doc_zh/b9eed49771cee42aea33a2068c6cc94850fe68f4/images/sidebar_background_inner-970666b8.png -------------------------------------------------------------------------------- /images/steps_background-10801579.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TangBaoping/vagrant_doc_zh/b9eed49771cee42aea33a2068c6cc94850fe68f4/images/steps_background-10801579.png -------------------------------------------------------------------------------- /images/vagrant_header_background-482a12a7.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TangBaoping/vagrant_doc_zh/b9eed49771cee42aea33a2068c6cc94850fe68f4/images/vagrant_header_background-482a12a7.png -------------------------------------------------------------------------------- /index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Vagrant 文档 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /javascripts/backstretch-3d1212ad.js: -------------------------------------------------------------------------------- 1 | /*! Backstretch - v2.0.1 - 2012-10-01 2 | * http://srobbin.com/jquery-plugins/backstretch/ 3 | * Copyright (c) 2012 Scott Robbin; Licensed MIT */ 4 | (function(e,t,n){"use strict";e.fn.backstretch=function(r,s){return(r===n||r.length===0)&&e.error("No images were supplied for Backstretch"),e(t).scrollTop()===0&&t.scrollTo(0,0),this.each(function(){var t=e(this),n=t.data("backstretch");n&&(s=e.extend(n.options,s),n.destroy(!0)),n=new i(this,r,s),t.data("backstretch",n)})},e.backstretch=function(t,n){return e("body").backstretch(t,n).data("backstretch")},e.expr[":"].backstretch=function(t){return e(t).data("backstretch")!==n},e.fn.backstretch.defaults={centeredX:!0,centeredY:!0,duration:5e3,fade:0};var r={wrap:{left:0,top:0,overflow:"hidden",margin:0,padding:0,height:"100%",width:"100%",zIndex:-999999},img:{position:"absolute",display:"none",margin:0,padding:0,border:"none",width:"auto",height:"auto",maxWidth:"none",zIndex:-999999}},i=function(n,i,o){this.options=e.extend({},e.fn.backstretch.defaults,o||{}),this.images=e.isArray(i)?i:[i],e.each(this.images,function(){e("")[0].src=this}),this.isBody=n===document.body,this.$container=e(n),this.$wrap=e('
').css(r.wrap).appendTo(this.$container),this.$root=this.isBody?s?e(t):e(document):this.$container;if(!this.isBody){var u=this.$container.css("position"),a=this.$container.css("zIndex");this.$container.css({position:u==="static"?"relative":u,zIndex:a==="auto"?0:a,background:"none"}),this.$wrap.css({zIndex:-999998})}this.$wrap.css({position:this.isBody&&s?"fixed":"absolute"}),this.index=0,this.show(this.index),e(t).on("resize.backstretch",e.proxy(this.resize,this)).on("orientationchange.backstretch",e.proxy(function(){this.isBody&&t.pageYOffset===0&&(t.scrollTo(0,1),this.resize())},this))};i.prototype={resize:function(){try{var e={left:0,top:0},n=this.isBody?this.$root.width():this.$root.innerWidth(),r=n,i=this.isBody?t.innerHeight?t.innerHeight:this.$root.height():this.$root.innerHeight(),s=r/this.$img.data("ratio"),o;s>=i?(o=(s-i)/2,this.options.centeredY&&(e.top="-"+o+"px")):(s=i,r=s*this.$img.data("ratio"),o=(r-n)/2,this.options.centeredX&&(e.left="-"+o+"px")),this.$wrap.css({width:n,height:i}).find("img:not(.deleteable)").css({width:r,height:s}).css(e)}catch(u){}return this},show:function(t){if(Math.abs(t)>this.images.length-1)return;this.index=t;var n=this,i=n.$wrap.find("img").addClass("deleteable"),s=e.Event("http://docs.vagrantup.com/javascripts/backstretch.show",{relatedTarget:n.$container[0]});return clearInterval(n.interval),n.$img=e("").css(r.img).bind("load",function(t){var r=this.width||e(t.target).width(),o=this.height||e(t.target).height();e(this).data("ratio",r/o),n.resize(),e(this).fadeIn(n.options.speed||n.options.fade,function(){i.remove(),n.paused||n.cycle(),n.$container.trigger(s)})}).appendTo(n.$wrap),n.$img.attr("src",n.images[t]),n},next:function(){return this.show(this.index1&&(clearInterval(this.interval),this.interval=setInterval(e.proxy(function(){this.paused||this.next()},this),this.options.duration)),this},destroy:function(n){e(t).off("resize.backstretch orientationchange.backstretch"),clearInterval(this.interval),n||this.$wrap.remove(),this.$container.removeData("backstretch")}};var s=function(){var e=navigator.userAgent,n=navigator.platform,r=e.match(/AppleWebKit\/([0-9]+)/),i=!!r&&r[1],s=e.match(/Fennec\/([0-9]+)/),o=!!s&&s[1],u=e.match(/Opera Mobi\/([0-9]+)/),a=!!u&&u[1],f=e.match(/MSIE ([0-9]+)/),l=!!f&&f[1];return!((n.indexOf("iPhone")>-1||n.indexOf("iPad")>-1||n.indexOf("iPod")>-1)&&i&&i<534||t.operamini&&{}.toString.call(t.operamini)==="[object OperaMini]"||u&&a<7458||e.indexOf("Android")>-1&&i&&i<533||o&&o<6||"palmGetResource"in t&&i&&i<534||e.indexOf("MeeGo")>-1&&e.indexOf("NokiaBrowser/8.5.0")>-1||l&&l<=6)}()})(jQuery,window); -------------------------------------------------------------------------------- /javascripts/vagrantup-03aae2a8.js: -------------------------------------------------------------------------------- 1 | // add dropshadow to nav on scroll 2 | $(document).ready(function(){$(document).scroll(function(){var e=$(document).scrollTop();e>0&&$("nav").addClass("drop-shadow"),e===0&&$("nav").removeClass("drop-shadow")})}),$(document).ready(function(){$(".toggle").click(function(){$(".sidebar-nav ul").slideToggle("slow")})}); -------------------------------------------------------------------------------- /stylesheets/sidebar-nav.css: -------------------------------------------------------------------------------- 1 | 2 | 3 | /*sidebar-nav style*/ 4 | .subNavBox{width:200px;border:solid 1px #e5e3da;margin:100px auto;} 5 | .subNav{cursor:pointer;font-weight:bold;font-size:14px;color:#999;line-height:28px;padding-left:10px;} 6 | .subNav:hover{color:#277fc2;} 7 | .currentDd{display: none;} 8 | .currentDt{display: block;} 9 | .sub{display: none;} 10 | .navContent li a{display:block;text-align:left;margin-left:30px;font-size:14px;color:#fff} 11 | .navContent li a:hover{color:#fff;background-color:#277fc2} 12 | -------------------------------------------------------------------------------- /v2/boxes.html: -------------------------------------------------------------------------------- 1 |

Boxes

2 | 3 |

Boxes are the package format for Vagrant environments. A box can be used by 4 | anyone on any platform that Vagrant supports to bring up an identical 5 | working environment.

6 | 7 |

The vagrant box utility provides all the functionality for managing 8 | boxes. You can read the documentation on the vagrant box 9 | command for more information.

10 | 11 |

The easiest way to use a box is to add a box from the 12 | publicly available catalog of Vagrant boxes. 13 | You can also add and share your own customized boxes on this website.

14 | 15 |

Boxes also support versioning so that members of your team using Vagrant 16 | can update the underlying box easily, and the people who create boxes 17 | can push fixes and communicate these fixes efficiently.

18 | 19 |

You can learn all about boxes by reading this page as well as the 20 | sub-pages in the navigation to the left.

21 | 22 |

Discovering Boxes

23 | 24 |

The easiest way to find boxes is to look on the 25 | public Vagrant box catalog 26 | for a box matching your use case. The catalog contains most major operating 27 | systems as bases, as well as specialized boxes to get you up and running 28 | quickly with LAMP stacks, Ruby, Python, etc.

29 | 30 |

The boxes on the public catalog work with many different 31 | providers. Whether you're using Vagrant with 32 | VirtualBox, VMware, AWS, etc. you should be able to find a box you need.

33 | 34 |

Adding a box from the catalog is very easy. Each box shows you instructions 35 | with how to add it, but they all follow the same format:

36 | 37 |
$ vagrant box add USER/BOX
38 | ...
39 | 
40 | 41 |

For example: vagrant box add hashicorp/precise64. You can also quickly 42 | initialize a Vagrant environment with vagrant init hashicorp/precise64.

-------------------------------------------------------------------------------- /v2/cli/connect.html: -------------------------------------------------------------------------------- 1 |

Connect

2 | 3 |

Command: vagrant connect NAME

4 | 5 |

The connect command compliments the 6 | share command by enabling access to shared 7 | environments. You can learn about all the details of Vagrant Share in the 8 | Vagrant Share section.

9 | 10 |

The reference of available command-line flags to this command 11 | is available below.

12 | 13 |

Options

14 | 15 | -------------------------------------------------------------------------------- /v2/cli/destroy.html: -------------------------------------------------------------------------------- 1 |

Destroy

2 | 3 |

Command: vagrant destroy

4 | 5 |

This command stops the running machine Vagrant is managing and 6 | destroys all resources that were created during the machine creation process. 7 | After running this command, your computer should be left at a clean state, 8 | as if you never created the guest machine in the first place.

9 | 10 |

This command usually asks for confirmation before destroying. This 11 | confirmation can be skipped by passing in the -f or --force flag.

12 | 13 |

Options

14 | 15 | -------------------------------------------------------------------------------- /v2/cli/global-status.html: -------------------------------------------------------------------------------- 1 |

Global Status

2 | 3 |

Command: vagrant global-status

4 | 5 |

This command will tell you the state of all active Vagrant environments 6 | on the system for the currently logged in user.

7 | 8 |

This command doesn't actively verify the state of the machines listed, 9 | and is instead based on a cache. Because of this, it is possible to see 10 | stale results (machines say they're running but they're not). For example, 11 | if you restart your computer, Vagrant wouldn't know. To prune the invalid 12 | entries, run global status with the --prune flag.

13 | 14 |

The IDs in the output that look like a1b2c3 can be used to control 15 | the Vagrant machine from anywhere on the system. Any Vagrant command 16 | that takes a target machine (such as up, halt, destroy) can be 17 | used with this ID to control it. For example: vagrant destroy a1b2c3.

18 | 19 |

Options

20 | 21 | 25 | 26 |

Environment Not Showing Up

27 | 28 |

If your environment is not showing up, you may have to do a vagrant destroy 29 | followed by a vagrant up.

30 | 31 |

If you just upgraded from a previous version of Vagrant, existing environments 32 | won't show up in global-status until they are destroyed and recreated.

-------------------------------------------------------------------------------- /v2/cli/halt.html: -------------------------------------------------------------------------------- 1 |

Halt

2 | 3 |

Command: vagrant halt

4 | 5 |

This command shuts down the running machine Vagrant is managing.

6 | 7 |

Vagrant will first attempt to gracefully shut down the machine by running 8 | the guest OS shutdown mechanism. If this fails, or if the --force flag is 9 | specified, Vagrant will effectively just shut off power to the machine.

10 | 11 |

Options

12 | 13 | 17 | -------------------------------------------------------------------------------- /v2/cli/index.html: -------------------------------------------------------------------------------- 1 |

Command-Line Interface

2 | 3 |

Almost all interaction with Vagrant is done through the command-line 4 | interface.

5 | 6 |

The interface is available using the vagrant command, and comes installed 7 | with Vagrant automatically. The vagrant command in turn has many subcommands, 8 | such as vagrant up, vagrant destroy, etc.

9 | 10 |

If you run vagrant by itself, help will be displayed showing all available 11 | subcommands. In addition to this, you can run any Vagrant command with the 12 | -h flag to output help about that specific command. For example, try 13 | running vagrant init -h. The help will output a one sentence synopsis of 14 | what the command does as well as a list of all the flags the command 15 | accepts.

16 | 17 |

In depth documentation and use cases of various Vagrant commands is 18 | available by reading the appropriate sub-section available in the left 19 | navigational area of this site.

20 | 21 |

You may also wish to consult the 22 | documentation regarding the 23 | environmental variables that can be used to configure and control 24 | Vagrant in a global way.

25 | -------------------------------------------------------------------------------- /v2/cli/init.html: -------------------------------------------------------------------------------- 1 |

Init

2 | 3 |

Command: vagrant init [box-name] [box-url]

4 | 5 |

This initializes the current directory to be a Vagrant environment 6 | by creating an initial Vagrantfile if 7 | one doesn't already exist.

8 | 9 |

If a first argument is given, it will prepopulate the config.vm.box 10 | setting in the created Vagrantfile.

11 | 12 |

If a second argument is given, it will prepopulate the config.vm.box_url 13 | setting in the created Vagrantfile.

14 | 15 |

Options

16 | 17 |