银河麒麟操作系统 v10 中离线安装 Docker

这篇具有很好参考价值的文章主要介绍了银河麒麟操作系统 v10 中离线安装 Docker。希望对大家有所帮助。如果存在错误或未考虑完全的地方,请大家不吝赐教,您也可以点击"举报违法"按钮提交疑问。

1. 查看系统版本

[root@localhost opt]# cat /etc/os-release
NAME="Kylin Linux Advanced Server"
VERSION="V10 (Lance)"
ID="kylin"
VERSION_ID="V10"
PRETTY_NAME="Kylin Linux Advanced Server V10 (Lance)"
ANSI_COLOR="0;31"
[root@localhost opt]#

2. 查看 Linux 内核版本(3.10以上)

[root@localhost opt]# uname -r
4.19.90-52.22.v2207.ky10.aarch64
[root@localhost opt]# uname -a
Linux localhost.localdomain 4.19.90-52.22.v2207.ky10.aarch64 #1 SMP Tue Mar 14 11:52:45 CST 2023 aarch64 aarch64 aarch64 GNU/Linux
[root@localhost opt]# 

3. 查看 iptabls 版本(1.4以上)

[root@localhost opt]# iptables --version
iptables v1.8.5 (legacy)

4. 判断处理器架构

[root@localhost opt]# uname -p
aarch64
[root@localhost opt]# 

可以看到,系统处理器架构为 ARM 架构;如果为 x86 架构的,则会显示 x86_64;

5. 离线下载 Docker 安装包

https://download.docker.com/linux/static/stable/
kylin linux advanced server 10 - os 0.0 b/s | 0 b 00:40 errors during downlo,【总结】,docker,容器,运维,麒麟V10,Docker,docker-compose
点进去,选择想要安装的版本,我这里为了跟测试环境保持一致,下载了一个相对旧点的版本:docker-20.10.6.tgz

下载完成后,上传至服务器 /opt 目录下,然后解压:tar -zxvf docker-20.10.6.tgz

6. 移动解压出来的二进制文件到 /usr/bin 目录中

mv docker/* /usr/bin/

然后就可以测试下Docker

[root@localhost opt]# docker -v
Docker version 20.10.6, build 370c289
[root@localhost opt]# 
[root@localhost opt]# docker version
Client:
 Version:           20.10.6
 API version:       1.41
 Go version:        go1.13.15
 Git commit:        370c289
 Built:             Fri Apr  9 22:42:28 2021
 OS/Arch:           linux/arm64
 Context:           default
 Experimental:      true
Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?
[root@localhost opt]# 

此时Docker 还没启动,只是可以看到Docker 的版本信息了。

测试 Docker 启动:

[root@localhost opt]# dockerd
INFO[2024-01-17T16:37:43.099979439+08:00] Starting up                                  
WARN[2024-01-17T16:37:43.105526753+08:00] could not change group /var/run/docker.sock to docker: group docker not found 
INFO[2024-01-17T16:37:43.107420618+08:00] libcontainerd: started new containerd process  pid=38904
INFO[2024-01-17T16:37:43.107565679+08:00] parsed scheme: "unix"                         module=grpc
INFO[2024-01-17T16:37:43.107591219+08:00] scheme "unix" not registered, fallback to default scheme  module=grpc
INFO[2024-01-17T16:37:43.107642999+08:00] ccResolverWrapper: sending update to cc: {[{unix:///var/run/docker/containerd/containerd.sock  <nil> 0 <nil>}] <nil> <nil>}  module=grpc
INFO[2024-01-17T16:37:43.107667279+08:00] ClientConn switching balancer to "pick_first"  module=grpc
INFO[2024-01-17T16:37:43.132250984+08:00] starting containerd                           revision=05f951a3781f4f2c1911b05e61c160e9c30eaa8e version=v1.4.4
INFO[2024-01-17T16:37:43.179400349+08:00] loading plugin "io.containerd.content.v1.content"...  type=io.containerd.content.v1
INFO[2024-01-17T16:37:43.179620610+08:00] loading plugin "io.containerd.snapshotter.v1.aufs"...  type=io.containerd.snapshotter.v1
INFO[2024-01-17T16:37:43.183035159+08:00] loading plugin "io.containerd.snapshotter.v1.btrfs"...  type=io.containerd.snapshotter.v1
INFO[2024-01-17T16:37:43.183499360+08:00] skip loading plugin "io.containerd.snapshotter.v1.btrfs"...  error="path /var/lib/docker/containerd/daemon/io.containerd.snapshotter.v1.btrfs (xfs) must be a btrfs filesystem to be used with the btrfs snapshotter: skip plugin" type=io.containerd.snapshotter.v1
INFO[2024-01-17T16:37:43.183991662+08:00] loading plugin "io.containerd.snapshotter.v1.devmapper"...  type=io.containerd.snapshotter.v1
WARN[2024-01-17T16:37:43.184090582+08:00] failed to load plugin io.containerd.snapshotter.v1.devmapper  error="devmapper not configured"
INFO[2024-01-17T16:37:43.184142322+08:00] loading plugin "io.containerd.snapshotter.v1.native"...  type=io.containerd.snapshotter.v1
INFO[2024-01-17T16:37:43.184627063+08:00] loading plugin "io.containerd.snapshotter.v1.overlayfs"...  type=io.containerd.snapshotter.v1
INFO[2024-01-17T16:37:43.184991004+08:00] loading plugin "io.containerd.snapshotter.v1.zfs"...  type=io.containerd.snapshotter.v1
INFO[2024-01-17T16:37:43.185386025+08:00] skip loading plugin "io.containerd.snapshotter.v1.zfs"...  error="path /var/lib/docker/containerd/daemon/io.containerd.snapshotter.v1.zfs must be a zfs filesystem to be used with the zfs snapshotter: skip plugin" type=io.containerd.snapshotter.v1
INFO[2024-01-17T16:37:43.185426025+08:00] loading plugin "io.containerd.metadata.v1.bolt"...  type=io.containerd.metadata.v1
WARN[2024-01-17T16:37:43.185509726+08:00] could not use snapshotter devmapper in metadata plugin  error="devmapper not configured"
INFO[2024-01-17T16:37:43.185534686+08:00] metadata content store policy set             policy=shared
INFO[2024-01-17T16:37:43.192321664+08:00] loading plugin "io.containerd.differ.v1.walking"...  type=io.containerd.differ.v1
INFO[2024-01-17T16:37:43.192369284+08:00] loading plugin "io.containerd.gc.v1.scheduler"...  type=io.containerd.gc.v1
INFO[2024-01-17T16:37:43.192454304+08:00] loading plugin "io.containerd.service.v1.introspection-service"...  type=io.containerd.service.v1
INFO[2024-01-17T16:37:43.192522964+08:00] loading plugin "io.containerd.service.v1.containers-service"...  type=io.containerd.service.v1
INFO[2024-01-17T16:37:43.192558844+08:00] loading plugin "io.containerd.service.v1.content-service"...  type=io.containerd.service.v1
INFO[2024-01-17T16:37:43.192588405+08:00] loading plugin "io.containerd.service.v1.diff-service"...  type=io.containerd.service.v1
INFO[2024-01-17T16:37:43.192619525+08:00] loading plugin "io.containerd.service.v1.images-service"...  type=io.containerd.service.v1
INFO[2024-01-17T16:37:43.192649145+08:00] loading plugin "io.containerd.service.v1.leases-service"...  type=io.containerd.service.v1
INFO[2024-01-17T16:37:43.192680805+08:00] loading plugin "io.containerd.service.v1.namespaces-service"...  type=io.containerd.service.v1
INFO[2024-01-17T16:37:43.192713545+08:00] loading plugin "io.containerd.service.v1.snapshots-service"...  type=io.containerd.service.v1
INFO[2024-01-17T16:37:43.192742805+08:00] loading plugin "io.containerd.runtime.v1.linux"...  type=io.containerd.runtime.v1
INFO[2024-01-17T16:37:43.192931185+08:00] loading plugin "io.containerd.runtime.v2.task"...  type=io.containerd.runtime.v2
INFO[2024-01-17T16:37:43.193127946+08:00] loading plugin "io.containerd.monitor.v1.cgroups"...  type=io.containerd.monitor.v1
INFO[2024-01-17T16:37:43.193782948+08:00] loading plugin "io.containerd.service.v1.tasks-service"...  type=io.containerd.service.v1
INFO[2024-01-17T16:37:43.193849968+08:00] loading plugin "io.containerd.internal.v1.restart"...  type=io.containerd.internal.v1
INFO[2024-01-17T16:37:43.193969348+08:00] loading plugin "io.containerd.grpc.v1.containers"...  type=io.containerd.grpc.v1
INFO[2024-01-17T16:37:43.194002468+08:00] loading plugin "io.containerd.grpc.v1.content"...  type=io.containerd.grpc.v1
INFO[2024-01-17T16:37:43.194032788+08:00] loading plugin "io.containerd.grpc.v1.diff"...  type=io.containerd.grpc.v1
INFO[2024-01-17T16:37:43.194063708+08:00] loading plugin "io.containerd.grpc.v1.events"...  type=io.containerd.grpc.v1
INFO[2024-01-17T16:37:43.194096109+08:00] loading plugin "io.containerd.grpc.v1.healthcheck"...  type=io.containerd.grpc.v1
INFO[2024-01-17T16:37:43.194130489+08:00] loading plugin "io.containerd.grpc.v1.images"...  type=io.containerd.grpc.v1
INFO[2024-01-17T16:37:43.194159349+08:00] loading plugin "io.containerd.grpc.v1.leases"...  type=io.containerd.grpc.v1
INFO[2024-01-17T16:37:43.194188669+08:00] loading plugin "io.containerd.grpc.v1.namespaces"...  type=io.containerd.grpc.v1
INFO[2024-01-17T16:37:43.194216589+08:00] loading plugin "io.containerd.internal.v1.opt"...  type=io.containerd.internal.v1
INFO[2024-01-17T16:37:43.194398649+08:00] loading plugin "io.containerd.grpc.v1.snapshots"...  type=io.containerd.grpc.v1
INFO[2024-01-17T16:37:43.194442309+08:00] loading plugin "io.containerd.grpc.v1.tasks"...  type=io.containerd.grpc.v1
INFO[2024-01-17T16:37:43.194473650+08:00] loading plugin "io.containerd.grpc.v1.version"...  type=io.containerd.grpc.v1
INFO[2024-01-17T16:37:43.194501590+08:00] loading plugin "io.containerd.grpc.v1.introspection"...  type=io.containerd.grpc.v1
INFO[2024-01-17T16:37:43.194767270+08:00] serving...                                    address=/var/run/docker/containerd/containerd-debug.sock
INFO[2024-01-17T16:37:43.194847951+08:00] serving...                                    address=/var/run/docker/containerd/containerd.sock.ttrpc
INFO[2024-01-17T16:37:43.194907571+08:00] serving...                                    address=/var/run/docker/containerd/containerd.sock
INFO[2024-01-17T16:37:43.194936211+08:00] containerd successfully booted in 0.063779s  
INFO[2024-01-17T16:37:43.203435713+08:00] parsed scheme: "unix"                         module=grpc
INFO[2024-01-17T16:37:43.203476293+08:00] scheme "unix" not registered, fallback to default scheme  module=grpc
INFO[2024-01-17T16:37:43.203514214+08:00] ccResolverWrapper: sending update to cc: {[{unix:///var/run/docker/containerd/containerd.sock  <nil> 0 <nil>}] <nil> <nil>}  module=grpc
INFO[2024-01-17T16:37:43.203535454+08:00] ClientConn switching balancer to "pick_first"  module=grpc
INFO[2024-01-17T16:37:43.204550216+08:00] parsed scheme: "unix"                         module=grpc
INFO[2024-01-17T16:37:43.204590876+08:00] scheme "unix" not registered, fallback to default scheme  module=grpc
INFO[2024-01-17T16:37:43.204625736+08:00] ccResolverWrapper: sending update to cc: {[{unix:///var/run/docker/containerd/containerd.sock  <nil> 0 <nil>}] <nil> <nil>}  module=grpc
INFO[2024-01-17T16:37:43.204647717+08:00] ClientConn switching balancer to "pick_first"  module=grpc
INFO[2024-01-17T16:37:43.261073806+08:00] Loading containers: start.                   
INFO[2024-01-17T16:37:43.841747309+08:00] Default bridge (docker0) is assigned with an IP address 172.17.0.0/16. Daemon option --bip can be used to set a preferred IP address 
INFO[2024-01-17T16:37:43.942240656+08:00] Firewalld: interface docker0 already part of docker zone, returning 
INFO[2024-01-17T16:37:44.034537461+08:00] Loading containers: done.                    
INFO[2024-01-17T16:37:44.071730559+08:00] Docker daemon                                 commit=8728dd2 graphdriver(s)=overlay2 version=20.10.6
INFO[2024-01-17T16:37:44.071914980+08:00] Daemon has completed initialization          
INFO[2024-01-17T16:37:44.123180096+08:00] API listen on /var/run/docker.sock           

可以看到 docker 可以正常启动,不过当前是在窗口中手动启动的,Ctrl + C,杀掉就好。

^CINFO[2024-01-17T16:38:04.425317678+08:00] Processing signal 'interrupt'                
INFO[2024-01-17T16:38:04.426455381+08:00] stopping event stream following graceful shutdown  error="<nil>" module=libcontainerd namespace=moby
INFO[2024-01-17T16:38:04.426832962+08:00] Daemon shutdown complete                     
INFO[2024-01-17T16:38:04.426861062+08:00] stopping healthcheck following graceful shutdown  module=libcontainerd
INFO[2024-01-17T16:38:04.426897042+08:00] stopping event stream following graceful shutdown  error="context canceled" module=libcontainerd namespace=plugins.moby

7. 配置 Docker 服务

7.1 编辑 docker 的系统服务文件

vi /usr/lib/systemd/system/docker.service

7.2 将下面的内容复制到刚创建的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
ExecStart=/usr/bin/dockerd
ExecReload=/bin/kill -s HUP $MAINPID
LimitNOFILE=infinity
LimitNPROC=infinity
TimeoutStartSec=0
Delegate=yes
KillMode=process
Restart=on-failure
StartLimitBurst=3
StartLimitInterval=60s
[Install]
WantedBy=multi-user.target

7.3 为docker.service添加执行权限

chmod +x /usr/lib/systemd/system/docker.service

7.4 编辑daemon.json

vi /etc/docker/daemon.json

并添加以下内容:

{
  "registry-mirrors": ["https://registry.docker-cn.com"],
  "exec-opts": ["native.cgroupdriver=systemd"]
}

保存后,执行:systemctl daemon-reload

7.5 启动 Docker

[root@localhost opt]# systemctl start docker
[root@localhost opt]# 
[root@localhost opt]# docker ps 
CONTAINER ID   IMAGE     COMMAND   CREATED   STATUS    PORTS     NAMES
[root@localhost opt]# 
[root@localhost opt]# docker -v
Docker version 20.10.6, build 370c289
[root@localhost opt]# 
[root@localhost opt]# docker info
Client:
 Context:    default
 Debug Mode: false

Server:
 Containers: 0
  Running: 0
  Paused: 0
  Stopped: 0
 Images: 0
 Server Version: 20.10.6
 Storage Driver: overlay2
  Backing Filesystem: xfs
  Supports d_type: true
  Native Overlay Diff: true
  userxattr: false
 Logging Driver: json-file
 Cgroup Driver: cgroupfs
 Cgroup Version: 1
 Plugins:
  Volume: local
  Network: bridge host ipvlan macvlan null overlay
  Log: awslogs fluentd gcplogs gelf journald json-file local logentries splunk syslog
 Swarm: inactive
 Runtimes: io.containerd.runtime.v1.linux runc io.containerd.runc.v2
 Default Runtime: runc
 Init Binary: docker-init
 containerd version: 05f951a3781f4f2c1911b05e61c160e9c30eaa8e
 runc version: 
 init version: de40ad0
 Security Options:
  seccomp
   Profile: default
 Kernel Version: 4.19.90-52.22.v2207.ky10.aarch64
 Operating System: Kylin Linux Advanced Server V10 (Lance)
 OSType: linux
 Architecture: aarch64
 CPUs: 64
 Total Memory: 252.8GiB
 Name: localhost.localdomain
 ID: JRHZ:QLCB:TIJQ:KEM4:Z56J:TFJN:WAAG:BT4T:S2IC:XVOM:VZNS:TU6U
 Docker Root Dir: /var/lib/docker
 Debug Mode: false
 Registry: https://index.docker.io/v1/
 Labels:
 Experimental: false
 Insecure Registries:
  127.0.0.0/8
 Live Restore Enabled: false
 Product License: Community Engine

[root@localhost opt]# 

正常启动。

7.6 添加开机自动启动

systemctl enable docker

Docker 安装 参考: https://blog.csdn.net/qq_30665009/article/details/125938033

8. 安装 docker-compose

直接 GitHub 下载:docker/compose 选择自己喜欢的版本,这里直接拉满,下载当前最新的版本:v2.24.0
kylin linux advanced server 10 - os 0.0 b/s | 0 b 00:40 errors during downlo,【总结】,docker,容器,运维,麒麟V10,Docker,docker-compose
这里根据自己的架构,选择对应的包,下载就好了。

cp docker-compose-linux-aarch64  /usr/local/bin/docker-compose
chmod +x /usr/local/bin/docker-compose

查看版本文章来源地址https://www.toymoban.com/news/detail-818559.html

[root@localhost opt]# docker-compose -v
Docker Compose version v2.24.0
[root@localhost opt]# 

到了这里,关于银河麒麟操作系统 v10 中离线安装 Docker的文章就介绍完了。如果您还想了解更多内容,请在右上角搜索TOY模板网以前的文章或继续浏览下面的相关文章,希望大家以后多多支持TOY模板网!

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处: 如若内容造成侵权/违法违规/事实不符,请点击违法举报进行投诉反馈,一经查实,立即删除!

领支付宝红包 赞助服务器费用

相关文章

  • 银河麒麟高级服务器操作系统 V10 安装手册

    银河麒麟高级服务器操作系统 V10 安装手册 本手册适用于 银河麒麟高级服务操作系统V10SP系列版本(包含SP1、SP2、SP3等) 第一章 概述 本手册面向系统管理员及相关技术人员,实现在服务器整机上使用图形化界面快速完成银河麒麟高级服务器操作系统 V10(以下简称“银河麒

    2024年03月15日
    浏览(81)
  • 银河麒麟高级服务器操作系统 V10 版本安装教程

    随着国产化以及信创(信息技术应用创新)的不断推进,国产操作系统的发展和应用趋势越来越好,银河麒麟就是国产操作系统中的优秀代表。关于银河麒麟的前世今生,大家可以看下百度百科关于银河麒麟的介绍。 本文主要是基于 VMware 虚拟机安装银河麒麟高级服务器 V1

    2024年02月04日
    浏览(77)
  • vmware安装银河麒麟V10高级服务器操作系统

    官方提供使用通道 访问官网 链接: https://www.kylinos.cn/ 下拉到页面最底部 点击产品试用申请 输入申请信息 根据用户类型选择 个人用户试用选个人就行 输入手机号 获取验证码 输入验证码后 会跳转到镜像下载界面 跳转到镜像下载界面 如下 选择银河麒麟高级服务器操作系统

    2024年02月02日
    浏览(67)
  • 银河麒麟V10操作系统(aarch64架构)部署mysql

    1.解压 2.安装必须软件(务必根据顺序) 3.修改配置文件 在末尾补一行: 4.初始化数据库 5.目录授权 6.启动mysql服务 7.编辑下环境变量 末尾加上一行: 8.查看临时密码 9.用临时密码登录 10.修改密码  navicat远程连接报错 1251 client does not support authentication protocol requested by server;c

    2024年02月09日
    浏览(67)
  • 银河麒麟v10操作系统之 mysql 5.7 手动安装

    官网下载地址:https://dev.mysql.com/downloads/mysql/ 打开 https://dev.mysql.com/downloads/mysql/,默认显示的是最新版MySQL8,需要我们点击查看其他版本。  或者也可以这样。 我图省事直接按上图操作了哈。  接下来看图操作  根据自己的系统位数去选择,Linux系统输入  getconf LONG_BIT 命令

    2024年02月09日
    浏览(53)
  • 银河麒麟V10服务器操作系统网卡自启动配置

    背景:公司因为项目变更,使用国产服务器。因为第一次使用,在其中遇到的问题,与诸君分享。 问题现象:         服务器重启开机网卡不自动启动问题。需要手动点击一下,才能启动网卡。 现象图:   解决方案:  修改网卡配置文件,设置为开机自启动就可以解决

    2024年03月16日
    浏览(142)
  • window10下安装银河麒麟高级服务器操作系统(飞腾版)V10

     坑:我们经常使用的电脑CPU是x86架构的,然后我们安装x86架构的64位处理器的操作系统直接使用VMware等虚拟软件进行虚拟,而对与不同的CPU架构的arm架构的操作系统,可以使用QEMU模拟器模拟一个arm环境 2.1 下载QEMU软件 QEMU模拟器安装包 2.2 下载UEFI(BIOS的替代方案) UEFI下载

    2024年02月07日
    浏览(75)
  • VMware 安装 银河麒麟高级服务器操作系统 V10 版本教程

    目录 VMware 安装 银河麒麟高级服务器操作系统 V10 版本教程 银河麒麟的前世今生 安装过程 银河麒麟(KylinOS)原是在“863计划”和国家核高基科技重大专项支持下,国防科技大学研发的操作系统,后由国防科技大学将品牌授权给天津麒麟,后者在2019年与中标软件合并为麒麟软

    2024年02月02日
    浏览(96)
  • 银河麒麟桌面操作系统V10SP1修复boot分区

    一、问题现象 机器重启无法进入系统,出现“Loading initial ramdisk”界面,此时可能是boot文件损坏,导致无法进入系统 二、boot分区修复 1、准备一个与主机相同系统版本的系统启动盘 2、将U盘插入主机,进入bios将光盘(或U盘启动盘)设置为第一启动项 -- 开机选择“试用银河

    2024年02月11日
    浏览(251)
  • 银河麒麟高级服务器操作系统V10下载安装及安装docker

    银河麒麟操作系统v10是中国电子研发的操作系统,该系统充分适应5G时代需求,打通手机、平板电脑、PC等,实现多端融合。 x86/兆芯/海光 Kylin-Server-10-SP2-x86-Release-Build09-20210524.iso 链接:https://pan.baidu.com/s/16sa8sumcJzXI95ip9gwptg 提取码:wxyu arm64/飞腾/鲲鹏 Kylin-Server-10-SP2-aarch64-Rel

    2024年01月16日
    浏览(89)

觉得文章有用就打赏一下文章作者

支付宝扫一扫打赏

博客赞助

微信扫一扫打赏

请作者喝杯咖啡吧~博客赞助

支付宝扫一扫领取红包,优惠每天领

二维码1

领取红包

二维码2

领红包