One, install centos7 based on vagrant
Link: Click
Two, install centos in batches
Find the following files in the environment based on the first step,
then create a new folder, put it in the installation location you specify, and changeThe port number
Note: The newly created file must have an English name and cannot contain Chinese characters
Open the cmd command in the current address bar window
vagrant up #拉取镜像
You can see that the .vagrant file is generated in your current directory.
Open VirtulBox and you can see that the virtual machine runs successfully
Three, test the connection
vagrant ssh
At this time, you will encounter the following error
SSH login error: [email protected]: Permission denied (publickey,gssapi-keyex,gssapi-with-mic).
Solution:
Open the previous .Vagrantfile file to findprivate_key
Properties-"Security-"Advanced Settings
It can be seen that the user does not have full control. At this time, you need to add
next—>input the user to be added (input think)—>Check name—>determine
OK
Application—>Continue to test
testing successfully! ! !