Vagrant Configuring the Linux environment basic operation steps
1. Download the box file
http://www.vagrantbox.es/
Demo version is: Centos-6.4-x86_64-v20131103.box
2. Installing vagrant 1.8 and VirtualBox 5.0
3. Add box, switch to box directory, it is recommended not to have Chinese path, to prevent unknown errors
Vagrant Box Add--name (Vagrant-box own name) (Path and box name)
Example:vagrant box Add--name linux_learn./centos-7.0-x86_64.box
When there is no vagrantfile in a 4.vagrant virtual system, it needs to be initialized with Vagrant init + box name (own name)
Example:vagrant Init Linux_learn
5. Modify the Vagrantfile file to enable the function to access the virtual machine
Config.vm.network "Private_network", IP: "192.168.56.10"
Specific IP address needs to be completed according to the actual network segment
Click one of the View property IPs in the unrecognized network
If you do not set the private IP address corresponding Ethernet network segment ip,vagrant up will be an error
So the Config.vm.network "private_network", IP: "192.168.56.10" in the IP into the Ethernet segment, the first three breakpoint fields must be the same
For example: config.vm.network "Private_network", IP: "192.168.56. The last 10 can be arbitrarily modified;
Note: Why set up a private network IP here, because this confidential access to the virtual machine, pay attention to the private network settings, only native access, more secure, but the team
Members cannot access your virtual machine, it is recommended that you take a look at this article about the configuration of the vagrant three networks, and the features
Http://www.tuicool.com/articles/v6ZnUzm
6. Start the virtual machine
Vagrant up
Note: The following commands are to be performed in the Vagrant directory
1. Delete vagrant-box command: Vagrant box remove
2.vagrant Halt shut down the virtual machine
3.vagrant Destroy destroying virtual machines
The 4.vagrant box list lists all the loaded box
Vagrant Building a virtual machine