前提,用的电脑系统是 Windows 10。
只是想装个 ftp,看到一篇 vultr 上的 vsftpd 教程,是使用 centos 装的, 所以新下一个 centos/7 的 vagrant box。(之前 vagrant 都是用 ubuntu 虚拟机的)
下好 centos/7 box, vagrant up,先是 synced_folder 不能用,要安装什么 vagrant 插件 ("vagrant-vbguest"),
好了, 安装完了,synced_folder 搞定了,端口转发( forwared_port ) 又不行了。
ftp 的 passive mode 需要 映射 8000-9000 一个区间的端口。
好不容易找到一个 vagrant 映射一个区间端口的方法:
for i in 8000..9000
config.vm.network :forwarded_port, guest: i, host: 30000+i
end
TMD 最后又报错,
There was an error running VBoxManage. This is usually a permissions
problem or installation problem with VirtualBox itself, and not Vagrant.
Please note the error message below (if any), resolve the issue, and
try Vagrant again.
而且这个乱码又是什么鬼
而且每次试 vagrantfile 又慢死了,就这样搞一天,一个 vsftpd 都没搞定,我都要气死了,,,
太心累了 上来吐下槽