简体   繁体   English

使用Vagrant安装fedora-20

[英]Installing fedora-20 using vagrant

I have successfully installed VMware and vagrant in my win 7 64 bit system. 我已经在win 7 64位系统中成功安装了VMware和vagrant。

I am trying to install Fedora using vagrant using following command: 我正在尝试使用vagrant使用以下命令来安装Fedora:

1) vargrant init chef/fedora-20 1) 无用的初始化厨师/ fedora-20

output: 输出:

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.

2) vagrant up 2) 无所事事

output: 输出:

Bringing machine 'default' up with 'virtualbox' provider...
==> default: Box 'chef/fedora-20' could not be found. Attempting to find and ins
tall...
    default: Box Provider: virtualbox
    default: Box Version: >= 0
The box 'chef/fedora-20' could not be found or
could not be accessed in the remote catalog. If this is a private
box on HashiCorp's Atlas, please verify you're logged in via
`vagrant login`. Also, please double-check the name. The expanded
URL and error message are shown below:

URL: ["https://atlas.hashicorp.com/chef/fedora-20"]
Error: Failed connect to atlas.hashicorp.com:443; No error

I can access atlas.hashicorp.com in browser. 我可以在浏览器中访问atlas.hashicorp.com。

Command vagrant up failed because my proxy denied the access to atlas.hashicorp.com. 命令游民了失败,因为我的代理否认访问atlas.hashicorp.com。 If we can access any website using browser that does not mean we can access it using command prompt. 如果我们可以使用浏览器访问任何网站,但这并不意味着我们可以使用命令提示符访问它。 Command prompt by default doesn't use the proxy setting from internet explorer. 默认情况下,命令提示符不使用Internet Explorer的代理设置。 In order to fix this issue, I created 2 environment variables: " http_proxy " and " https_proxy ". 为了解决此问题,我创建了2个环境变量:“ http_proxy ”和“ https_proxy ”。

Steps to create environment variable in windows: 在Windows中创建环境变量的步骤:

  1. Open the Control Panel and click the System icon. 打开控制面板,然后单击系统图标。 The System Properties dialog is displayed. 显示“系统属性”对话框。
  2. On the Advanced tab, click on Environment Variables. 在“高级”选项卡上,单击“环境变量”。 The Environment Variables dialog is displayed. 显示“环境变量”对话框。
  3. Click New in the System variables panel. 在“系统变量”面板中单击“新建”。 The New SystemVariable dialog is displayed. 显示“新建SystemVariable”对话框。
  4. Add http_proxy and https_proxy with the appropriate proxy information 使用适当的代理信息添加http_proxy和https_proxy

Set the http_proxy and https_proxy variable with the hostname or IP address of the proxy server:http_proxy= http://proxy.example.org 使用代理服务器的主机名或IP地址设置http_proxyhttps_proxy变量:http_proxy = http://proxy.example.org

If the proxy server requires a user name and password, include them in the following form:http_proxy= http://username:password@proxy.example.org 如果代理服务器需要用户名和密码,请以以下形式包括它们:http_proxy = http:// username:password@proxy.example.org

If the proxy server uses a port other than 80, include the port number:http_proxy= http://username:password@proxy.example.org:8080 如果代理服务器使用的端口不是80,则包括以下端口号:http_proxy = http:// username:password@proxy.example.org:8080

For me that "chef/fedora-20" box is working correctly using your steps. 对我来说,“ chef / fedora-20”框按照您的步骤正常工作。 It might be some access problem. 可能是一些访问问题。

As an alternative you can try downloading the box with: 或者,您可以尝试通过以下方式下载该框:

vagrant box add chef/fedora-20

And then trying the same vagrant up . 然后尝试同样的vagrant up

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM