6.2docker

Only use various Bomben subsequent centos linux system installed 

Docker CE supports 64-bit CentOS 7, and require kernel version is not less than 3.10. Lower than the 3.10 upgrade their own kernel or reinstall centos7 or later 

Upgrading the kernel

##到root用户执行升级操作.

[root@localhost ~] # uname -a   ##旧版
Linux localhost.localdomain 2.6.32-279.el6.i686 
[root@localhost ~] # rpm --import https://www.elrepo.org/RPM-GPG-KEY-elrepo.org
[root@localhost ~] # rpm -ivh http://www.elrepo.org/elrepo-release-6-5.el6.elrepo.noarch.rpm
[root@localhost ~] # yum --enablerepo=elrepo-kernel install kernel-lt -y  
[root@localhost ~] # vim /etc/grub.conf default=1 改为 default=0  ##设置默认以3.10核心启动,默认是按照旧的核心启动
[root@localhost ~] # reboot
[root@localhost ~] # uname -a  ##升级后的版本
Linux localhost.localdomain 3.10.104-1.el6.elrepo.i686
 

Using yum install

Make install dependencies

[root@node ~]#  yum install -y yum-utils device-mapper-persistent-data lvm2 

In view of the domestic network problems, it is strongly recommended to use domestic sources, please see the official source in comments.

Execute the following command to add  yum the software source:

[root@node ~]# yum-config-manager --add-repo https://mirrors.ustc.edu.cn/docker-ce/linux/centos/docker-ce.repo

We need to test version

[root@node ~]# yum-config-manager --enable docker-ce-test

Installation dokcer-ce

[root@node ~]# yum install docker-ce

Restart

[root @ the Node ~] # systemctl Docker enable
the Created symlink from /etc/systemd/system/multi-user.target.wants/docker.service to /usr/lib/systemd/system/docker.service. # such a display 

[root@node ~]# systemctl start docker

Test Docker is installed correctly

 

 finish installation 




 

 

Guess you like

Origin www.cnblogs.com/guogle/p/10964284.html