我一直在努力嘗試使用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
我是否需要安裝客人補充?我環顧四周如何安裝,但我不確定它是否必須安裝在主機或來賓。不知道還有什麼要嘗試。