In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-02-24 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/01 Report--
Editor to share with you how to install Docker under CentOS, I believe most people do not know much about it, so share this article for your reference, I hope you can learn a lot after reading this article, let's go to know it!
Docker is divided into CE and EE,CE versions, namely Community Edition (free), and EE, or Enterprise Edition, which emphasizes security (paid for). Docker CE releases one version of edge every month and one version of stable every three months. The Docker EE and stable version numbers are the same.
Docker CE supports the 64-bit version of CentOS 7, and requires a kernel version of no less than 3.10. CentOS meets the requirements of the minimum kernel. If the kernel version is relatively low, some features (such as overlay2 storage layer drivers) cannot be used, and some functions may be unstable.
There are three ways to install Docker CE: install it through the Docker repository, download the installation package manually, and install it automatically through a script.
Most users use the mirror source installation of the Docker repository, which is relatively easy to install and upgrade, which is also the recommended way.
Some users install manually by downloading the installation package, which is useful if you can't connect to the network, as long as you have the installation package.
In development and test environments, some users install through automatic scripts, which is also convenient, but it is not recommended in production environments. Because it may have the following risks: first, the script requires root permissions, so you need to carefully check the script before running; second, the script will try to test the version of your system and configure your package management system, other than that, the script does not allow you to customize any installation parameters. This may result in an unsupported configuration. In addition, the script will install dependent packages without confirmation, which may install a large number of packages, depending on your current host configuration; and this method can not decide which version to download, it will only install the latest version.
Install using yum sourc
Official source
$sudo yum-config-manager\-add-repo\ https://download.docker.com/linux/centos/docker-ce.repo
Domestic source
$sudo yum-config-manager\-add-repo\ https://mirrors.ustc.edu.cn/docker-ce/linux/centos/docker-ce.repo
The first step: choose one of the above two sources, generally in view of domestic network problems, usually choose domestic sources. But if you are installing Docker CE on your host for the first time, you need to set up the Docker repository first. After that, you can install and update Docker through this repository. Otherwise, the following prompt appears: sudo: yum-config-manager: command not found.
The solution is to set up the repository and install the necessary package yum-utils. This package provides the functionality of yum-config-manager. Similarly, Docker CE's devicemapper storage driver requires two other packages, device-mapper-persistent-data and lvm2. We install it together with the following command.
$sudo yum install-y yum-utils\ device-mapper-persistent-data\ lvm2
Install Docker CE
$sudo yum install docker-ce
During the installation process, you will be asked if you want to continue, just type y.
Automatically install through script
Docker officially provides a convenient set of installation scripts in a test or development environment to simplify the installation process, which can be used on CentOS systems.
$curl-fsSL get.docker.com-o get-docker.sh$ sudo sh get-docker.sh-mirror Aliyun
After executing the above command, the script automatically prepares everything and installs the edge version of Docker CE on the system.
Start Docker
The Docker installed in the first way above needs to be started manually, while the script installation starts Docker automatically. Starting Docker is also easy, with the following command $sudo systemctl start docker.
The above is all the contents of the article "how to install Docker under CentOS". Thank you for reading! I believe we all have a certain understanding, hope to share the content to help you, if you want to learn more knowledge, welcome to follow the industry information channel!
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.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.