Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to install and uninstall Docker

2025-01-27 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/01 Report--

This article will explain in detail how to install and uninstall Docker. The editor thinks it is very practical, so I share it with you for reference. I hope you can get something after reading this article.

Preparatory work

System: centos6.x

Install 1. Close seLinux

Vim / etc/selinux/config

Modified value: SELINUX=disabled

# This file controls the state of SELinux on the system.# SELINUX= can take one of these three values:# enforcing-SELinux security policy is enforced.# permissive-SELinux prints warnings instead of enforcing.# disabled-SELinux is fully disabled.SELINUX=disabled# SELINUXTYPE= type of policy in use. Possible values are:# targeted-Only targeted network daemons are protected.# strict-Full SELinux protection.SELINUXTYPE=targeted

View status: sestatus

If the status is not disabled, restart

[root@iZwz9eczt2tstmhvm8mv25Z docker] # sestatusSELinux status: disabled [root@iZwz9eczt2tstmhvm8mv25Z docker] # 2. Install the epel source

Download wget http://ftp.riken.jp/Linux/fedora/epel/6/x86_64/epel-release-6-8.noarch.rpm

# wget http://ftp.riken.jp/Linux/fedora/epel/6/x86_64/epel-release-6-8.noarch.rpm--2017-04-25 09VO9 VOL55 VOL43 FLI-http://ftp.riken.jp/Linux/fedora/epel/6/x86_64/epel-release-6-8.noarch.rpm is parsing the host ftp.riken.jp... 134.160.38.1 ftp.riken.jp is being connected | 134.160.38.1 |: 80. Connected. A HTTP request has been issued Waiting for a response. 200 OK length: 14540 (14K) [text/plain] is being saved to: "epel-release-6-8.noarch.rpm" 14540 43.5K/s in 0.3s 2017-04-25 09:55:46 (43.5 KB/s)-saved "epel-release-6-8.noarch.rpm" [14540 14540]) [root@iZwz9eczt2tstmhvm8mv25Z docker] # lsepel-release-6 -8.noarch.rpm [root@iZwz9eczt2tstmhvm8mv25Z docker] #

Install rpm-ivh epel-release-6-8.noarch.rpm

[root@iZwz9eczt2tstmhvm8mv25Z docker] # rpm-ivh epel-release-6-8.noarch.rpm warning: epel-release-6-8.noarch.rpm: Header V3 RSA/SHA256 Signature, key ID 0608b895: NOKEYPreparing... # [100%] 1:epel-release warning: / etc/yum.repos.d/epel.repo created as / etc/yum.repos.d/epel.repo.rpmnew## # [100%] [root@iZwz9eczt2tstmhvm8mv25Z docker] # 3 Install lxc and libcgroup

Yum install lxc libcgroup

[root@iZwz9eczt2tstmhvm8mv25Z docker] # yum install lxc libcgroupLoaded plugins: securitybase | 3.7 kB 00:00 epel | 4.3 kB 00:00 epel/primary_db | 5.9 MB 00:05 extras | 3.4 kB 00:00 updates | 3.4 kB 00:00 updates/primary_db | 803 kB 00:00 Setting up Install ProcessResolving Dependencies-- > Running transaction check--- > Package libcgroup.x86_64 0:0.40.rc1-23.el6 will be installed--- > Package lxc.x86_64 0vir 1.0.9-1.el6 will be installed-- > Processing Dependency: lua-lxc (x86-64) = 1.0.9-1.el6 for package: lxc-1.0.9- 1.el6.x86 1.el6 for package-> Processing Dependency: lua-alt-getopt for package: lxc-1.0.9- 1.el6.x86per64muri-> Processing Dependency: liblxc.so.1 () (64bit) for package: lxc-1.0.9-1.el6.x86afluto-> Running transaction check--- > Package lua-alt-getopt.noarch 0Rule 0.7.0-1.el6 will be installed--- > Package lua-lxc.x86_64 0Rose 1.0.9-1.el6 will be installed-- > Processing Dependency: lua-filesystem for package: lua-lxc-1.0.9 -1.el6.x86per64 murmuri-> Package lxc-libs.x86_64 0Package lua-filesystem.x86_64 1.0.9-1.el6 will be installed-- > Running transaction check--- > Package lua-filesystem.x86_64 0vir 1.4.2-1.el6 will be installed-- > Finished Dependency ResolutionDependencies Resolved==== Package Arch Version Repository Size====Installing: libcgroup x86per64 0.40.rc1-23. El6 base 131k lxc x8634 1.0.9-1.el6 epel 122kInstalling for dependencies: lua-alt-getopt noarch 0.7.0k-1.el6 epel 6.9k lua-filesystem x861641.4.2-1.el6 epel 24k Lua-lxc x86'64 1.0.9-1.el6 epel 16k lxc-libs x86'64 1.0.9-1.el6 epel 257 kTransaction Summary====Install 6 Package (s) Total download size: 557 kInstalled size: 1.3 MIs this ok [y yDownloading Packages N]: yDownloading Packages: (1) yDownloading Packages 6: libcgroup-0.40.rc1- 23.el6.x86_64.rpm | 131 kB 00:00 (2 kB 6): lua-alt-getopt-0.7.0-1.el6.noarch.rpm | 6.9 kB 00:00 (3 kB 6): lua-filesystem-1.4.2-1.el6.x86_64.rpm | 24 kB 00:00 (4 kB 6): lua-lxc-1 .0.9-1.el6.x86_64.rpm | 16 kB 00:00 (5 kB 6): lxc-1.0.9-1.el6.x86_64.rpm | 122 kB 00:00 (6 up 6): lxc-libs-1.0.9-1.el6.x86_64.rpm | 257 kB 00:00 -Total 675 kB/s | 557 kB 00:00 Running rpm_ Check_debugRunning Transaction TestTransaction Test SucceededRunning TransactionWarning: RPMDB altered outside of yum.** Found 3 pre-existing rpmdb problem (s) 'yum check' output follows:2:postfix-2.6.6-6.el6_5.x86_64 has missing requires of libmysqlclient.so.16 () (64bit) 2:postfix-2.6.6-6.el6_5.x86_64 has missing requires of libmysqlclient.so.16 (libmysqlclient_16) (64bit) 2:postfix-2.6.6-6.el6_5.x86_64 has missing requires of mysql-libs Installing: lxc-libs-1.0.9-1.el6.x86 _ 64 1 6 Installing: lua-filesystem-1.4.2-1.el6.x86_64 2 Installing 6 Installing: lua-lxc-1.0.9-1.el6.x86_64 3 6 Installing: lua-alt-getopt-0.7.0-1.el6.noarch 4 Installing 6 Installing: lxc-1.0.9-1.el6.x86_64 5 Verifying 6 Installing: libcgroup-0.40.rc1-23.el6.x86_64 6 Verifying: lua-lxc-1.0.9-1.el6.x86_64 1 Verifying 6: lxc-libs-1.0.9-1.el6.x86_64 2 Verifying: lxc-1.0.9-1.el6.x86_64 3 Verifying 6 Verifying: lua-alt-getopt-0.7.0-1.el6.noarch 4 23.el6 lxc.x86_64 6 Verifying: libcgroup-0.40.rc1-23.el6.x86_64 5 Verifying: lua-filesystem-1.4.2-1.el6.x86_64 6 Installed: libcgroup.x86_64 0:0.40.rc1-23.el6 lxc.x86_64 0 purl 1.0.9-1.el6 Dependency Installed: lua-alt-getopt.noarch 0VOR 0.7.0-1.el6 lua-filesystem.x86_64 0V 1.4.2-1.el6 lua-lxc.x86_64 0V 1.0.9-1.el6 lxc-libs.x86_64 0v 1.0.9-1.el6 Complete! [root@iZwz9eczt2tstmhvm8mv25Z docker] # 4. Install docker-io

Yum install docker-io

[root@iZwz9eczt2tstmhvm8mv25Z docker] # yum install docker-ioLoaded plugins: securitySetting up Install ProcessResolving Dependencies-- > Running transaction check--- > Package docker-io.x86_64 0vir 1.7.1-2.el6 will be installed-- > Finished Dependency ResolutionDependencies Resolved==== Package Arch Version Repository Size====Installing: docker-io x86 / 64 1.7.1-2.el6 epel 4. 6 MTransaction Summary====Install 1 Package (s) Total download size: 4.6 MInstalled size: 19 MIs this ok [y Downloading Packages:docker-io-1.7.1-2.el6.x86_64.rpm]: y Downloading Packages:docker-io-1.7.1-2.el6.x86_64.rpm | 4.6 MB 00:04 Running rpm_check_debugRunning Transaction TestTransaction Test SucceededRunning Transaction Installing: docker-io-1.7.1-2.el6.x86_64 1 Verifying: docker-io-1.7.1-2.el6.x86_64 1 Installed: docker-io.x86_64 0VX 1.7.1-2.el6 Complete! [root@iZwz9eczt2tstmhvm8mv25Z docker] # 5. Start the docker process

/ etc/init.d/docker start

[root@iZwz9eczt2tstmhvm8mv25Z docker] # / etc/init.d/docker startStarting cgconfig service: [OK] Starting docker: [OK] [root@iZwz9eczt2tstmhvm8mv25Z docker] # 6. View docker processes

Ps-ef | grep docker or / etc/init.d/docker status

Unloading

Yum remove docker-io

FAQ does not start

View the startup log

Docker-d

[root@iZwz9eczt2tstmhvm8mv25Z docker] # / etc/init.d/docker statusdocker is dead, but the pid file still exists [root@iZwz9eczt2tstmhvm8mv25Z docker] # docker-dWARN [0000] You are running linux kernel version 2.6.32-573.22.1.el6.x86_64, which might be unstable running docker. Please upgrade your kernel to 3.10.0. Docker: relocation error: docker: symbol dm_task_get_info_with_deferred_remove, version Base not defined in file libdevmapper.so.1.02 with link time reference [root@iZwz9eczt2tstmhvm8mv25Z docker] #

Solution method

Installation: yum install device-mapper-event-libs

Restart and check its status

[root@iZwz9eczt2tstmhvm8mv25Z docker] # / etc/init.d/docker restart stop docker: [failed] Starting docker: [OK] [root@iZwz9eczt2tstmhvm8mv25Z docker] # / etc/init.d/docker statusdocker (pid 17162) is running. [root@iZwz9eczt2tstmhvm8mv25Z docker] # about "how to install Docker and That's all for the article "Uninstall". Hope that the above content can be helpful to you, so that you can learn more knowledge, if you think the article is good, please share it for more people to see.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report