首页 > 其他分享 >36_综合演示

36_综合演示

时间:2024-03-13 10:57:59浏览次数:22  
标签:ago 演示 14 minutes 36 15 docker root 综合


1. 安装依赖包
yum-config-manager --add-repo https://mirrors.aliyun.com/docker-ce/linux/centos/docker-ce.repo
2. 配置 docker 源
~]# yum-config-manager --add-repo https://mirrors.aliyun.com/docker-ce/linux/centos/docker-ce.repo

# 查看源是否配置上 docker-ce.repo
~]# cd /etc/yum.repos.d
yum.repos.d]# ls
bak  centos-addons.repo  centos.repo  docker-ce.repo

# 修改源地址
~]# sed -i 's+download.docker.com+mirrors.aliyun.com/docker-ce+' /etc/yum.repos.d/docker-ce.repo

# 安装Docker
~]# yum -y install docker-ce

# 启动docker
~]# systemctl enable docker && systemctl start docker

# 查看docker服务状态
~]# systemctl status docker
● docker.service - Docker Application Container Engine
     Loaded: loaded (/usr/lib/systemd/system/docker.service; enabled; preset: disabled)
     Active: active (running) since Mon 2024-02-26 21:11:02 CST; 52s ago
TriggeredBy: ● docker.socket
       Docs: https://docs.docker.com
   Main PID: 10609 (dockerd)
      Tasks: 17
     Memory: 37.9M
        CPU: 739ms
     CGroup: /system.slice/docker.service
             └─10609 /usr/bin/dockerd -H fd:// --containerd=/run/containerd/containerd.sock

# 配置镜像加速
[root@docker ~]# cat >/etc/docker/daemon.json <<EOF
{
"registry-mirrors":[
   "https://bhtknto5.mirror.aliyuncs.com",
   "https://yo3sdl2l.mirror.aliyuncs.com",
   "https://blkjc4x3.mirror.aliyuncs.com",
   "https://gfmnzvu1.mirror.aliyuncs.com",
   "https://yxzrazem.mirror.aliyuncs.com",
   "http://hub-mirror.c.163.com",
   "https://registry.docker-cn.com",
   "https://docker.mirrors.ustc.edu.cn"
   ],
   "exec-opts": ["native.cgroupdriver=systemd"]
}
EOF
[root@docker ~]#
[root@docker ~]# cat /etc/docker/daemon.json
{
"registry-mirrors":[
   "https://bhtknto5.mirror.aliyuncs.com",
   "https://yo3sdl2l.mirror.aliyuncs.com",
   "https://blkjc4x3.mirror.aliyuncs.com",
   "https://gfmnzvu1.mirror.aliyuncs.com",
   "https://yxzrazem.mirror.aliyuncs.com",
   "http://hub-mirror.c.163.com",
   "https://registry.docker-cn.com",
   "https://docker.mirrors.ustc.edu.cn"
   ],
   "exec-opts": ["native.cgroupdriver=systemd"]
}
# 重启使配置生效
[root@docker ~]# systemctl daemon-reload
[root@docker ~]# systemctl restart docker

# 查看docker自动生成的网桥
[root@docker ~]# ifconfig
docker0: flags=4099<UP,BROADCAST,MULTICAST>  mtu 1500
        inet 172.17.0.1  netmask 255.255.0.0  broadcast 172.17.255.255
        ether 02:42:f1:e3:a5:88  txqueuelen 0  (Ethernet)
        RX packets 0  bytes 0 (0.0 B)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 0  bytes 0 (0.0 B)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0
2.常用命令
# 查看docker概要信息
docker info

# 查看docker镜像
~]# docker images

# 下载一个镜像 比如:centos:7
[root@docker ~]# docker pull centos:7
7: Pulling from library/centos
2d473b07cdd5: Pull complete
Digest: sha256:9d4bcbbb213dfd745b58be38b13b996ebb5ac315fe75711bd618426a630e0987
Status: Downloaded newer image for centos:7
docker.io/library/centos:7
[root@docker ~]#
[root@docker ~]# docker images
REPOSITORY   TAG       IMAGE ID       CREATED       SIZE
centos       7         eeb6ee3f44bd   2 years ago   204MB

# 使用镜像,创建一个虚拟机(容器)
[root@docker ~]# docker images
REPOSITORY   TAG       IMAGE ID       CREATED       SIZE
centos       7         eeb6ee3f44bd   2 years ago   204MB

# it => 表示交互模式, rm => 表示退出容器的时候自动删除容器, centos:7 镜像名字:TAG, /bin/bash 容器的运行shell环境(ls,mv,cp)
[root@docker ~]# docker run -it --rm centos:7 /bin/bash
[root@11b92ff9a123 /]# ls
anaconda-post.log  bin  dev  etc  home  lib  lib64  media  mnt  opt  proc  root  run  sbin  srv  sys  tmp  usr  var
[root@11b92ff9a123 /]# ls /root/
anaconda-ks.cfg
[root@11b92ff9a123 /]# cat /etc/os-release
NAME="CentOS Linux"
VERSION="7 (Core)"
ID="centos"
ID_LIKE="rhel fedora"
VERSION_ID="7"
PRETTY_NAME="CentOS Linux 7 (Core)"
ANSI_COLOR="0;31"
CPE_NAME="cpe:/o:centos:centos:7"
HOME_URL="https://www.centos.org/"
BUG_REPORT_URL="https://bugs.centos.org/"

CENTOS_MANTISBT_PROJECT="CentOS-7"
CENTOS_MANTISBT_PROJECT_VERSION="7"
REDHAT_SUPPORT_PRODUCT="centos"
REDHAT_SUPPORT_PRODUCT_VERSION="7"


# 使用新镜像ubuntu18,后台模式运行容器
[root@docker ~]# docker pull ubuntu:20.04
20.04: Pulling from library/ubuntu
7b1a6ab2e44d: Pull complete
Digest: sha256:626ffe58f6e7566e00254b638eb7e0f3b11d4da9675088f4781a50ae288f3322
Status: Downloaded newer image for ubuntu:20.04
docker.io/library/ubuntu:20.04
[root@docker ~]# docker images
REPOSITORY   TAG       IMAGE ID       CREATED       SIZE
ubuntu       20.04     ba6acccedd29   2 years ago   72.8MB
centos       7         eeb6ee3f44bd   2 years ago   204MB

[root@docker ~]# docker run -it -d ubuntu:20.04 /bin/bash # 后台运行模式
07067ffcd9d5ecfbdf4d969f549ac018ca965e3ff33d408ad899819a8c37d8e6
[root@docker ~]#
[root@docker ~]# docker ps # 查看正在运行的容器 -a => 查看所有运行的或者关机的容器
CONTAINER ID   IMAGE          COMMAND       CREATED         STATUS         PORTS     NAMES
07067ffcd9d5   ubuntu:20.04   "/bin/bash"   4 seconds ago   Up 3 seconds             gallant_volhard
[root@docker ~]#
[root@docker ~]# docker exec -it 07067ffcd9d5 /bin/bash # 进入后台运行的容器
root@07067ffcd9d5:/#
root@07067ffcd9d5:/#
root@07067ffcd9d5:/#
root@07067ffcd9d5:/#
root@07067ffcd9d5:/# cat /etc/os-release
NAME="Ubuntu"
VERSION="20.04.3 LTS (Focal Fossa)"
ID=ubuntu
ID_LIKE=debian
PRETTY_NAME="Ubuntu 20.04.3 LTS"
VERSION_ID="20.04"
HOME_URL="https://www.ubuntu.com/"
SUPPORT_URL="https://help.ubuntu.com/"
BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/"
PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy"
VERSION_CODENAME=focal
UBUNTU_CODENAME=focal
root@07067ffcd9d5:/# ls
bin  boot  dev  etc  home  lib  lib32  lib64  libx32  media  mnt  opt  proc  root  run  sbin  srv  sys  tmp  usr  var
root@07067ffcd9d5:/#
root@07067ffcd9d5:/# exit  # 退出容器
exit
[root@docker ~]# docker ps # 容器依然运行着
CONTAINER ID   IMAGE          COMMAND       CREATED          STATUS          PORTS     NAMES
07067ffcd9d5   ubuntu:20.04   "/bin/bash"   54 seconds ago   Up 53 seconds             gallant_volhard

# 启动mysql容器
[root@docker ~]# docker pull mysql
Using default tag: latest
latest: Pulling from library/mysql
72a69066d2fe: Pull complete
93619dbc5b36: Pull complete
99da31dd6142: Pull complete
626033c43d70: Pull complete
37d5d7efb64e: Pull complete
ac563158d721: Pull complete
d2ba16033dad: Pull complete
688ba7d5c01a: Pull complete
00e060b6d11d: Pull complete
1c04857f594f: Pull complete
4d7cfa90e6ea: Pull complete
e0431212d27d: Pull complete
Digest: sha256:e9027fe4d91c0153429607251656806cc784e914937271037f7738bd5b8e7709
Status: Downloaded newer image for mysql:latest
docker.io/library/mysql:latest
[root@docker ~]#
[root@docker ~]# docker images
REPOSITORY   TAG       IMAGE ID       CREATED       SIZE
mysql        latest    3218b38490ce   2 years ago   516MB
ubuntu       20.04     ba6acccedd29   2 years ago   72.8MB
centos       7         eeb6ee3f44bd   2 years ago   204MB

[root@docker ~]# docker run -e MYSQL_ROOT_PASSWORD=root -d mysql:latest
d89bec2b9c711dff7586454725e74af74a6bf3f9e56d767d96d77f53b215fe7f
[root@docker ~]#
[root@docker ~]# docker ps
CONTAINER ID   IMAGE          COMMAND                  CREATED          STATUS          PORTS                 NAMES
d89bec2b9c71   mysql:latest   "docker-entrypoint.s…"   3 seconds ago    Up 3 seconds    3306/tcp, 33060/tcp   laughing_hypatia
07067ffcd9d5   ubuntu:20.04   "/bin/bash"              13 minutes ago   Up 13 minutes                         gallant_volhard
[root@docker ~]#
[root@docker ~]# docker exec -it d89bec2b9c71 /bin/bash
root@d89bec2b9c71:/#
root@d89bec2b9c71:/# mysql -uroot -proot
mysql: [Warning] Using a password on the command line interface can be insecure.
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 8
Server version: 8.0.27 MySQL Community Server - GPL

Copyright (c) 2000, 2021, Oracle and/or its affiliates.

Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

mysql> show databases;
+--------------------+
| Database           |
+--------------------+
| information_schema |
| mysql              |
| performance_schema |
| sys                |
+--------------------+
4 rows in set (0.01 sec)

mysql>

# 创建一个nginx容器
[root@docker ~]# docker pull nginx
Using default tag: latest
latest: Pulling from library/nginx
a2abf6c4d29d: Pull complete
a9edb18cadd1: Pull complete
589b7251471a: Pull complete
186b1aaa4aa6: Pull complete
b4df32aa5a72: Pull complete
a0bcbecc962e: Pull complete
Digest: sha256:0d17b565c37bcbd895e9d92315a05c1c3c9a29f762b011a10c54a66cd53c9b31
Status: Downloaded newer image for nginx:latest
docker.io/library/nginx:latest
[root@docker ~]# docker images
REPOSITORY   TAG       IMAGE ID       CREATED       SIZE
nginx        latest    605c77e624dd   2 years ago   141MB
mysql        latest    3218b38490ce   2 years ago   516MB
ubuntu       20.04     ba6acccedd29   2 years ago   72.8MB
centos       7         eeb6ee3f44bd   2 years ago   204MB
[root@docker ~]#
[root@docker ~]# docker run -it -d -p 10082:80 nginx:latest /bin/bash
c271ced3148106d01f52ab6f653b22fc916c53090fa5c6289ac967c09abc1923
[root@docker ~]#
[root@docker ~]# docker ps -a
CONTAINER ID   IMAGE          COMMAND                  CREATED          STATUS          PORTS                                     NAMES
c271ced31481   nginx:latest   "/docker-entrypoint.…"   7 seconds ago    Up 5 seconds    0.0.0.0:10082->80/tcp, :::10082->80/tcp   inspiring_cray
d89bec2b9c71   mysql:latest   "docker-entrypoint.s…"   7 minutes ago    Up 7 minutes    3306/tcp, 33060/tcp                       laughing_hypatia
07067ffcd9d5   ubuntu:20.04   "/bin/bash"              21 minutes ago   Up 21 minutes                                             gallant_volhard
[root@docker ~]#
[root@docker ~]# docker exec -it c271ced31481 /bin/bash
root@c271ced31481:/# echo "This is my web" > /usr/share/nginx/html/index.html
root@c271ced31481:/# nginx start
nginx: invalid option: "start"
root@c271ced31481:/# nginx
2024/02/26 14:12:25 [notice] 14#14: using the "epoll" event method
2024/02/26 14:12:25 [notice] 14#14: nginx/1.21.5
2024/02/26 14:12:25 [notice] 14#14: built by gcc 10.2.1 20210110 (Debian 10.2.1-6)
2024/02/26 14:12:25 [notice] 14#14: OS: Linux 5.14.0-375.el9.x86_64
2024/02/26 14:12:25 [notice] 14#14: getrlimit(RLIMIT_NOFILE): 1073741816:1073741816
2024/02/26 14:12:25 [notice] 15#15: start worker processes
2024/02/26 14:12:25 [notice] 15#15: start worker process 16
root@c271ced31481:/# 2024/02/26 14:12:25 [notice] 15#15: start worker process 17
2024/02/26 14:12:25 [notice] 15#15: start worker process 18
2024/02/26 14:12:25 [notice] 15#15: start worker process 19
2024/02/26 14:12:25 [notice] 15#15: start worker process 20
2024/02/26 14:12:25 [notice] 15#15: start worker process 21
2024/02/26 14:12:25 [notice] 15#15: start worker process 22
2024/02/26 14:12:25 [notice] 15#15: start worker process 23
2024/02/26 14:12:25 [notice] 15#15: start worker process 24
2024/02/26 14:12:25 [notice] 15#15: start worker process 25
2024/02/26 14:12:25 [notice] 15#15: start worker process 26
2024/02/26 14:12:25 [notice] 15#15: start worker process 27

# 宿主机查看nginx
[root@docker ~]# curl 127.0.0.1:10082
This is my web

# 物理机浏览器直接访问 
http://10.1.1.11:10082/

# 停止/删除容器
[root@docker ~]# docker ps -a
CONTAINER ID   IMAGE          COMMAND                  CREATED          STATUS          PORTS                                     NAMES
c271ced31481   nginx:latest   "/docker-entrypoint.…"   6 minutes ago    Up 6 minutes    0.0.0.0:10082->80/tcp, :::10082->80/tcp   inspiring_cray
d89bec2b9c71   mysql:latest   "docker-entrypoint.s…"   14 minutes ago   Up 14 minutes   3306/tcp, 33060/tcp                       laughing_hypatia
07067ffcd9d5   ubuntu:20.04   "/bin/bash"              27 minutes ago   Up 27 minutes                                             gallant_volhard
[root@docker ~]#
[root@docker ~]#
[root@docker ~]# docker stop c271ced31481
c271ced31481
[root@docker ~]# docker ps -a
CONTAINER ID   IMAGE          COMMAND                  CREATED          STATUS                       PORTS                 NAMES
c271ced31481   nginx:latest   "/docker-entrypoint.…"   6 minutes ago    Exited (137) 2 seconds ago                         inspiring_cray
d89bec2b9c71   mysql:latest   "docker-entrypoint.s…"   14 minutes ago   Up 14 minutes                3306/tcp, 33060/tcp   laughing_hypatia
07067ffcd9d5   ubuntu:20.04   "/bin/bash"              28 minutes ago   Up 28 minutes                                      gallant_volhard
[root@docker ~]#
[root@docker ~]# docker rm c271ced31481
c271ced31481
[root@docker ~]# docker ps -a
CONTAINER ID   IMAGE          COMMAND                  CREATED          STATUS          PORTS                 NAMES
d89bec2b9c71   mysql:latest   "docker-entrypoint.s…"   15 minutes ago   Up 15 minutes   3306/tcp, 33060/tcp   laughing_hypatia
07067ffcd9d5   ubuntu:20.04   "/bin/bash"              28 minutes ago   Up 28 minutes                         gallant_volhard
[root@docker ~]#
[root@docker ~]#
[root@docker ~]# docker rm -f d89
d89
[root@docker ~]# docker ps -a
CONTAINER ID   IMAGE          COMMAND       CREATED          STATUS          PORTS     NAMES
07067ffcd9d5   ubuntu:20.04   "/bin/bash"   29 minutes ago   Up 29 minutes             gallant_volhard

# 容器网卡
# -----------docker0:172.17.0.1 ------------------
#     |                     |
#     |                     |
# veth1f4bbf3             veth1f4bbf4
# 172.17.0.2               172.17.0.3
[root@docker ~]# docker run -it -d centos:7 /bin/bash
05fb15d4365f4b42cd41fa25df5a7fb5ab3e4cf39de6170d60b1f1dd8d1966cb
# 两个容器
[root@docker ~]# docker ps
CONTAINER ID   IMAGE          COMMAND       CREATED          STATUS          PORTS     NAMES
05fb15d4365f   centos:7       "/bin/bash"   4 minutes ago    Up 4 minutes              laughing_ganguly
07067ffcd9d5   ubuntu:20.04   "/bin/bash"   41 minutes ago   Up 41 minutes             gallant_volhard
# 查看两个容器的网卡
[root@docker ~]# ifconfig
docker0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 172.17.0.1  netmask 255.255.0.0  broadcast 172.17.255.255
        inet6 fe80::42:f1ff:fee3:a588  prefixlen 64  scopeid 0x20<link>
        ether 02:42:f1:e3:a5:88  txqueuelen 0  (Ethernet)

veth1f4bbf3: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet6 fe80::44eb:a3ff:fe24:41af  prefixlen 64  scopeid 0x20<link>
        ether 46:eb:a3:24:41:af  txqueuelen 0  (Ethernet)


vethcf0b6ea: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet6 fe80::9085:27ff:fe69:5e39  prefixlen 64  scopeid 0x20<link>
        ether 92:85:27:69:5e:39  txqueuelen 0  (Ethernet)


[root@docker ~]# docker exec -it 05 /bin/bash
# centos7 替换源 容器内部
[root@05fb15d4365f /]# curl -o /etc/yum.repos.d/CentOS-Base.repo https://mirrors.aliyun.com/repo/Centos-7.repo
[root@05fb15d4365f /]# sed -i -e '/mirrors.cloud.aliyuncs.com/d' -e '/mirrors.aliyuncs.com/d' /etc/yum.repos.d/CentOS-Base.repo
[root@05fb15d4365f /]# yum -y install net-tools # ifconfig
[root@d5f22ddf98ef /]# ifconfig
eth0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 172.17.0.3  netmask 255.255.0.0  broadcast 172.17.255.255
        ether 02:42:ac:11:00:03  txqueuelen 0  (Ethernet)

# 宿主机使用 inspect 查看
[root@docker ~]# docker inspect d5f22ddf98ef
"Networks": {
      "bridge": {
         "IPAMConfig": null,
         "Links": null,
         "Aliases": null,
         "MacAddress": "02:42:ac:11:00:03",
         "NetworkID": "c44cee693844c821171759da4bd7a1e8cdbc8072c14a2e044ccd2a2c83ba0b9d",
         "EndpointID": "1e9da94dc6905376cc5bb83281c7bb0a4e44a4d50f9ff8d4c3ee3327b5288a51",
         "Gateway": "172.17.0.1",
         "IPAddress": "172.17.0.3",
         "IPPrefixLen": 16,
         "IPv6Gateway": "",
         "GlobalIPv6Address": "",
         "GlobalIPv6PrefixLen": 0,
         "DriverOpts": null,
         "DNSNames": null
      }
}

# ping 另外一个容器
[root@d5f22ddf98ef /]# ping 172.17.0.2
PING 172.17.0.2 (172.17.0.2) 56(84) bytes of data.
64 bytes from 172.17.0.2: icmp_seq=1 ttl=64 time=0.140 ms
64 bytes from 172.17.0.2: icmp_seq=2 ttl=64 time=0.139 ms
^C
--- 172.17.0.2 ping statistics ---
2 packets transmitted, 2 received, 0% packet loss, time 1056ms
rtt min/avg/max/mdev = 0.139/0.139/0.140/0.011 ms

标签:ago,演示,14,minutes,36,15,docker,root,综合
From: https://www.cnblogs.com/ckh2023/p/18070139

相关文章

  • 代码随想录算法训练营day21 | leetcode 530. 二叉搜索树的最小绝对差、501. 二叉搜索
    目录题目链接:530.二叉搜索树的最小绝对差-简单题目链接:501.二叉搜索树中的众数-简单题目链接:236.二叉树的最近公共祖先-中等题目链接:530.二叉搜索树的最小绝对差-简单题目描述:给你一个二叉搜索树的根节点root,返回树中任意两不同节点值之间的最小差值。差值是一个正数,......
  • [js error] SyntaxError: Unexpected token ‘{‘ (at uniFile.js?t=1710138723630:1:
    问题详情问题描述封装一个函数的时候报错问题原因SyntaxError:Unexpectedtoken‘{’(atuniFile.js?t=1710138723630:1:34)SyntaxError:意外的令牌“{”(在uniFile.js?t=1710138723630:1:34)意思是有不符合语法规范的地方在第一行34个字符的地方去到报错文件的地方查......
  • abc336F 旋转矩阵谜题
    有一个大小为W*H的矩阵,每个格子里分别有1~W*H的某个数字,对应1~W*H的一个排列。每次可以选择大小为(W-1)*(H-1)的子矩阵旋转180度。给定初始状态,问20步以内是否可以将它还原?如果可以,输出最小步数,否则输出-1。3<=H,W<=8;1<=a[i][j]<=H*W;a[i][j]各不相等bfs搜索,由于每一步都......
  • 牛客周赛 Round 36(A~F)
    A签到直接\(/1000\)输出即可#include<bits/stdc++.h>#defineintlonglong#definerep(i,a,b)for(inti=(a);i<=(b);++i)#definefep(i,a,b)for(inti=(a);i>=(b);--i)#define_for(i,a,b)for(inti=(a);i<(b);++i)#definepiipai......
  • RTL综合 Synthesis
    参考:郭炜等SoC设计方法与实现(第3版).电子工业出版社.出版时间:2017-08-01.第八章.SynopsysDesignCompilerUserGuide.RakeshChadhaJ.Bhasker.StaticTimingAnalysisforNanometerDesigns.Springer,2009.Chapter-3.芯动力——硬件加速设计方法_西南交通大学DC......
  • 洛谷题单指南-线性表-P3613 【深基15.例2】寄包柜
    原题链接:https://www.luogu.com.cn/problem/P3613题意解读:此题很容易想成用二维数组求解,但是最多有10^5*10^5个寄包柜格子,二维数据会爆空间,题目明确各自一共不超过10^7,所以需要动态数据结构vector。解题思路:vector的问题在于需要提前明确空间大小,才能进行随即访问操作,否则可......
  • 牛客周赛 Round 36 (小白练习记)
    A.小红的数位删除思路:这题简单输出即可Code:#include<bits/stdc++.h>usingnamespacestd;intmain(){strings;cin>>s;for(inti=0;i<s.size()-3;i++){cout<<s[i];}return0;}B.小红的小红矩阵构造思路:......
  • 若依管理系统演示截图
    首页1首页2首页图标搜索框预览1预览证书2添加证书证书详情编辑证书导入证书删除证书......
  • 36. 人物动画
    人物动画状态机设置变量isParry 是否在防御isSleep 是否正在睡觉isDead 是否已经死亡attack 攻击hit 受伤skill 技能状态stand 站立parry_stand 防御hurt 受伤attack_pillow 攻击sleep 睡眠wake 醒来skill 技能death 死亡状态切换站立状态可以......
  • P3670 [USACO17OPEN] Bovine Genomics S 题解
    题意给定\(2\)组字符串,每组\(n\)个,每个字符串包含\(m\)个字符。我们称一个三元组\((i,j,k)\)是合法的,当且仅当第二组的每个字符串中下标为\((i,j,k)\)的字符拼成的字符串与第一组的每个字符串中下标为\((i,j,k)\)的字符拼成的字符串均不相等。现在需要你对于给定的......