centos系统离线安装docker和opengauss
·
查看当前的系统版本号
cat /etc/redhat-release
我的内核版本号为( docker 安装要求 Linux 内核版本在 3.10 及以上):
Linux 1 4.19.90-2106.3.0.0095.0e1.x86_64
去官网下载Docker
Docker二进制安装:从二进制文件安装 Docker 引擎 |Docker 文档
安装地址:Index of linux/static/stable/x86_64/
这里我选择的是较新的版本:28.0.4
上传成功后解压
tar -zxvf docker-26.1.3.tgz
安装
将解压出来的docker文件内容拷贝或者移动到 /usr/bin/目录下
cp docker/* /usr/bin/
然后就可以使用 docker -v 或者 docker info 命令验证是否可以输出docker信息了。因为没有开启守护进程,docker 其他命令还不能使用。所以需要编写docker.service 文件加入Linux服务当中并开启守护进程。
编辑文件: vim /etc/systemd/system/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 -H unix:///var/run/docker.sock --selinux-enabled=false --default-ulimit nofile=65536:65536
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
添加文件可执行权限
chmod +x /etc/systemd/system/docker.service
配置成功后,重新加载 daemon 服务
systemctl daemon-reload
启动 docker 服务
systemctl start docker
docker-compose安装
鲲鹏昇腾开发者社区是面向全社会开放的“联接全球计算开发者,聚合华为+生态”的社区,内容涵盖鲲鹏、昇腾资源,帮助开发者快速获取所需的知识、经验、软件、工具、算力,支撑开发者易学、好用、成功,成为核心开发者。
更多推荐

所有评论(0)