In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-04-04 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/01 Report--
This article mainly introduces "how to install Docker under Linux" related knowledge, editor through the actual case to show you the operation process, the method of operation is simple and fast, practical, I hope that this "how to install Docker under Linux" article can help you solve the problem.
1. The installation environment is installed here in Centos7. You can check the CentOS version using the following command
Lsb_release-a
Installation of docker on CentOS 7 requires 64-bit system and kernel version 3.10 or above, which can be viewed using the following command
Uname-r
2. Use yum source installation 2.1to check whether docker list is installed.
Yum list installed | grep docker
2.2 install docker
Yum-y install docker-y does not ask for installation until the installation is successful. Check the installation list again after installation.
2.3 start docker
Systemctl start docker2.4 to view docker service status
Systemctl status docker
The above indicates that docker was installed successfully.
3. Offline installation mode 3.1 installation package official address: https://download.docker.com/linux/static/stable/x86_64/
You can download it locally and then upload it to the server through the ftp tool, or use the command to download it on the server
Wget https://download.docker.com/linux/static/stable/x86_64/docker-18.06.3-ce.tgz3.2 decompression
Tar-zxvf docker-18.06.3-ce.tgz3.3 copies the extracted docker file to the / usr/bin/ directory
Cp docker/* / usr/bin/3.4 adds the docker.service file in the / etc/systemd/system/ directory as follows, so that docker can be registered as a service service
[Unit] Description=Docker Application Container Engine Documentation= https://docs.docker.com After=network-online.target firewalld.service Wants=network-online.target [Service] Type=notify # the default is not to use systemd for cgroups because the delegate issues still # exists and systemd currently does not support the cgroup feature set required # for containers run by docker ExecStart=/usr/bin/dockerd-selinux-enabled=false-insecure-registry=127.0.0.1 ExecReload=/bin/kill-s HUP $MAINPID # Having non-zero Limit*s causes performance problems due to accounting overhead # in the kernel. We recommend using cgroups to do container-local accounting. LimitNOFILE=infinity LimitNPROC=infinity LimitCORE=infinity # Uncomment TasksMax if your systemd version supports it. # Only systemd 226 and above support this version. # TasksMax=infinity TimeoutStartSec=0 # set delegate yes so that systemd does not reset the cgroups of docker containers Delegate=yes # kill only the docker process, not all processes in the cgroup KillMode=process # restart the docker process if it exits prematurely Restart=on-failure StartLimitBurst=3 StartLimitInterval=60s [Install] WantedBy=multi-user.target
The-insecure-registry=127.0.0.1 (here change to your private server ip) setting is for allowing unsecure access to the docker when you have set up your own private server Harbor, otherwise the access will be denied.
3.5 start docker
Add execution permissions to the docker.service file
Chmod + x / etc/systemd/system/docker.service reload the configuration file (reload every time the docker.service file is modified)
Systemctl daemon-reload start
Systemctl start docker setting boot up
Systemctl enable docker.service to view docker service status
Systemctl status docker
This is the end of the introduction on "how to install Docker under Linux". Thank you for reading. If you want to know more about the industry, you can follow the industry information channel. The editor will update different knowledge points for you every day.
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.