Linux environment to install, uninstall Docker Linux environment to install, uninstall Docker

installation:

  1, Docker requirements CentOS system kernel version is higher than 3.10, by  uname -r  to see your current kernel version supports safe account docker command

  2, yum update package: sudo yum update

  3, required installation package, yum-util provide yum-config-manager function, the other two are driven dependent devicemapper

    sudo yum install -y yum-utils device-mapper-persistent-data lvm2

         

  4, the source provided yum: sudo yum-config-manager --add-repo https://download.docker.com/linux/centos/docker-ce.repo

    

  5, you can view all versions of all warehouse docker, and choose a specific version to install: yum list docker-ce --showduplicates | sort -r

    

 

 

  6、安装docker:sudo yum install docker-ce-17.12.0.ce

            

  7, starts, set to open boot

    sudo systemctl start docker

    sudo systemctl enable docker

              

  8, verify that the installation was successful (there are two parts, client service and installation start indicate docker are successful): docker version

    

 

 

 

  9, the startup state docker See: systemctl status docker (i.e., successfully started below)   

          

 

 

Uninstall:

  1, the query package docker installed before:

    yum list installed | grep docker

       

  2, delete the installation package:

   yum remove docker-ce.x86_64 ddocker-ce-cli.x86_64 -y

  3, remove the mirror / containers

    rm -rf /var/lib/docker

installation:

  1, Docker requirements CentOS system kernel version is higher than 3.10, by  uname -r  to see your current kernel version supports safe account docker command

  2, yum update package: sudo yum update

  3, required installation package, yum-util provide yum-config-manager function, the other two are driven dependent devicemapper

    sudo yum install -y yum-utils device-mapper-persistent-data lvm2

         

  4, the source provided yum: sudo yum-config-manager --add-repo https://download.docker.com/linux/centos/docker-ce.repo

    

  5, you can view all versions of all warehouse docker, and choose a specific version to install: yum list docker-ce --showduplicates | sort -r

    

 

 

  6、安装docker:sudo yum install docker-ce-17.12.0.ce

            

  7, starts, set to open boot

    sudo systemctl start docker

    sudo systemctl enable docker

              

  8, verify that the installation was successful (there are two parts, client service and installation start indicate docker are successful): docker version

    

 

 

 

  9, the startup state docker See: systemctl status docker (i.e., successfully started below)   

          

 

 

Uninstall:

  1, the query package docker installed before:

    yum list installed | grep docker

       

  2, delete the installation package:

   yum remove docker-ce.x86_64 ddocker-ce-cli.x86_64 -y

  3, remove the mirror / containers

    rm -rf /var/lib/docker

Guess you like

Origin www.cnblogs.com/newtom/p/11605975.html