CentOS-6.5在线安装docker-1.7教程(升级内核)

前端之家收集整理的这篇文章主要介绍了CentOS-6.5在线安装docker-1.7教程(升级内核)前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。
前一篇博客讲到了Centos6.5在线安装docker1.7的方式。由于docker官方推荐的内核版本是3.10以上,本文在上一篇基础上增加升级内核的方法,然后再3.10内核基础上安装docker。

1.安装EPEL

For CentOS-6.5,theDocker package is part ofExtra 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包。


2.升级内核

2.1 导入public key

# rpm --importhttps://www.elrepo.org/RPM-GPG-KEY-elrepo.org

2.2 安装ELRepo到CentOS-6.5中

# rpm -ivhhttp://www.elrepo.org/elrepo-release-6-5.el6.elrepo.noarch.rpm

2.3 安装kernel-lt(lt=long-term)这个比较稳定,会持续更新,二选一。

# yum--enablerepo=elrepo-kernel install kernel-lt -y

可以装kernel-ml(ml=mainline)

# yum--enablerepo=elrepo-kernel install kernel-ml -y

2.4 修改Grub引导顺序

# vim /etc/grub.conf设置default=0

2.5 重启

2.6 uname -a检查

3. 安装docker

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

3.1remove docker

# yum remove docker


3.2安装docker

# yum install docker-io

4. 更新device-mapper-libs

# yum upgrade device-mapper-libs

5. 设置开机自启

# chkconfig docker on

6. 检查支持情况

# lxc-checkconfig

7. 启动cgroup

# service cgconfig start

8.启动docker

# docker –d &

9. 测试

# docker ps -a

原文链接:https://www.f2er.com/centos/378272.html

猜你在找的CentOS相关文章