26

我有一个 Vagrant VM 标准问题 lucid32.box 正在运行。在此设置 LAMP 的完整说明是什么?

我看过刀(厨师的一部分)并尝试:

vagrant@lucid32:~$ knife cookbook site install apache2

但得到了

WARNING: No knife configuration file found

如何设置刀配置文件,我应该在其中包含什么?

我一直在网上搜索很多答案,但部分解决方案无法解释其起点/先决条件,这让我不知所措。

更新

我的目标是自己回答这个问题,因为其他人似乎都不想回答。这是我目前的理解 - 我的目标是稍后用红色解决我的未知数/问题。

Vagrant Windows 主机,Linux VM v001 - 尝试设置后的初始问题

4

2 回答 2

43

好的,我决定作为原始问题海报为自己完全回答这个问题。(感谢之前做出贡献的所有人。)

使用 Vagrant 和 Oracle VirtualBox 在 Windows 64 位主机上端到端设置 LAMP VM

我最初问这个问题是因为虽然网上有很多说明和指南,但他们似乎没有做的是:

  • 明确定义起点和先决条件
  • 为像我这样的企业环境中的人提供说明,这些企业环境有一台功能强大的 Windows 机器来托管 VM。相反,他们假设一台基于 Linux 的主机。
  • 清楚设置文件的位置: 在主机上?在来宾操作系统上?(这尤其难以确定主机和来宾操作系统是基于 Linux 还是基于 Unix - 显示的命令行片段显然没有提供线索,因为它们看起来都一样。)
  • 说明使用了哪个版本的 Vagrant。有两 (2) 个主要版本: API 版本 1,它是(但不包括)v1.1.0 之前的所有版本。另一个是 API 版本 2 - 从 v1.1.0 开始发布。所以版本控制约定类似于Java。这个 API 版本很重要,例如,v1 API 脚本根本无法在 Vagrant 软件的 API v2 上运行,除非在脚本的开头放置一个子句来说明要使用哪个版本。

    我个人认为 Vagrant 版本控制约定可能更简单。注意:本指南适用于 Vagrant 1。有人告诉我,版本 1 拥有广泛的安装基础,而 Vagrant 2 仍处于 2013 年中期的草案阶段。因此,我喜欢称版本 1 - V1 LTS - 长期支持 - 就像 Ubuntu 一样,以表明这将持续存在很久了。

这是一张图片,用于阐明哪个 API 在哪个版本的 Vagrant 软件上:

Vagrant API 版本 v1、v2 说明及下载

对于我在这里使用 Vagrant 的示例设置,我建议使用 pre-V1.1.0(即来自 vagrantup.com 下载的 Vagrant API 1)但是您应该能够使用 Vagrant 软件的 Vagrant 2 API 版本,如上所述但是您需要在脚本的开头添加一个“指令”,以告诉 Vagrant 它们适用于 Vagrant 1,否则脚本将失败并显示错误消息。TODO:我将尝试获取该指令并将其放在这里以提供帮助。

(Mitchell Hashimoto,Vagrant 的创造者 - 请注意以上内容,以了解您的 O'Reilly 书籍的任何未来版本:Vagrant:Up and Running:http ://shop.oreilly.com/product/0636920026358.do )

答案中的这些说明应该做什么:

在您的 Windows 7 64 位机器(或 Mac 或 Linux 机器,但主要在 Windows 上进行了测试,但在 Mac 上应该可以正常工作,而且这个解决方案是独立于平台的)。我已经测试了 PHP OK(通过标准的 phpinfo.php 文件并看到 MySQL 正在运行,但还没有测试过)。

设置在 Vagrant VM 上运行的 LAMP 堆栈的其他方法

注意:对于那些想要一个带有 Drupal 开源内容管理框架的 LAMP 堆栈的人(像我一样)来说,一个非常开箱即用的替代解决方案在这里:http ://drupal.org/project/vagrant 你应该能够按照下面我的先决条件,然后从上面的 URL 下载 .zip 并按照那里的说明运行vagrant up从命令行启动 VM 并等待它构建和启动(其中一些是第一次一次性的,因为一旦您设置了映像,后续启动应该会更快)。您可以“免费”获得许多其他开发人员的东西(即为您节省安装它们的精力)——比如 git、drush(我认为)和性能分析工具。然后到 [服务器地址]/install.php 安装 Drupal。这似乎运行良好,没有问题——我已经尝试过了,但没有进行广泛的测试。如果收到错误消息,您可能需要禁用 xhprof 的安装 - 有关详细信息,请参阅http://drupal.org/node/1940668

另一种选择是使用此配置工具:https ://puphpet.com/ - 这是一种用于配置 Vagrant 设置的可视化点击方法。这适用于 Vagrant 2(我认为,更新是的,至少在 Vagrant 1.2.2 上是这样)。更新:事实上,我已经成功地完成了这项工作,并基于在本地运行 Drupal 的设置 - 请参阅我的指南:https ://drupal.org/node/2055947

更新

以下是我发现在 Mac 和 Windows 上运行良好的其他一些开箱即用的 Vagrant 设置:

如果您希望 VM 中本地的 Solr 搜索引擎作为 LAMP 堆栈的一部分,您可能需要查看:

尽管这些替代方案很棒,但我的说明仍然很有价值,可以帮助您了解此类设置的工作原理,或者如果您想要更简单、更基本的 LAMP 堆栈。

您需要了解如何做的小额外内容(将尝试在此处包含它们)

设置后登录机器 - 这是通过标准的基于 SSH 的登录完成的。您将需要免费工具 putty.exe 和 puttygen.exe。目前我还没有在这里提供如何使用 SSH 登录,但将来会尝试这样做。您将在此答案的末尾找到参考资料。

请注意,登录将使用 user vagrant

(按照下面的设置说明进行操作后)要使用 root 用户,您需要“解锁”该帐户才能重置密码:

解锁root账户:

vagrant@lucid32:~$ sudo passwd -u root
passwd: password expiry information changed.

然后修改root密码:

vagrant@lucid32:~$ sudo passwd root
Enter new UNIX password:
Retype new UNIX password:
passwd: password updated successfully

(密码不会在您键入时显示。)

通过使用它登录到 root 来测试新密码:

vagrant@lucid32:~$ su root
Password:
root@lucid32:/home/vagrant#

信用:https ://scottlinux.com/2011/07/22/reset-or-change-user-password-in-linux/ (文章:“在 Linux 中重置或更改用户密码” - 这帮助我解决了如何做。)

有什么错误吗?

试一试 - 如果您有问题,请在答案中添加评论,我会尝试解决。另请参阅最后的故障排除。

未来的任务

目前使用木偶。使用 Chef 而不是 Puppet,只是为了拓宽工作方式。这两个都是竞争者,但有不同的方法,所以我相信:对于 Puppet,我被告知你说你想要什么,Puppet 可能会做出一些武断的决定来让你到达那里。而对于 Chef,我相信您可以定义精确的步骤顺序。再次 - 在这里评论并在必要时纠正我,

这些说明的先决条件:

  • Windows 7 64 位
  • 安装的 VirtualBox
  • 安装流浪汉
  • 不需要单独安装 Ruby 和 Puppet,因为它们似乎随 Vagrant 一起提供。老实说,我确实安装了这些来解决一些问题,但发现这些问题是其他问题。所以我卸载了 Ruby 和 Puppet 并重新运行(vagrant up等),它仍然可以工作,所以我假设这些额外的、单独的 Ruby 和 Puppet 安装不是必需的。

  • 建议使用的 Vagrant 和 VirtualBox 版本组合:VirtualBox 版本 4.2.12 和之前的 Vagrant 1.2(如前所述)。某些其他组合可以工作,但我没有测试过这些,所以我坚持使用这种组合,除非我能看到使用更高版本的明显好处。一个最明显的好处是配置速度。我在这里陈述的组合适用于 puphpet.com 路由来设置一个虚拟机,至少这是相当复杂的,因此我假设应该在我这里记录的简单设置上工作。

(信用:这些说明基于: http: //ox86.tumblr.com/post/23734821654/painless-development-environments-with-virtualbox ...但不是精确的副本,因为它们对我不起作用。)

说明

(确保您具备上述先决条件。)

主机设置工作在您的 Windows 用户文件夹中的主机上完成,例如对我来说这是C:\Users\rdavis

mkdir lamp-project
cd lamp-project
mkdir configs
cd ..
cd lamp-project
mkdir manifests

(来自:http ://docs.vagrantup.com/v1/docs/getting-started/index.html )

下载发行版安装映像,在本例中为 Ubuntu Lucid (10.04)。此映像实际上等效于您传统上用于在计算机上安装操作系统的安装磁盘(CD 或 DVD)。

C:\Users\rdavis\lamp-project>vagrant box add lucid32 http://files.vagrantup.com/lucid32.box

(顺便说一句,vagrantup.com 上还有其他几个流行的发行版,但如果你想从发行版 .ISO 生成 .box 文件,那么有一个名为 VeeWee 的工具可以做到这一点:https ://github.com/ jedi4ever/veewee )

初始化它:

C:\Users\rdavis\lamp-project>vagrant init lucid32

(注意,我只是vagrant init在编写这些指令时使用,因为我已经初始化了 lucid32,但是第一次,你必须执行上述命令。)

C:\Users\rdavis\lamp-project>vagrant init
A `Vagrantfile` has been placed in this directory. You are now
ready to `vagrant up` your first virtual environment! Please read
the comments in the Vagrantfile as well as documentation on
`vagrantup.com` for more information on using Vagrant.

C:\Users\rdavis\lamp-project>

编辑C:\Users\rdavis\lamp-project\Vagrantfile - 在之后直接插入以下内容Vagrant::Config.run do |config|

config.vm.box = "lucid32"
config.vm.provision :puppet do |puppet|
    puppet.manifests_path = File.expand_path("../manifests", __FILE__)
end
config.vm.forward_port 80, 8080
config.vm.share_folder "configs", "/configs", File.expand_path("../configs", __FILE__)

所以你的 Vagrantfile 应该是这样的:

# -*- mode: ruby -*-
# vi: set ft=ruby :

Vagrant::Config.run do |config|

config.vm.box = "lucid32"
config.vm.provision :puppet do |puppet|
    puppet.manifests_path = File.expand_path("../manifests", __FILE__)
end
config.vm.forward_port 80, 8080
config.vm.share_folder "configs", "/configs", File.expand_path("../configs", __FILE__)

 # All Vagrant configuration is done here. The most common configuration
 # options are documented and commented below. For a complete reference,
 # please see the online documentation at vagrantup.com.

 # Every Vagrant virtual environment requires a box to build off of.
 # config.vm.box = "lucid32" 
 # (this is already done above, but if you have a box called 'base' which is an Ubuntu lucid32 then you can use: config.vm.box = "base". This info may be helpful if you get error: "The box 'base' could not be found.")

 # The url from where the 'config.vm.box' box will be fetched if it
 # doesn't already exist on the user's system.
 # config.vm.box_url = "http://example.com/path/to/above.box"

 # Boot with a GUI so you can see the screen. (Default is headless)
 # config.vm.boot_mode = :gui

 # Assign this VM to a host-only network IP, allowing you to access it
 # via the IP. Host-only networks can talk to the host machine as well as
 # any other machines on the same network, but cannot be accessed (through this
 # network interface) by any external networks.
 # config.vm.network :hostonly, "192.168.33.10"

 # Assign this VM to a bridged network, allowing you to connect directly to a
 # network using the host's network device. This makes the VM appear as another
 # physical device on your network.
 # config.vm.network :bridged

 # Forward a port from the guest to the host, which allows for outside
 # computers to access the VM, whereas host only networking does not.
 # config.vm.forward_port 80, 8080

 # Share an additional folder to the guest VM. The first argument is
 # an identifier, the second is the path on the guest to mount the
 # folder, and the third is the path on the host to the actual folder.
 # config.vm.share_folder "v-data", "/vagrant_data", "../data"

 # Enable provisioning with Puppet stand alone.  Puppet manifests
 # are contained in a directory path relative to this Vagrantfile.
 # You will need to create the manifests directory and a manifest in
 # the file base.pp in the manifests_path directory.
 #
 # An example Puppet manifest to provision the message of the day:
 #
 # # group { "puppet":
 # #   ensure => "present",
 # # }
 # #
 # # File { owner => 0, group => 0, mode => 0644 }
 # #
 # # file { '/etc/motd':
 # #   content => "Welcome to your Vagrant-built virtual machine!
 # #               Managed by Puppet.\n"
 # # }
 #
 # config.vm.provision :puppet do |puppet|
 #   puppet.manifests_path = "manifests"
 #   puppet.manifest_file  = "base.pp"
 # end

 # Enable provisioning with chef solo, specifying a cookbooks path, roles
 # path, and data_bags path (all relative to this Vagrantfile), and adding
 # some recipes and/or roles.
 #
 # config.vm.provision :chef_solo do |chef|
 #   chef.cookbooks_path = "../my-recipes/cookbooks"
 #   chef.roles_path = "../my-recipes/roles"
 #   chef.data_bags_path = "../my-recipes/data_bags"
 #   chef.add_recipe "mysql"
 #   chef.add_role "web"
 #
 #   # You may also specify custom JSON attributes:
 #   chef.json = { :mysql_password => "foo" }
 # end

 # Enable provisioning with chef server, specifying the chef server URL,
 # and the path to the validation key (relative to this Vagrantfile).
 #
 # The Opscode Platform uses HTTPS. Substitute your organization for
 # ORGNAME in the URL and validation key.
 #
 # If you have your own Chef Server, use the appropriate URL, which may be
 # HTTP instead of HTTPS depending on your configuration. Also change the
 # validation key to validation.pem.
 #
 # config.vm.provision :chef_client do |chef|
 #   chef.chef_server_url = "https://api.opscode.com/organizations/ORGNAME"
 #   chef.validation_key_path = "ORGNAME-validator.pem"
 # end
 #
 # If you're using the Opscode platform, your validator client is
 # ORGNAME-validator, replacing ORGNAME with your organization name.
 #
 # IF you have your own Chef Server, the default validation client name is
 # chef-validator, unless you changed the configuration.
 #
 #   chef.validation_client_name = "ORGNAME-validator"
end

然后,在 C:\Users\rdavis\lamp-project\manifests 创建文件 default.pp 并将其放入:

$config_path = "/configs"
$vagrant_base_path = "/vagrant"
Exec { path => "/bin:/usr/bin:/usr/local/bin" }
group { "puppet": ensure => present }
exec { "apt-get update": command => "apt-get update" }
class apache {

    exec { "enable-mod_rewrite":
        require => Package["apache2"],
        before => Service["apache2"],
        command => "/usr/sbin/a2enmod rewrite"
    }
    package { "apache2":
        ensure => present
    }

    service { "apache2":
        ensure => running,
        require => Package["apache2"]
    }
}
class php {
    package { "libapache2-mod-php5": ensure => present }
    package { "php5": ensure => present }
    package { "php5-cli": ensure => present }
    package { "php5-dev": ensure => present }
    package { "php5-mysql": ensure => present }
    package { "php-pear": ensure => present }
    exec { "pear upgrade":
        command => "/usr/bin/pear upgrade",
require => Package["php-pear"],
    }
}
class mysql {
  package { "mysql-server":
    require => Exec["apt-get update"],
    ensure => present,
  }
  service { "mysql":
    enable => true,
    ensure => running,
    require => Package["mysql-server"],
  }
  exec { "Set MySQL server root password":
        require => Package["mysql-server"],
        unless => "/usr/bin/mysqladmin -uroot -proot status",
        command => "/usr/bin/mysqladmin -uroot password root",
  }
}
include apache
include php
include mysql

有用的说明(可选),我的上述版本Vagrantfiledefault.pp(以及其他 Vagrant 辅助文件和文件夹结构)可从我的 GitHub 存储库 VagrantVMSetups 获得,位于:https ://github.com/therobyouknow/VagrantVMSetups - 查看justlamp文件夹 - 这个与lamp-project此答案中使用的内容相同。)

然后运行 ​​Vagrant:

C:\Users\rdavis\lamp-project>vagrant up

请注意,这可能需要一段时间(5-15 分钟) - 但请耐心等待。它现在应该成功运行 LAMP VM。这样您就完成了当前工作任务中的 VM。如果您随后保留 VM 以供以后使用,但使用vagrant halt(而不是vagrant destroy删除 VM 映像)将其关闭,那么我预计此延迟将是一次性的初始设置时间。vagrant up我认为VM 的后续启动(使用)应该会更快。

故障排除:

故障排除问题 1:使用错误/非法引号 - 运行后在主机上看到错误消息vagrant up

背景:这发生在我身上,因为我粘贴了指令来自网页的代码片段。代码片段有开闭引号 - Vagrant 使用的解释器/解析器(或者实际上我认为的大多数脚本解释器和编译器)不会将其解释为正确的引号。

症状: 输出如下:

There is a syntax error in the following Vagrantfile. The syntax error
message is reproduced below for convenience:

C:/Users/rdavis/lamp-project/Vagrantfile:6: invalid multibyte char (US-ASCII)
C:/Users/rdavis/lamp-project/Vagrantfile:6: syntax error, unexpected $end

或这个:

Could not parse for environment production: Could not match ?/configs? at /tmp/vagrant-puppet/manifests/default.pp:1 on node lucid32.hsd1.ca.comcast.net.

The following SSH command responded with a non-zero exit status.
Vagrant assumes that this means the command failed!

或这个:

There was an error executing the following command with VBoxManage:

["list", "hostonlyifs"]

补救措施:使用正确的双引号“。不要使用开闭引号。

故障排除问题2:运行后主机上出现以下错误消息vagrant up

←[1;35merr: /Stage[main]/Apache/File[/etc/apache2/sites-enabled/000-default]: Could not evaluate: Could not retrieve information from environment production source(s) file:/configs/000-default at /tmp
/vagrant-puppet/manifests/default.pp:11←[0m

补救措施:你不应该看到这个 - 使用的原始脚本包含对包含000-default. 我刚刚删除了所有引用它的行和结构。

故障排除问题3: PHP文件被视为下载(文件下载发生在浏览器中),而不是被执行和显示。

PHP 需要在来宾 VM 机器上启用。

补救措施:您可能需要也可能不需要这样做。

此技巧有效:(启用 PHP 并停止将文件视为下载): https ://serverfault.com/questions/243435/getting-php-to-work-with-apache-to-run-php-files -通过浏览器

vagrant@lucid32:/etc/php5/cli$ a2enmod php5
Module php5 already enabled
vagrant@lucid32:/etc/php5/cli$ sudo apache2ctl restart

另一个提示:

PHP 需要启用,建议在: http: //galleryproject.org/node/55011

是:编辑php.ini 这些是共享扩展名(.so 文件)。您需要在 php.ini 中启用它们,然后重新启动 PHP。

我自己,毕竟我不需要编辑 php.ini。顺便说一句,这是在:/etc/php5/cli/php.ini对于这个 lucid32 VM。

故障排除问题 4:解决有关版本不匹配的 VirtualBox 添加警告消息

[default] The guest additions on this VM do not match the install version of
VirtualBox! This may cause things such as forwarded ports, shared
folders, and more to not work properly. If any of those things fail on
this machine, please update the guest additions and repackage the
box.

Guest Additions Version: 4.2.0
VirtualBox Version: 4.2.4

看起来不是问题(它不会阻止 VM 成功运行),但是如果您想解决它:

http://automation.binarysage.net/?p=1198 https://unix.stackexchange.com/questions/58216/automate-installation-of-virtualbox-guest-additio ns-via-command-line

https://serverfault.com/questions/243435/getting-php-to-work-with-apache-to-run-php-files-through-browser

(对于类似 Linux 的用户: http: //www.pauloamgomes.net/blog/installing-vagrant

排查问题5: The box 'base' could not be found."运行后出现错误信息vagrant up

补救?检查包含语句config.vm.box =等的行Vagrantfile(请参见Vagrantfile上面的示例),以确保它指的是系统上实际存在的 Vagrant 框(操作系统安装映像) - 发出命令vagrant box list以查看您拥有哪些框。

如果您已按照我的说明进行操作,那么您应该拥有该lucid32框。确保config.vm.box =您的Vagrantfile. config.vm.box = "base"忏悔:其实我Vagrantfile上面几行的时候,有一个多余的,config.vm.box = "lucid32"已经写好了。我现在已经纠正了这一点。

常问问题

  • 问:什么是流浪盒?A:可以认为相当于一个操作系统安装盘,因为它是基础,是虚拟机的起点——它是操作系统。这是一个二进制文件。

  • 问:什么是 Vagrant 包?答:VM 的快照加上 Vagrant 从 VagrantFile 执行的配置提供了一种独立的方式来将设置分发给其他人。

参考:

一般流浪者资源:

Vagrant 命令究竟做了什么? - 很好的描述

http://community.opscode.com/questions/81 http://deanstrezovski.com/setting-up-a-cagrant-lamp-stack/ http://www.jasongrimes.org/2012/06/managing-lamp -environments-with-chef-vagrant-and-ec2-1-of-3/ 如何将 Vagrant 项目目录与现有的 VirtualBox VM 关联? http://docs.vagrantup.com/v1/docs/getting-started/index.html

更多关于流浪盒子:

http://docs.vagrantup.com/v1/docs/boxes.html Vagrant 在哪里保存对 VM 的更改?

基于 SSH 密钥的登录(从外部登录到 VM 框 - 即从主机或另一台机器):

http://www.howtoforge.com/ssh_key_based_logins_putty_p2 http://docs.vagrantup.com/v1/docs/getting-started/ssh.html

http://en.wikipedia.org/wiki/Ssh-agent

对于基于 Windows SSH 的 VM 登录:

PuTTY:免费的 telnet/ssh 客户端 www.chiark.greenend.org.uk/~sgtatham/putty/

腻子:

www.chiark.greenend.org.uk/~sgtatham/putty/download.html

此答案的版本历史/更新

  1. 路标和标题清理
  2. 添加了运行vagrant up,可能需要一段时间
  3. 添加了如何在VM中设置root密码
  4. 添加缺少的步骤来下载和初始化 lucid32 框(相当于安装盘)
  5. 添加了指向我的https://github.com/therobyouknow/VagrantVMSetups GitHub 存储库的链接,其中包含此答案的 Vagrant 配置设置 - 为方便起见。
  6. 当实际上上面几行时,已经完成了更改Vagrantfile以删除无关紧要的内容。如果您遇到错误,这将有所帮助还添加了一个新的故障排除项目,说明相同。config.vm.box = "base"config.vm.box = "lucid32"The box 'base' could not be found."
  7. 为那些想要基于 Drupal 的 LAMP VM 的人添加了替代的开箱即用解决方案:http ://drupal.org/project/vagrant请参阅上面的更多注释。
  8. 2013-07-10:对编写本指南的原因进行了轻微的语法调整。更新了 O'Reilly 的 Vagrant 书现已出版。添加到https://puphpet.com/的链接- 在线 Vagrant 配置器脚本生成器(非常好!)。添加了 VeeWee 工具的链接,该工具用于从任何 .ISO Linux 发行版(标准安装光盘)生成 Vagrant .box 文件
  9. 2013 年 10 月 14 日更新了“他们似乎没有做什么”项目符号,其中包含关于 Vagrant 版本的要点 - 本指南使用 Vagrant 1(以及为什么)。声明 Vagrant 2 与 puphpet.com 一起使用还链接到我使用 puphpet.com 为 Drupal 设置 Vagrant VM 的文档。
  10. 2013-10-21 更新为使用 VirtualBox 版本和 Vagrant 的状态组合:VirtualBox 版本 4.2.12 和 Vagrant 1.2.2。某些其他组合可以工作,但我没有测试过这些组合,所以除非我能看到使用更高版本的明显好处,否则我会坚持使用这种组合。一个最明显的好处是配置速度。将标题放在 Vagrant VM 部分的其他方法上。更新说这个和其他解决方案是独立于平台的,应该可以在 PC、Mac 或 Linux 上运行。
  11. 2013 年 10 月 23 日更新了本指南使用的 Vagrant 版本(即 v1.2 之前的版本(即 Vagrant 2 之前的版本))和另一种方法 puphpet.com(v1.2.2 - 相比之下是 Vagrant 2 版本。 )
  12. 2013-12-03 更正了 Vagrant API 版本控制以及哪个 API 版本在哪个 Vagrant 软件版本中的注释。添加了一些更替代、更全面的 Vagrant 设置。
于 2013-02-25T13:17:59.240 回答
3

在您的虚拟机中,您需要运行:

$knife configure

接受所有默认值。

运行此程序后,您的 ~/.chef/knife.rb 中将有一个配置文件。

至于您的图表: vagrant 文件夹包含该项目的 Vagrantfile 。实际的 .ovf 和 .vmdk 文件以及另一个 Vagranfile 存在于 /%USERPROFILE%/.vagrant.d/

Vagranfile 是 Vagrant 的配置文件,存在于多个位置,具有一定的优先顺序。项目文件夹中的 Vagrantfile 优先:Vagrantfile 文档

一切都可以来自本地主机,包括设置一个具有多个虚拟机的更复杂的 Vagrant 项目。

编辑:明确“刀配置”cmd 应该在 VM 中运行并删除虚假的 Windows 路径引用。

于 2013-02-14T17:50:16.837 回答