首页
留言
导航
统计
Search
1
追番推荐!免费看动漫的网站 - 支持在线观看和磁力下载
2,510 阅读
2
推荐31个docker应用,每一个都很实用
1,311 阅读
3
PVE自动启动 虚拟机 | 容器 顺序设置及参数说明
931 阅读
4
一条命令,永久激活!Office 2024!
618 阅读
5
优选 Cloudflare 官方 / 中转 IP
490 阅读
默认分类
服务器
宝塔
VPS
Docker
OpenWRT
Nginx
群晖
前端编程
Vue
React
Angular
NodeJS
uni-app
后端编程
Java
Python
SpringBoot
SpringCloud
流程引擎
检索引擎
Linux
CentOS
Ubuntu
Debian
数据库
Redis
MySQL
Oracle
虚拟机
VMware
VirtualBox
PVE
Hyper-V
计算机
网络技术
网站源码
主题模板
登录
Search
标签搜索
Java
小程序
Redis
SpringBoot
docker
Typecho
Cloudflare
docker部署
虚拟机
WordPress
群晖
uni-app
CentOS
Vue
Java类库
Linux命令
防火墙配置
Mysql
脚本
Nginx
微醺
累计撰写
264
篇文章
累计收到
11
条评论
首页
栏目
默认分类
服务器
宝塔
VPS
Docker
OpenWRT
Nginx
群晖
前端编程
Vue
React
Angular
NodeJS
uni-app
后端编程
Java
Python
SpringBoot
SpringCloud
流程引擎
检索引擎
Linux
CentOS
Ubuntu
Debian
数据库
Redis
MySQL
Oracle
虚拟机
VMware
VirtualBox
PVE
Hyper-V
计算机
网络技术
网站源码
主题模板
页面
留言
导航
统计
搜索到
11
篇与
的结果
2023-02-16
CentOS7离线安装Docker和卸载Docker步骤(亲测有效)
一、CentOS7离线安装 Docker 步骤1、docker 安装包下载地址https://download.docker.com/linux/static/stable/x86_64/2、将下载的 docker-18.06.3-ce.tgz 文件上传到 Centos7 服务器上(如上传到 /home/docker 目录下),并执行 tar 命令解压,如下图:tar -zxvf docker-18.06.3-ce.tgz3、将/home/docker 目录下解压出来的所有 docker 文件复制到 /usr/bin/ 目录下cp docker/* /usr/bin/4、将 docker 注册为 service,进入/etc/systemd/system/目录,并创建 docker.service 文件cd /etc/systemd/system/touch docker.service5、编辑 docker.service 文件,将以下内容复制到 docker.service 文件中注:以下内容中 --insecure-registry=192.168.3.10 此处改为你自己服务器 ipvim docker.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=192.168.3.10 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.target6、给 docker.service 文件添加执行权限chmod 777 /etc/systemd/system/docker.service7、重新加载配置文件注:每次修改 docker.service 这个文件时都要重新加载下。systemctl daemon-reload8、启动 Docker 服务systemctl start docker9、设置开机启动 Docker 服务systemctl enable docker.service10、验证 docker 是否启动成功查看 Docker 状态,显示 active(running)表示启动成功systemctl status docker查看 Docker 版本docker -v11、配置镜像加速器,默认是到国外拉取镜像速度慢,如下图:编辑 /etc/docker/目录下的 daemon.json 文件,将以下内容复制到 daemon.json 文件中vim /etc/docker/daemon.json{"registry-mirrors": ["http://hub-mirror.c.163.com"]}重启 docker,使其 daemon.json 文件配置生效service docker restart二、CentOS7 离线卸载Docker步骤1、删除服务取消开机自启systemctl disable docker取消注册文件rm -rf /etc/systemd/system/docker.service2、删除命令rm -rf /usr/bin/containerd rm -rf /usr/bin/containerd-shim rm -rf /usr/bin/ctr rm -rf /usr/bin/runc rm -rf /usr/bin/docker*3、删除配置rm -rf /etc/docker/4、删除镜像或容器rm -rf /var/lib/docker
2023年02月16日
75 阅读
0 评论
0 点赞
1
2