Because the installation of docker requires the linux kernel version not lower than 3.18, so you need to upgrade the linux kernel of centos7 , completely refer to the method of upgrading the kernel of Centos7 to 3.18 , which is actually upgraded to 5.11. Specific steps are as follows:
Before updating, check the kernel version: uname -r
import key: rpm --import https://www.elrepo.org/RPM-GPG-KEY-elrepo.org
install elrepo's yum source: rpm -Uvh http://www.elrepo.org/elrepo-release-7.0-2.el7.elrepo.noarch.rpm
install the kernel: yum --enablerepo=elrepo-kernel install kernel-ml-devel kernel-ml -y
check the default boot sequence:, the awk -F\' '$1=="menuentry " {print $2}' /etc/grub2.cfg
results are as follows:
CentOS Linux (5.11.0-1.el7.elrepo.x86_64) 7 (Core)
CentOS Linux (3.10.0-1127.el7.x86_64) 7 (Core)
CentOS Linux (0-rescue-f524cbe3f35545bba5df60e837626ec4) 7 (Core)
Among them, 5.11 is the newly installed linux kernel version, and 3.10 is the existing linux kernel version.
Change the linux kernel selected by default when the system is started: grub2-set-default 0
then restart, uname -r
check to confirm that the new kernel is used