本机环境:redhat6.6
1 uname -a 2 Linux host-99 2.6.32-504.el6.x86_64 #1 SMP Tue Sep 16 01:56:35 EDT 2014 x86_64 x86_64 x86_64 GNU/Linux 3 4 cat /etc/issue 5 Red Hat Enterprise Linux Server release 6.6 (Santiago)
1、下载rpm包
下载准备一下rpm包
lxc-libs-1.0.9-1.el6.x86_64.rpm
lua-alt-getopt-0.7.0-1.el6.noarch.rpm
lua-filesystem-1.4.2-1.el6.x86_64.rpm
lua-lxc-1.0.9-1.el6.x86_64.rpm
lxc-1.0.9-1.el6.x86_64.rpm
docker-io-1.7.1-2.el6.x86_64.rpm
国内的话可以选择阿里云的地址进行下载
1 http://mirrors.aliyun.com/epel/6/x86_64/Packages/l/ 2 http://mirrors.aliyun.com/epel/6/x86_64/Packages/d/
有的rpm包有可能会出现版本号不一致的问题,是否有影响待试验,上述列的这些版本是可以
已将以上rpm包上传至园子,地址:https://files.cnblogs.com/files/befer/redhat6.6-docker-1.7.zip
2、安装rpm包
rpm -ivh lxc-libs-1.0.11-1.el6.x86_64.rpm
rpm -ivh lua-alt-getopt-0.7.0-1.el6.noarch.rpm
rpm -ivh lua-filesystem-1.4.2-1.el6.x86_64.rpm
rpm -ivh lua-lxc-1.0.11-1.el6.x86_64.rpm
rpm -ivh lxc-1.0.11-1.el6.x86_64.rpm
rpm -ivh docker-io-1.7.1-2.el6.x86_64.rpm
有的网上教程说还需要device-mapper-libs对应的rpm,在本机上rpm查了下好像6.6自带安装了
[root@host-99 temp]# rpm -qa |grep -i device-mapper-libs device-mapper-libs-1.02.90-2.el6.x86_64
到了这一步基本上完成一大半工作了
3、启动docker服务
[root@host-99 temp]# service docker start Starting cgconfig service: [ OK ] Starting docker: [ OK ] [root@host-99 temp]# docker ps CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
4、docker卸载
yum list installed | grep docker yum -y remove docker-io.x86_64
清理镜像文件
rm -rf /var/lib/docker