[extremely simple and effective] installing docker under centos6. X

1. Upgrade Linux kernel

    rpm –import https://www.elrepo.org/RPM-GPG-KEY-elrepo.org


    rpm -Uvh http://www.elrepo.org/elrepo-release-6-8.el6.elrepo.noarch.rpm     


    yum –enablerepo=elrepo-kernel install kernel-lt -y

2. Modify default startup order

   vim /etc/ grub.conf

Restart the server

shutdown -r now

3. Disable SELinux

4. Offline installation of docker with static binary files

reference resources https://docs.docker.com/install/linux/docker-ce/binaries/#install -static-binaries

This installation method is the most simple and correct, the rest of the online reference rpm, yum installation all have a variety of problems.


1. Download static binary file

go to https://download.docker.com/linux/static/stable/ (or change stable to edge or test), select your hardware platform, and then download. Tgz files related to the docker CE version to be installed.


2. Decompress

$ tar –xzvf docker-18.06.3- ce.tgz For this, please install it on demand

Required: move the binary file to a directory on the executable path, such as/usr/bin /.

——–Without this step, it is invalid to call docker under the docker file

$ sudo cp docker/* /usr/bin/

3. Start the docker daemon:

$ sudo dockerd&

Note: if the following error occurs when starting the daemons:

The reason is that CGroup is not mounted on the host computer. To add a mount, the solution is as follows:

vim /etc/fstab

none        /sys/fs/cgroup        cgroup        defaults    0    0

Save and restart.

4. Start the docker command test

docker -v

Read More: