#https://github.com/mcc1874/vagrant
- [安装VirtualBox] https://www.virtualbox.org
- https://download.virtualbox.org/virtualbox/5.1.26/VirtualBox-5.1.26-117224-Win.exe
- [安装Vagrant] https://www.vagrantup.com
- win7 https://releases.hashicorp.com/vagrant/1.9.1/vagrant_1.9.1.msi
- win10 https://releases.hashicorp.com/vagrant/2.2.9/vagrant_2.2.9_x86_64.msi
- [CPU开启虚拟化技术]
- 请进入BIOSS设置
- vagrant/ubuntu/ubuntu-0.1.0.box https://pan.baidu.com/s/1PK2RTgWWvAtkmxDqklRjwA https://app.vagrantup.com/mcc1874/boxes/ubuntu1804php-0.1.0
-
bootstrap.sh.example => bootstrap.sh
-
Vagrantfile.example => Vagrantfile
-
1.安装
-
2.启动(如失败请重新启动)
-
3.链接虚拟机(IP配置:Vagrantfile)
-
ssh ip:22 vagrant/vagrant
类似 vagrant plugin install 查件名 --plugin-clean-sources --plugin-source https://gems.ruby-china.com
···
方法2 ngrok http --region ap --host-header=rewrite 本机虚拟域名:80
hosts 10.10.10.11 本机虚拟域名 ···
如果使用官方box, 请把Vagrantfile的 config.ssh.password/config.ssh.insert_key 删除, 此时会默认private_key登录并生成private_key.
使用xshell登录客户端时, private_key存储在 .vagrant\machines\主机名\virtualbox\private_key