Installing and uninstalling docker in CentOS

owenzhang24 2021-02-23 17:44:45
installing uninstalling docker centos


Whatever you want yum Installed docker After installation, I found that I couldn't start all the time , Has been submitted to the Failed to start docker.service: Unit not found. This mistake , So unload and reload , Record the process of this pit father

One 、 Check your installed docker

yum list installed |grep docker

After input, you can clearly see that the console will output

[root@xxwlog docker]# yum list installed |grep docker
docker-client.x86_64 2:1.13.1-162.git64e9980.el7.centos
docker-common.x86_64 2:1.13.1-162.git64e9980.el7.centos

Two 、 Uninstall the installed docker

yum -y remove docker-ce.x86_64

client It will be unloaded automatically. If it is not unloaded, continue to use it yum -y remove uninstall

Input again yum list installed |grep docker See if the deletion succeeded

3、 ... and 、 Install in the right posture docker

It is recommended to use Docker Engineshequ Repository installation for the community docker. So before you install it, you need to set up Docker The repository . after , You can install and update from the repository Docker.

3.1 Install Repository :

Install the required package .yum-utils Provides yum-config-manager  utility , and device-mapper-persistent-data and lvm2 By  devicemapper Memory driver .

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

3.2 Setting up a stable repository yum The source is Ali docker Source

yum-config-manager --add-repo http://mirrors.aliyun.com/docker-ce/linux/centos/docker-ce.repo

3.3 The first way to install Latest version installation

sudo yum install -y docker-ce

After installation , Please just skip 3.4

3.4 Specific version installation

To install a specific version of Docker Engine - Community, Please list repo Available versions in , Then select and install

3.4.1 List the installable versions

yum list docker-ce --showduplicates | sort -r

3.4.2 Install the specified version

# Specify the version from the installation list 17.09.0
yum install docker-ce-17.09.0.ce -y

3.5 Start up and join start up

sudo systemctl start docker
sudo systemctl enable docker

3.6 Verify that the installation was successful ( Yes client and service Two-part representation docker Installation and startup were successful )

docker version

3.7 Verify startup success

docker ps -a

3.8 Common administrative commands

#docker start-up 
sudo systemctl start docker

# Set power on self start 
sudo systemctl enable docker

# restart docker
sudo systemctl restart docker

# close docker
sudo systemctl stop docker

# Check to see if startup succeeded 
docker ps -a
版权声明
本文为[owenzhang24]所创,转载请带上原文链接,感谢
https://javamana.com/2021/02/20210223173407938F.html

  1. 忘记云服务器上MySQL数据库的root密码时如何重置密码?
  2. Detailed explanation of lettuce, an advanced client of redis
  3. Springboot learning integrated application (1)
  4. Linux File Recover
  5. Linux-Security
  6. How to reset the password when you forget the root password of MySQL database on the cloud server?
  7. Linux File Recover
  8. Linux-Security
  9. LiteOS:盘点那些重要的数据结构
  10. Linux Memory
  11. Liteos: inventory those important data structures
  12. Linux Memory
  13. 手把手教你使用IDEA2020创建SpringBoot项目
  14. Hand in hand to teach you how to create a springboot project with idea2020
  15. spring boot 整合swagger2生成API文档
  16. Spring boot integrates swagger2 to generate API documents
  17. linux操作系统重启后 解决nginx的pid消失问题
  18. Solve the problem of nginx PID disappearing after Linux operating system restart
  19. JAVA版本号含义
  20. The meaning of java version number
  21. 开源办公开发平台丨Mysql5.7两套四节点主从结构环境搭建教程(二)
  22. 开源办公开发平台丨Mysql5.7两套四节点主从结构环境搭建教程(一)
  23. Open source office development platform mysql5.7 two sets of four node master-slave structure environment building tutorial (2)
  24. HTTP的“无状态”和REST的“状态转换”
  25. Open source office development platform mysql5.7 two sets of four node master-slave structure environment building tutorial (1)
  26. 【大数据哔哔集20210128】使用Hive计算环比和同比
  27. 【大数据哔哔集20210125】Kafka将逐步弃用对zookeeper的依赖
  28. 【大数据哔哔集20210124】有人问我Kafka Leader选举?我真没慌
  29. 【大数据哔哔集20210123】别问,问就是Kafka高可靠
  30. Spring 事务、异步和循环依赖有什么关系?
  31. Spring 动态代理时是如何解决循环依赖的?为什么要使用三级缓存?
  32. "Stateless" of HTTP and "state transition" of rest
  33. [big data bibiji 20210128] use hive to calculate month on month and year on year
  34. [big data bibiji 20210125] Kafka will gradually abandon its dependence on zookeeper
  35. [big data beeps 20210124] someone asked me about Kafka leader election? I'm not in a panic
  36. [big data bibiji 20210123] don't ask, ask is Kafka highly reliable
  37. jQuery Gantt Package 在Visual Studio中创建一个新的ASP.NET项目
  38. What is the relationship between spring transactions, asynchrony, and circular dependencies?
  39. How to solve circular dependency in spring dynamic proxy? Why use level 3 caching?
  40. Unicode码的二进制转换(Java)
  41. JAVA的函数式接口
  42. JAVA里的元祖类
  43. JQuery Gantt package to create a new ASP.NET project
  44. Binary conversion of Unicode code (Java)
  45. The functional interface of Java
  46. Yuanzu class in Java
  47. Java中的CPU占用高和内存占用高的问题排查
  48. HashMap连环问你能答出几道?
  49. IntelliJ IDEA 还能画思维导图,果然最强 IDE!
  50. java中的反射和代理
  51. Troubleshooting of high CPU and memory usage in Java
  52. How many questions can you answer?
  53. IntelliJ idea can also draw mind maps. It's really the strongest ide!
  54. Reflection and proxy in Java
  55. Java中的CPU占用高和内存占用高的问题排查
  56. Linux OOM(out of memory)
  57. mysql 自定义函数因参数名称报错
  58. Troubleshooting of high CPU and memory usage in Java
  59. Linux OOM(out of memory)
  60. MySQL user defined function error due to parameter name