我一直在努力尝试使用Vagrant连接到一个centos 6.4 vm。 我使用salt作为配置代理,并且已成功安装了apache,php,mysql包。 当我ssh进入框中apache运行良好。我加在/ var/WWW的index.html文件和我得到的内容回来时,我蜷本地主机:80在Mac OS X Lion上运行流浪端口
Vagrant.configure("2") do |config|
## Chose your base box
config.vm.box = "centos63"
config.vm.box_url = ""
## For masterless, mount your salt file root
config.vm.synced_folder "salt/roots/", "/srv/"
## Use all the defaults:
config.vm.provision :salt do |salt|
salt.verbose = true
salt.run_highstate = true
salt.minion_config = "salt/minion"
end
end
Vagrant::Config.run do |config|
config.vm.forward_port 80, 8080
config.vm.share_folder "mypath", "/var/www/leo", "."
end
我跑须藤lsof的-i:我的本地机器上8080,没有给我结果。我还使用iptables -F清除了访客机器中的iptable配置。当我蜷缩客机
curl -v 'localhost:8080'
* About to connect() to localhost port 8080 (#0)
* Trying ::1...
* Connection refused
* Trying 127.0.0.1...
* Connection refused
* Trying fe80::1...
* Connection refused
* couldn't connect to host
* Closing connection #0
curl: (7) couldn't connect to host
我是否需要安装客人补充?我环顾四周如何安装,但我不确定它是否必须安装在主机或来宾。不知道还有什么要尝试。