1. Download vagrant:
open Baidu input/:vagrant
2. Select windows, click download
Download and install directly, the next step is foolish! After the installation is complete, restart your system.
3. Windows + R, enter cmd, press Enter, enter vagrant on the dos window, press Enter,
When the vagrant command prompt appears, it means that our installation is successful!
4. Enter the website and check the name of linux that needs to be installed: https://app.vagrantup.com/boxes/search , as shown in the figure below, find centos/7 (the name is too much" /")
5. Then enter vagrant init centos/7 and
press Enter in our dos command, 6. You can see that he created a vagrantfile folder under our c:\User\lfy file
and then enter: vagrant up, Start the virtual environment. It takes a long time, because he needs to download the image from the official, and then start the virtual container according to the image. When the download is complete, the following prompt appears, indicating that the installation is successful!
7. Here, vagrant has created it for us ssh is connected and has helped us start the virtual machine (virtualbox or VMware), so at this time, we Ctrl+C, stop the process, enter vagrant ssh,
you can connect to the virtual machine, if you use administrator permissions, switch users Yes!
When we need to use the virtual machine in the future, let the virtual machine start without interface directly, and enter vagrant ssh in the dos window!