搭建php虚拟环境

参考网址:

http://my.oschina.net/u/998304/blog/501363?p={{totalPage}}

Box镜像列表:

http://www.vagrantbox.es/

vagrantfile文件配置内容(只允许本机连接)

Vagrant.configure("2") do |config|

  config.ssh.username = 'vagrant'
  config.ssh.password = 'vagrant'

  config.vm.box = "centos6.5"
  config.vm.network "forwarded_port", guest: 80, host: 8080
  config.vm.network "private_network", ip: "192.168.33.10"
  config.vm.synced_folder "../vagrant", "/Users/xuxu/www"
end

碰到问题:

启动虚拟机的时候有一个提醒

default: Warning: Authentication failure. Retrying...

最终还是修改 Vagrantfild 添加下面两行代码解决的

  config.ssh.username = 'vagrant'
  config.ssh.password = 'vagrant'

解决方案参考网址:

https://github.com/mitchellh/vagrant/issues/5186

原文地址:https://www.cnblogs.com/qq917937712/p/5776386.html