On Vagrant, Wikipedia gives a definition: "Vagrant is an open-source software PRODUCT for building and maintaining portable virtual dev elopment environments. "See, it's an open-source software that builds a virtual development environment. Let's take a look at how vagrant is built.
1. Download the vagrant on vagrant website https://www.vagrantup.com/, as shown in the installation.
If you cannot use vagrant after installation as above, check that the environment variable is configured successfully. My side of the situation is the installation after the input vagrant, prompted not to find the command, and then the computer restarted again.
2. Install the vagrant, now go to Vagrantbox.es's website http://www.vagrantbox.es/start to download the corresponding virtual machine box, as shown, try to download Ubuntu 15.04 version
You can download the copied address by typing it into the address bar. Path is F:\virtualbox_ubuntu\ubuntu-15.04-amd64.box
3. After downloading the box, we will start to draw up the directory of the virtual machine, I am here to draw up F:\test001 as the virtual machine directory, in CMD enter the following command
Vagrant Box Add test001 F:\virtualbox_ubuntu\ubuntu-15.04-amd64.box
You can then use the Vagrant init test001 command to generate a vagrant configuration file, as shown in
Open the Vagrantfile file, just modify # config.vm.network "Private_network", IP: "192.168.33.10" to remove the previous "#" comment, this IP : 192.168.33.10, add the user name and password configuration, as shown in
Then use vagrant up, start the virtual machine, the process of starting the virtual machine, will appear to install VirtualBox this virtual machine software, the system will be installed automatically, the general time will be a bit long. Here's what happens after startup.
Show that the virtual machine has been installed successfully, login vagrant account is also successful, you can enter the Linux command.
Create a virtual machine using vagrant