1.homestead.rb文件中
* 此处修改:
`config.vm.network :public_network, ip: "192.168.0.108", bridge: "Realtek PCIe GBE Family Controller",type: "static"`
(1)public_network
(2)ip自定义
(3)Realtek PCIe GBE Family Controller 是 eth1网卡的名称,从virtualbox软件中可找到
* config.vm.provider处新增:
`vb.customize ["modifyvm", :id, "--cableconnected1", "on"]`
2.Homestead.yaml文件中:
* folders选项处增加:
```
#文件夹共享方式
type: smb
mount_options: ["username=宿主机登录账号","password=宿主机登录密码"]
```
smb有个特性:smb共享会剔除不活动的连接。可以执行以下命令让系统不要自动踢掉不活动的连接:
net config server /autodisconnect:-1