At the beginning I just want to spit groove for the club I didn't know vagrant earlier, so I could save the money for the MacBook Pro ...
"Create and configure lightweight,reproducible and portable development environments." This is the introduction of the homepage of Vagrant website "Create configuration lightweight, repeatable, portable development environment." ”
It is very convenient to use this thing, can avoid the development environment inconsistency problem. Especially for team development, just configure a development environment and distribute it. The actual development platform can be different, but the code is running in a consistent environment.
Start the preparation process below:
The VirtualBox https://www.virtualbox.org/is installed first
Then installed the Vagrant https://www.vagrantup.com/
The installation process does not repeat
650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M00/57/8D/wKiom1SdMWLBf43YAABRhDPT_v8538.jpg "title=" mg7@_ Oy6t@09cb0%o0k_w[g.png "alt=" Wkiom1sdmwlbf43yaabrhdpt_v8538.jpg "/>
650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M01/57/8D/wKiom1SdMbzBxdLFAABHIfs3EY4435.jpg "title=" h6ev%k _gffazl{_ (5rxixgv.jpg "alt=" Wkiom1sdmbzbxdlfaabhifs3ey4435.jpg "/>
Vagrant is a virtual environment built from a virtual image with a suffix of box
Popular box Download points
http://www.vagrantbox.es/
https://vagrantcloud.com/
Because of the network problems of the pit Dad, I downloaded the installation of the online has not been successful, I directly downloaded the image to the local to complete the creation.
Here is the image I used Ubuntu precise VirtualBox http://files.vagrantup.com/precise32.box
Then add the image through the Vagrant box Add box name (optional) Mirror path
Enter the relevant directory with CMD under Windows I'm shell_test here.
Then execute the Vagrant init box name to complete the initialization
Last execution vagrant up boot environment
Unix-like environments can be accessed via the Vagrant SSH connection
Win under need to access through tools such as putty
The development directory on the host (where the test instance directory is Shell_test) corresponds to the/vagrant directory in the virtual machine
Initialization complete
Start the environment execution vagrant Halt shutdown environment by executing vagrant up in the appropriate directory when used
Other points of attention
After successful initialization, a configuration file named Vagrantfile is generated in the appropriate directory, which can be set for network, memory size, and other content.
This article is from the "7692323" blog, please be sure to keep this source http://7702323.blog.51cto.com/7692323/1596334
Build a ruby development platform based on vagrant (the first of the Ruby and Rails learning notes)