Docker requires a 64-bit installation regardless of your CentOS version. Also, your kernel must be 3.10 at minimum, which CentOS 7 runs.
Install Docker on Centos
2、 Modify grub's main configuration file /etc/grub.conf, set default=0, which means that the content under the first title is the kernel started by default (generally, the newly installed kernel is in the first position).
3、 Restart the system and your kernel will be upgraded successfully.
[ root@localhost ~]# uname -r
3.10.5- 3. el6.x86_64
Check whether the kernel supports aufs:
[ root@localhost ~]# grep aufs /proc/filesystems
nodev aufs
Two, install docker
1、 First close selinux:
setenforce 0
sed -i ‘/^SELINUX=/c\SELINUX=disabled’ /etc/selinux/config
2、 The docker-io package has been provided in the 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
3、 yum install docker-io:
yum -y install docker-io
4、 Start docker:
service docker start
View the docker log:
cat /var/log/docker
Download centos mirror
sudo docker pull centos
Run hello world
sudo docker run centos /bin/echo hello world
hello world
The installation is successful! !
Recommended Posts