This article describes how to install Docker in a Redhat/centos environment. Official documentation requires at least 3.8 Linux kernel, and Docker can only run on a 64-bit system. Since the kernel version of RHEL6 and CentOS6 is 2.6, the kernel must be upgraded first.
Below is an example of CentOS6.5 (64-bit), which describes the following Docker installation steps and how to use them:
First, upgrade the kernel (with Aufs module, remember to upgrade, otherwise there will be a lot of strange problems, it is recommended to install with Yum)
1. Yum Install the 3.10 kernel with aufs module (or download kernel manual installation here: http://down.51cto.com/data/1903250)
Cd/etc/yum.repos.d
wget Http://www.hop5.in/yum/el6/hop5.repo
Yum Install Kernel-ml-aufs Kernel-ml-aufs-devel
2, modify the GRUB main profile/etc/grub.conf, set default=0, indicating that the content under the first title is the default startup kernel (typically the newly installed kernel is in the first position).
3, restart the system, this time your kernel has been successfully upgraded.
[Email protected] ~]# Uname–r
3.10.5-3.el6.x86_64
To see if the kernel supports AUFS:
[[email protected] ~]# grep aufs/proc/filesystems
Nodev Aufs
Second, install Docker
First turn off SELinux and close iptables:
Setenforce 0
Sed-i '/^selinux=/c\selinux=disabled '/etc/selinux/config
Service Iptables Stop
2. Docker-io package has been provided in Fedora Epel source, download and install Epel:
RPM-IVH http://mirrors.sohu.com/fedora-epel/6/x86_64/epel-release-6-8.noarch.rpm
Sed-i ' s/^mirrorlist=https/mirrorlist=http/'/etc/yum.repos.d/epel.repo
Installation of Iproute with NS
Yum Install-y http://rdo.fedorapeople.org/rdo-release.rpm
Vi/etc/yum.repos.d/rdo-release.repo
[Openstack-juno]
Name=openstack Juno Repository
baseurl=http://repos.fedorapeople.org/repos/openstack/openstack-havana/epel-6/
Enabled=1
Skip_if_unavailable=0
Gpgcheck=0
Gpgkey=file:///etc/pki/rpm-gpg/rpm-gpg-key-rdo-juno
Yum Install-y Iproute
Yum Update-y Iproute
3. Yum Installation Docker-io:
Yum-y Install Docker-io
4. Start Docker:
5. View the Docker version:
To view Docker logs:
Cat/var/log/docker
Import a previously backed up mirror
Docker Load </xxx/xxx-docker.tar
Docker Internal Installation Guide