centos6.X安装docker
一、升级内核(带aufs模块)
1、yum安装带aufs模块的3.10内核
cd /etc/yum.repos.d
wget
yum install kernel-ml-aufs kernel-ml-aufs-devel
2、修改grub的主配置文件/etc/grub.conf,设置default=0,表示第一个title下的内容为默认启动的kernel
3、重启并查看内核
uname -r
二、安装docker
1、首先关闭selinux:
setenforce 0
sed -i '/^SELINUX=/c\SELINUX=disabled' /etc/selinux/config
2、在Fedora EPEL源中已经提供了docker-io包,下载安装epel:
rpm -ivh
sed -i 's/^mirrorlist=https/mirrorlist=http/' /etc/yum.repos.d/epel.repo
3、yum安装docker-io:
yum -y install docker-io
4、验证一下
[root@server ~]# docker version
Client version: 1.7.1
Client API version: 1.19
Go version (client): go1.4.2
Git commit (client): 786b29d/1.7.1
OS/Arch (client): linux/amd64
Server version: 1.7.1
Server API version: 1.19
Go version (server): go1.4.2
Git commit (server): 786b29d/1.7.1
OS/Arch (server): linux/amd64
选择:删除yum源
rm /etc/yum.repos.d/hop5.repo
rm /etc/yum.repos.d/epel.repo
如果出现问题:Cannot connect to the Docker daemon. Is 'docker -d' running on this host?
如下尝试解决:rm -rf /var/lib/docker/*
阅读(2255) | 评论(0) | 转发(0) |