千家信息网

CoreOS中如何安装Vagrant

发表于:2026-11-02 作者:千家信息网编辑
千家信息网最后更新 2026年11月02日,这篇文章给大家分享的是有关CoreOS中如何安装Vagrant的内容。小编觉得挺实用的,因此分享给大家做个参考,一起跟随小编过来看看吧。准备环境(本人电脑win7 x64)1 安装最新版Oracle
千家信息网最后更新 2026年11月02日CoreOS中如何安装Vagrant

这篇文章给大家分享的是有关CoreOS中如何安装Vagrant的内容。小编觉得挺实用的,因此分享给大家做个参考,一起跟随小编过来看看吧。

准备环境(本人电脑win7 x64)

  • 1 安装最新版Oracle VM VirtualBox 4.3.18

  • 2 安装最新版vagrant 1.6.5

  • 3 安装windows版git

##安装CoreOS ###创建安装目录下载vagrant配置文件 比如我在E盘创建了一个coreos文件夹,然后在git shell界面进入这个文件夹,执行:

git clone https://github.com/coreos/coreos-vagrant.git   cd coreos-vagrant

###修改git clone下来的配置文件 将config.rb.sample复制一份为config.rb
将user-data.sample复制一份为user-data
修改config.rb文件内容:

$num_instances=3  #如果安装单个coreos就写1,如果是集群就写大于1的数字$update_channel='alpha' #这个是版本,可以改为stable或者beta

###安装coreos 执行:

cd coreos-vagrantvagrant up

此时有报错信息如下:

E:\coreos\coreos-vagrant>vagrant up
Bringing machine 'core-01' up with 'virtualbox' provider...
Bringing machine 'core-02' up with 'virtualbox' provider...
Bringing machine 'core-03' up with 'virtualbox' provider...
==> core-01: Box 'coreos-alpha' could not be found. Attempting to find and insta ll...
core-01: Box Provider: virtualbox
core-01: Box Version: >= 308.0.1
You specified a box version constraint with a direct box file path. Box version constraints only work with boxes from Vagrant Cloud or a custom box host. Please remove the version constraint and try again.

查看Vagrantfile文件内容匹配报错有如下行:

config.vm.box_version = ">= 308.0.1"

将这一行在Vagrantfile文件里面用#注释掉,然后重新执行vagrant up:

E:\coreos\coreos-vagrant>vagrant up
Bringing machine 'core-01' up with 'virtualbox' provider...
Bringing machine 'core-02' up with 'virtualbox' provider...
Bringing machine 'core-03' up with 'virtualbox' provider...
==> core-01: Box 'coreos-alpha' could not be found. Attempting to find and insta ll...
core-01: Box Provider: virtualbox
core-01: Box Version: >= 0
==> core-01: Loading metadata for box 'http://alpha.release.core-os.net/amd64-us r/current/coreos_production_vagrant.json'
core-01: URL: http://alpha.release.core-os.net/amd64-usr/current/coreos_prod uction_vagrant.json
==> core-01: Adding box 'coreos-alpha' (v493.0.0) for provider: virtualbox
core-01: Downloading: http://alpha.release.core-os.net/amd64-usr/493.0.0/cor eos_production_vagrant.box
此处省略N多字*********************
==> core-03: Machine booted and ready!
==> core-03: Setting hostname...
==> core-03: Configuring and enabling network interfaces...
==> core-03: Running provisioner: file...
==> core-03: Running provisioner: shell...
core-03: Running: inline script

安装完成。

###配置连接 执行vagrant ssh, 会自动生成ssh的信息:

E:\coreos\coreos-vagrant>vagrant ssh core-01
ssh executable not found in any directories in the %PATH% variable. Is an SSH client installed? Try installing Cygwin, MinGW or Git, all of which contain an SSH client. Or use your favorite SSH client with the following authentication information shown below:
Host: 127.0.0.1
Port: 2222
Username: core
Private key: C:/Users/Administrator/.vagrant.d/insecure_private_key

使用xshell或者secureCRT配置私钥远程连接

Xshell 4 (Build 0131)
Copyright (c) 2002-2014 NetSarang Computer, Inc. All rights reserved.

Type `help' to learn how to use Xshell prompt.
Xshell:>

Connecting to 192.168.83.131:22...
Connection established.
To escape to local shell, press 'Ctrl+Alt+]'.

Last login: Wed Nov 12 13:16:55 2014 from 192.168.83.1
CoreOS (alpha)
core@localhost ~ $ cat /etc/os-release
NAME=CoreOS
ID=coreos
VERSION=494.0.0
VERSION_ID=494.0.0
BUILD_ID=
PRETTY_NAME="CoreOS 494.0.0"
ANSI_COLOR="1;32"
HOME_URL="https://coreos.com/"
BUG_REPORT_URL="https://github.com/coreos/bugs/issues"

查看docker版本

core@localhost ~ $ docker version  Client version: 1.3.0  Client API version: 1.15  Go version (client): go1.3.2  Git commit (client): c78088f  OS/Arch (client): linux/amd64  Server version: 1.3.0  Server API version: 1.15  Go version (server): go1.3.2  Git commit (server): c78088f

感谢各位的阅读!关于"CoreOS中如何安装Vagrant"这篇文章就分享到这里了,希望以上内容可以对大家有一定的帮助,让大家可以学到更多知识,如果觉得文章不错,可以把它分享出去让更多的人看到吧!

文件 内容 配置 信息 文件夹 更多 最新版 版本 篇文章 不错 实用 一行 单个 数字 文章 注释 环境 电脑 界面 目录 数据库的安全要保护哪些东西 数据库安全各自的含义是什么 生产安全数据库录入 数据库的安全性及管理 数据库安全策略包含哪些 海淀数据库安全审计系统 建立农村房屋安全信息数据库 易用的数据库客户端支持安全管理 连接数据库失败ssl安全错误 数据库的锁怎样保障安全 广州大一互联网络科技有限公司 金融科技还是互联网 奇酷互联网科技 互联网科技的英文 奔汉互联网科技 互联网科技大会案例 科技大学互联网专业好不好 青海省互联网新科技 欧洲十大科技互联网公司 阿里互联网科技公司 威龙国际互联网科技公司 科技互联网的核心竞争力 广东工业互联网大赛深圳学泰科技 江苏互联网智能科技产品出厂价 互联网科技手抄报图片 易租星互联网科技有限公司 北京天晋互联网科技有限公司 广州三三互联网科技有限公司 第三届互联网大会安防黑科技 瑞安市蟠桃会互联网科技有限公司 中智农互联网科技 互联网 科技创新 狮子座互联网科技有限公司 上海亿帐通互联网科技 左右互联网络科技 富国互联网科技创新基金 浙江互联网科技研学营 企晟互联网信息科技有限公司 现代互联网科技公司 瑞安市蟠桃会互联网科技有限公司
0