背景一年前就听说了Docker,想用它做虚拟机,今天终于有机会付诸实践了。
我这里使用的是64位 ubuntu 14.04。想虚拟出4台设备,分别安装软件,进行集群测试。由于Linux容器的bug,docker在Linux的kernel3.8上运行最佳。环境检查及安装
看下我们的Ubuntu版本命令:
复制代码 代码如下:cat /etc/issue Ubuntu 14.04.5 LTS /n /l再来看下内核,命令:
uname -r 3.2.0-67-generic由于内核没有达到要求,我们接下来用下面的命令升级内核:
复制代码 代码如下:apt-get install linux-image-generic-lts-raring linux-headers-generic-lts-raringsudo 复制代码 代码如下:apt-get install --install-recommends linux-generic-lts-raring xserver-xorg-lts-raring libgl1-mesa-glx-lts-raring注意:升级后需要重启ubuntu.#重启后检查内核版本。
*******如果上述升级内核方法无法升级,参考如下方法:
Ubuntu 14.04 用户怎样安装 Kernel 3.14 内核 *(安装方法,直接下载DEB安装包,使用以下命令)
32 位系统安装命令
下载安装包:
wget kernel.ubuntu.com/~kernel-ppa/mainline/v3.14-trusty/linux-headers-3.14.0-031400_3.14.0-031400.201403310035_all.debwget kernel.ubuntu.com/~kernel-ppa/mainline/v3.14-trusty/linux-headers-3.14.0-031400-generic_3.14.0-031400.201403310035_i386.debwget kernel.ubuntu.com/~kernel-ppa/mainline/v3.14-trusty/linux-image-3.14.0-031400-generic_3.14.0-031400.201403310035_i386.deb安装:
复制代码 代码如下:sudo dpkg -i linux-headers-3.14*.deb linux-image-3.14*.deb64 位系统安装命令
下载安装包:
wget kernel.ubuntu.com/~kernel-ppa/mainline/v3.14-trusty/linux-headers-3.14.0-031400_3.14.0-031400.201403310035_all.debwget kernel.ubuntu.com/~kernel-ppa/mainline/v3.14-trusty/linux-headers-3.14.0-031400-generic_3.14.0-031400.201403310035_amd64.debwget kernel.ubuntu.com/~kernel-ppa/mainline/v3.14-trusty/linux-image-3.14.0-031400-generic_3.14.0-031400.201403310035_amd64.deb安装:
复制代码 代码如下:sudo dpkg -i linux-headers-3.14*.deb linux-image-3.14*.deb********安装部署docker
更新下源:
vim /etc/apt/sources.list使用以下阿里源:
deb http://mirrors.aliyun.com/ubuntu/ trusty main restricted universe multiverse deb http://mirrors.aliyun.com/ubuntu/ trusty-security main restricted universe multiverse deb http://mirrors.aliyun.com/ubuntu/ trusty-updates main restricted universe multiverse deb http://mirrors.aliyun.com/ubuntu/ trusty-proposed main restricted universe multiverse deb http://mirrors.aliyun.com/ubuntu/ trusty-backports main restricted universe multiverse deb-src http://mirrors.aliyun.com/ubuntu/ trusty main restricted universe multiverse deb-src http://mirrors.aliyun.com/ubuntu/ trusty-security main restricted universe multiverse deb-src http://mirrors.aliyun.com/ubuntu/ trusty-updates main restricted universe multiverse deb-src http://mirrors.aliyun.com/ubuntu/ trusty-proposed main restricted universe multiverse deb-src http://mirrors.aliyun.com/ubuntu/ trusty-backports main restricted universe multiverse
新闻热点
疑难解答