Centos7如何离线安装Docker
发表于:2025-02-01 作者:千家信息网编辑
千家信息网最后更新 2025年02月01日,这篇文章将为大家详细讲解有关Centos7如何离线安装Docker,小编觉得挺实用的,因此分享给大家做个参考,希望大家阅读完这篇文章后可以有所收获。下载Docker并安装docker包下载地址#下载d
千家信息网最后更新 2025年02月01日Centos7如何离线安装Docker
这篇文章将为大家详细讲解有关Centos7如何离线安装Docker,小编觉得挺实用的,因此分享给大家做个参考,希望大家阅读完这篇文章后可以有所收获。
下载Docker并安装
docker包下载地址
#下载docker-20.10.0包https://download.docker.com/linux/static/stable/x86_64/docker-20.10.0.tgz#上传到Centos系统/data/目录,如scp docker-20.10.0.tgz root@192.168.0.5:/data/#进入data目录,解压docker包cd /datatar -zxvf docker-20.10.0.tgz#将解压出来的docker文件内容移动到 /usr/bin/ 目录下cp docker/* /usr/bin/#查看docker版本docker version#查看docker信息docker info
配置Docker开机自启动服务
#添加docker.service文件vi /etc/systemd/system/docker.service#按i插入模式,复制如下内容:
[Unit]Description=Docker Application Container EngineDocumentation=https://docs.docker.comAfter=network-online.target firewalld.serviceWants=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 dockerExecStart=/usr/bin/dockerdExecReload=/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=infinityLimitNPROC=infinityLimitCORE=infinity# Uncomment TasksMax if your systemd version supports it.# Only systemd 226 and above support this version.#TasksMax=infinityTimeoutStartSec=0# set delegate yes so that systemd does not reset the cgroups of docker containersDelegate=yes# kill only the docker process, not all processes in the cgroupKillMode=process# restart the docker process if it exits prematurelyRestart=on-failureStartLimitBurst=3StartLimitInterval=60s [Install]WantedBy=multi-user.target
#添加文件可执行权限chmod +x /etc/systemd/system/docker.service#重新加载配置文件systemctl daemon-reload#启动Dockersystemctl start docker#查看docker启动状态systemctl status docker#查看启动容器docker ps#设置开机自启动systemctl enable docker.service#查看docker开机启动状态 enabled:开启, disabled:关闭systemctl is-enabled docker.service
关于"Centos7如何离线安装Docker"这篇文章就分享到这里了,希望以上内容可以对大家有一定的帮助,使各位可以学到更多知识,如果觉得文章不错,请把它分享出去让更多的人看到。
文件
内容
目录
篇文章
更多
状态
配置
不错
实用
信息
地址
容器
文章
权限
模式
版本
知识
系统
参考
帮助
数据库的安全要保护哪些东西
数据库安全各自的含义是什么
生产安全数据库录入
数据库的安全性及管理
数据库安全策略包含哪些
海淀数据库安全审计系统
建立农村房屋安全信息数据库
易用的数据库客户端支持安全管理
连接数据库失败ssl安全错误
数据库的锁怎样保障安全
软件开发黄埔军校
一卡通管理数据库设置
网络安全工作座谈会讲话
数据库应用报告十五
著名网络安全培训机构
邮件网关服务器入什么费用
网络安全教育主题班会课
数据库学习 书
没有安全的网络安全电影
网络安全法要义
中小学教育与网络安全问题
服务器显示器驱动怎么安装
西安的软件开发培训
网络安全市场idc
网络安全博士信息系统安全研究
耳机主板软件开发平台有哪些
长宁区网络技术咨询流程
儿童网络安全培训软件
怎么用云服务器挂软件
EU农残数据库
学历低可以学软件开发吗
静态网页不能访问数据库吗
高平软件开发系统
服务器显示器驱动怎么安装
甘南州网络安全周
前端登录页面连接后端数据库
航空网络安全概念股
速达软件数据库软件
路由器怎么搭建服务器
网络安全周主持稿