CentOS-6.5在线安装docker-1.7教程

CentOS-6.5在线安装docker-1.7教程

1.  安装EPEL

For CentOS-6.5, theDocker package is part of Extra Packages for EnterpriseLinux (EPEL) repository, a community effort to create and maintain additionalpackages for the RHEL distribution. Firstly, you need to ensure you have theEPEL repository enabled. Please follow theEPEL installation instructions.

1.1 安装yum优先级插件

# yum installyum-priorities

1.2 安装epel

# rpm -Uvh http://mirrors.ustc.edu.cn/fedora/epel/6/x86_64/epel-release-6-8.noarch.rpm

# rpm -Uvhhttp://rpms.famillecollet.com/enterprise/remi-release-6.rpm

1.3 查看是否安装成功

# rpm -qepel-release

1.4 导入key

# rpm --import/etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-6

1.5 修改/etc/yum.repos.d/epel.repo文件,在[epel]最后添加一条属性 priority=11

# vi/etc/yum.repos.d/epel.repo

1.6  重建缓存

# yum makecache

安装完成之后,确保yum list能找到docker的相关rpm包。

CentOS-6.5在线安装docker-1.7教程_第1张图片

2.   安装docker

For CentOS-6, thereis a package name conflict with a system tray application and its executable, sothe Docker RPM package was calleddocker-io.To proceed with docker-io installation on CentOS-6, you may need toremove thedocker package first. Next,let's install the docker-io package which willinstall Docker on our host.

2.1 remove docker

# yum remove docker

CentOS-6.5在线安装docker-1.7教程_第2张图片

2.2 安装docker

# yum installdocker-io

3.  更新device-mapper-libs

# yum upgrade device-mapper-libs

4.  设置开机自启

# chkconfig docker on

5.  检查支持情况

# lxc-checkconfig

6.  启动cgroup

# service cgconfig start

7.   启动docker

# docker –d &

8.  测试

# docker ps -a

你可能感兴趣的:(docker,docker,CentOS6.5,yum)