发布时间:2019-08-31 09:44:53编辑:auto阅读(1659)
1. 简介
vagrant提供了3种网络连接方式,分别是forwarded ports,host-only networking和bridged networking
2. forwarded ports
config.vm.network "forwarded_port", guest: 80, host: 80 //将vagrant虚拟机的80端口映射到主机的80端口
3. host-only networking
config.vm.network "private_network", ip: "192.168.56.10" //private_network定义host-only networking,"192.168.56.10"为分配的静态IP
4. bridged networking
config.vm.network "public_network"
上一篇: Python fabric
下一篇: Python资源列表-Awesome P
47872
46435
37324
34767
29338
26002
24953
19971
19571
18059
5812°
6438°
5954°
5980°
7086°
5931°
5972°
6463°
6428°
7805°