Docker镜像-手动制作yum版nginx镜像

简介: 这篇文章介绍了如何手动制作一个基于CentOS 7.6的Docker镜像,其中包括下载指定版本的CentOS镜像,创建容器,配置阿里云软件源,安装并配置nginx,自定义nginx日志格式和web页面,最后提交镜像并基于该镜像启动新容器的详细步骤。

作者:尹正杰
版权声明:原创作品,谢绝转载!否则将追究法律责任。

一.下载镜像并初始化容器

1>.下载CentOS指定版本镜像(默认下载最新的版本,而我指定的是CentOS 7.6主流版本)

[root@docker201.yinzhengjie.org.cn ~]# docker image ls
REPOSITORY          TAG                 IMAGE ID            CREATED             SIZE
[root@docker201.yinzhengjie.org.cn ~]# 
[root@docker201.yinzhengjie.org.cn ~]# docker image pull centos:centos7.6.1810
centos7.6.1810: Pulling from library/centos
ac9208207ada: Pull complete 
Digest: sha256:62d9e1c2daa91166139b51577fe4f4f6b4cc41a3a2c7fc36bd895e2a17a3e4e6
Status: Downloaded newer image for centos:centos7.6.1810
[root@docker201.yinzhengjie.org.cn ~]# 
[root@docker201.yinzhengjie.org.cn ~]# docker image ls
REPOSITORY          TAG                 IMAGE ID            CREATED             SIZE
centos              centos7.6.1810      f1cb7c7d58b7        10 months ago       202MB
[root@docker201.yinzhengjie.org.cn ~]# 
[root@docker201.yinzhengjie.org.cn ~]#

2>.创建一个容器指定主机名及DNS信息并验证

[root@docker201.yinzhengjie.org.cn ~]# docker container ls
CONTAINER ID        IMAGE               COMMAND             CREATED             STATUS              PORTS               NAMES
[root@docker201.yinzhengjie.org.cn ~]# 
[root@docker201.yinzhengjie.org.cn ~]# 
[root@docker201.yinzhengjie.org.cn ~]# docker container run -it -d --name myNginx --hostname yinzhengjieNginx --dns 192.168.7.254 centos:centos7.6.1810 
7d2e8defc0fc6bdcd14b683468987b5837a709c64794e7dc85aa15576bd99f32
[root@docker201.yinzhengjie.org.cn ~]# 
[root@docker201.yinzhengjie.org.cn ~]# docker container ls
CONTAINER ID        IMAGE                   COMMAND             CREATED             STATUS              PORTS               NAMES
7d2e8defc0fc        centos:centos7.6.1810   "/bin/bash"         2 seconds ago       Up 1 second                             myNginx
[root@docker201.yinzhengjie.org.cn ~]# 
[root@docker201.yinzhengjie.org.cn ~]# docker container exec -it myNginx bash
[root@yinzhengjieNginx /]# 
[root@yinzhengjieNginx /]# cat /etc/redhat-release 
CentOS Linux release 7.6.1810 (Core) 
[root@yinzhengjieNginx /]# 
[root@yinzhengjieNginx /]# cat /etc/hostname 
yinzhengjieNginx
[root@yinzhengjieNginx /]# 
[root@yinzhengjieNginx /]# ping www.cnblogs.com -c 3
PING www.cnblogs.com (121.40.43.188) 56(84) bytes of data.
64 bytes from 121.40.43.188 (121.40.43.188): icmp_seq=1 ttl=127 time=33.2 ms
64 bytes from 121.40.43.188 (121.40.43.188): icmp_seq=2 ttl=127 time=33.3 ms
64 bytes from 121.40.43.188 (121.40.43.188): icmp_seq=3 ttl=127 time=33.3 ms

--- www.cnblogs.com ping statistics ---
3 packets transmitted, 3 received, 0% packet loss, time 2004ms
rtt min/avg/max/mdev = 33.283/33.323/33.387/0.155 ms
[root@yinzhengjieNginx /]# 
[root@yinzhengjieNginx /]# cat /etc/resolv.conf 
search yinzhengjie.org.cn
nameserver 192.168.7.254
[root@yinzhengjieNginx /]# 
[root@yinzhengjieNginx /]# exit 
exit
[root@docker201.yinzhengjie.org.cn ~]# 
[root@docker201.yinzhengjie.org.cn ~]# docker container ls 
CONTAINER ID        IMAGE                   COMMAND             CREATED             STATUS              PORTS               NAMES
7d2e8defc0fc        centos:centos7.6.1810   "/bin/bash"         2 minutes ago       Up 2 minutes                            myNginx
[root@docker201.yinzhengjie.org.cn ~]# 
[root@docker201.yinzhengjie.org.cn ~]#

3>.使用exec连接容器并配置阿里云的软件源

[root@docker201.yinzhengjie.org.cn ~]# docker container ls 
CONTAINER ID        IMAGE                   COMMAND             CREATED             STATUS              PORTS               NAMES
7d2e8defc0fc        centos:centos7.6.1810   "/bin/bash"         4 minutes ago       Up 4 minutes                            myNginx
[root@docker201.yinzhengjie.org.cn ~]# 
[root@docker201.yinzhengjie.org.cn ~]# docker container exec -it myNginx bash
[root@yinzhengjieNginx /]# 
[root@yinzhengjieNginx /]# ls /etc/yum.repos.d/
CentOS-Base.repo  CentOS-CR.repo  CentOS-Debuginfo.repo  CentOS-Media.repo  CentOS-Sources.repo  CentOS-Vault.repo  CentOS-fasttrack.repo
[root@yinzhengjieNginx /]# 
[root@yinzhengjieNginx /]# curl -o /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100  2523  100  2523    0     0  27811      0 --:--:-- --:--:-- --:--:-- 28033
[root@yinzhengjieNginx /]# 
[root@yinzhengjieNginx /]# curl -o /etc/yum.repos.d/epel-7.repo http://mirrors.aliyun.com/repo/epel-7.repo 
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100   664  100   664    0     0   7277      0 --:--:-- --:--:-- --:--:--  7296
[root@yinzhengjieNginx /]# 
[root@yinzhengjieNginx /]# ls /etc/yum.repos.d/
CentOS-Base.repo  CentOS-CR.repo  CentOS-Debuginfo.repo  CentOS-Media.repo  CentOS-Sources.repo  CentOS-Vault.repo  CentOS-fasttrack.repo  epel-7.repo
[root@yinzhengjieNginx /]# 
[root@yinzhengjieNginx /]# exit 
exit
[root@docker201.yinzhengjie.org.cn ~]# 
[root@docker201.yinzhengjie.org.cn ~]# docker container ls 
CONTAINER ID        IMAGE                   COMMAND             CREATED             STATUS              PORTS               NAMES
7d2e8defc0fc        centos:centos7.6.1810   "/bin/bash"         5 minutes ago       Up 5 minutes                            myNginx
[root@docker201.yinzhengjie.org.cn ~]# 
[root@docker201.yinzhengjie.org.cn ~]#

二.安装并配置nginx

1>.使用yum的方式安装nginx

[root@docker201.yinzhengjie.org.cn ~]# docker container exec -it myNginx bash
[root@yinzhengjieNginx /]# 
[root@yinzhengjieNginx /]# yum -y install nginx
[root@yinzhengjieNginx /]#

2>.安装常用工具

[root@yinzhengjieNginx /]# yum -y install -y vim wget pcre pcre-devel zlib zlib-devel openssl openssl-devel iproute net-tools iotop

3>.关闭nginx后台运行并自定义nginx日志格式(仅供参考连接:https://www.cnblogs.com/yinzhengjie/p/12047186.html)

[root@yinzhengjieNginx /]# vim /etc/nginx/nginx.conf
[root@yinzhengjieNginx /]# 
[root@yinzhengjieNginx /]# egrep -v "^ *#|^$" /etc/nginx/nginx.conf
user nginx;
worker_processes auto;
error_log /var/log/nginx/error.log;
pid /run/nginx.pid;
daemon off;
include /usr/share/nginx/modules/*.conf;
events {
    worker_connections 1024;
}
http {
    log_format main '$remote_addr - $remote_user [$time_local] "$request"' '$status $body_bytes_sent "$http_referer"' '"$http_user_agent"' '"$http_x_forwarded_for"' '$server_name:$server_port';
    access_log  /var/log/nginx/access.log  main;
    sendfile            on;
    tcp_nopush          on;
    tcp_nodelay         on;
    keepalive_timeout   65;
    types_hash_max_size 2048;
    include             /etc/nginx/mime.types;
    default_type        application/octet-stream;
    include /etc/nginx/conf.d/*.conf;
    server {
        listen       80 default_server;
        listen       [::]:80 default_server;
        server_name  _;
        root         /usr/share/nginx/html;
        include /etc/nginx/default.d/*.conf;
        location / {
        }
        error_page 404 /404.html;
            location = /40x.html {
        }
        error_page 500 502 503 504 /50x.html;
            location = /50x.html {
        }
    }
}
[root@yinzhengjieNginx /]# 
[root@yinzhengjieNginx /]# nginx -t
nginx: the configuration file /etc/nginx/nginx.conf syntax is ok
nginx: configuration file /etc/nginx/nginx.conf test is successful
[root@yinzhengjieNginx /]# 
[root@yinzhengjieNginx /]#

4>.自定义nginx的web页面

[root@yinzhengjieNginx /]# ll /usr/share/nginx/html/index.html 
lrwxrwxrwx. 1 root root 25 Jan 17 09:57 /usr/share/nginx/html/index.html -> ../../doc/HTML/index.html
[root@yinzhengjieNginx /]# 
[root@yinzhengjieNginx /]# rm -f /usr/share/nginx/html/index.html 
[root@yinzhengjieNginx /]# [root@yinzhengjieNginx /]# vim /usr/share/nginx/html/index.html 
[root@yinzhengjieNginx /]# 
[root@yinzhengjieNginx /]# cat /usr/share/nginx/html/index.html 
<h1>YinZhengjie's Nginx docker201.yinzhengjie.org.cn</h1>
[root@yinzhengjieNginx /]# 
[root@yinzhengjieNginx /]#

5>.启动nginx并验证服务是否正常运行

[root@yinzhengjieNginx /]# nginx -t
nginx: the configuration file /etc/nginx/nginx.conf syntax is ok
nginx: configuration file /etc/nginx/nginx.conf test is successful
[root@yinzhengjieNginx /]# 
[root@yinzhengjieNginx /]# ss -ntl
State      Recv-Q Send-Q                                                                                          Local Address:Port                                                                                                         Peer Address:Port              
[root@yinzhengjieNginx /]# 
[root@yinzhengjieNginx /]# nginx             #启动nginx时当前终端会阻塞住,需要重新开启一个新的终端来验证nginx服务哟,具体如下图所示。

[root@docker201.yinzhengjie.org.cn ~]# docker container ls
CONTAINER ID        IMAGE                   COMMAND             CREATED             STATUS              PORTS               NAMES
7d2e8defc0fc        centos:centos7.6.1810   "/bin/bash"         37 minutes ago      Up 37 minutes                           myNginx
[root@docker201.yinzhengjie.org.cn ~]# 
[root@docker201.yinzhengjie.org.cn ~]# 
[root@docker201.yinzhengjie.org.cn ~]# docker container exec -it myNginx bash
[root@yinzhengjieNginx /]# 
[root@yinzhengjieNginx /]# ss -ntl
State      Recv-Q Send-Q                                                                                          Local Address:Port                                                                                                         Peer Address:Port              
LISTEN     0      128                                                                                                         *:80                                                                                                                      *:*                  
LISTEN     0      128                                                                                                      [::]:80                                                                                                                   [::]:*                  
[root@yinzhengjieNginx /]# 
[root@yinzhengjieNginx /]# curl 127.0.0.1
<h1>YinZhengjie's Nginx docker201.yinzhengjie.org.cn</h1>
[root@yinzhengjieNginx /]# 
[root@yinzhengjieNginx /]# hostname -i
172.17.0.2
[root@yinzhengjieNginx /]# 
[root@yinzhengjieNginx /]# curl 172.17.0.2
<h1>YinZhengjie's Nginx docker201.yinzhengjie.org.cn</h1>
[root@yinzhengjieNginx /]# 
[root@yinzhengjieNginx /]# exit 
exit
[root@docker201.yinzhengjie.org.cn ~]# 
[root@docker201.yinzhengjie.org.cn ~]# curl 172.17.0.2
<h1>YinZhengjie's Nginx docker201.yinzhengjie.org.cn</h1>
[root@docker201.yinzhengjie.org.cn ~]# 
[root@docker201.yinzhengjie.org.cn ~]# docker container exec -it myNginx bash
[root@yinzhengjieNginx /]# 
[root@yinzhengjieNginx /]# cat /var/log/nginx/
access.log  error.log   
[root@yinzhengjieNginx /]# cat /var/log/nginx/access.log 
127.0.0.1 - - [17/Jan/2020:10:25:58 +0000] "GET / HTTP/1.1"200 58 "-""curl/7.29.0""-"_:80
172.17.0.2 - - [17/Jan/2020:10:26:53 +0000] "GET / HTTP/1.1"200 58 "-""curl/7.29.0""-"_:80
172.17.0.2 - - [17/Jan/2020:10:27:22 +0000] "GET / HTTP/1.1"200 58 "-""curl/7.29.0""-"_:80
172.17.0.1 - - [17/Jan/2020:10:27:30 +0000] "GET / HTTP/1.1"200 58 "-""curl/7.29.0""-"_:80
172.17.0.1 - - [17/Jan/2020:10:27:39 +0000] "GET / HTTP/1.1"200 58 "-""curl/7.29.0""-"_:80
[root@yinzhengjieNginx /]# 
[root@yinzhengjieNginx /]#

验证nginx服务是否可以正常

三.在宿主机(使用自定义容器ID)基于命令行制作镜像

[root@docker201.yinzhengjie.org.cn ~]# docker container commit --help

Usage:    docker container commit [OPTIONS] CONTAINER [REPOSITORY[:TAG]]

Create a new image from a container's changes
Options:
  -a, --author string    Author (e.g., "John Hannibal Smith <hannibal@a-team.com>")
  -c, --change list      Apply Dockerfile instruction to the created image
  -m, --message string   Commit message
  -p, --pause            Pause container during commit (default true)
[root@docker201.yinzhengjie.org.cn ~]# 
[root@docker201.yinzhengjie.org.cn ~]#

[root@docker201.yinzhengjie.org.cn ~]# docker container commit --help              #查看命令的帮助信息

1>.提交时不不带版本号(不推荐使用,因为默认提交的版本号是"latest")

[root@docker201.yinzhengjie.org.cn ~]# docker image ls
REPOSITORY          TAG                 IMAGE ID            CREATED             SIZE
centos              centos7.6.1810      f1cb7c7d58b7        10 months ago       202MB
[root@docker201.yinzhengjie.org.cn ~]# 
[root@docker201.yinzhengjie.org.cn ~]# docker container ls
CONTAINER ID        IMAGE                   COMMAND             CREATED             STATUS              PORTS               NAMES
7d2e8defc0fc        centos:centos7.6.1810   "/bin/bash"         About an hour ago   Up About an hour                        myNginx
[root@docker201.yinzhengjie.org.cn ~]# [root@docker201.yinzhengjie.org.cn ~]# docker container commit -m "YinZhengjie's Docker Nginx" 7d2e8defc0fc jason/centos7-nginx 
sha256:c4e0980a825a1778d0c54a8c24644bc687543fac91a1fcc6687ac842f945bf17
[root@docker201.yinzhengjie.org.cn ~]# 
[root@docker201.yinzhengjie.org.cn ~]# docker image ls
REPOSITORY            TAG                 IMAGE ID            CREATED             SIZE
jason/centos7-nginx   latest              c4e0980a825a        15 seconds ago      448MB
centos                centos7.6.1810      f1cb7c7d58b7        10 months ago       202MB
[root@docker201.yinzhengjie.org.cn ~]#

2>.带tag的镜像提交(生产环境推荐使用,后期可以根据tag标记不同版本的image进行启动)

[root@docker201.yinzhengjie.org.cn ~]# docker image ls
REPOSITORY            TAG                 IMAGE ID            CREATED             SIZE
jason/centos7-nginx   latest              c4e0980a825a        6 minutes ago       448MB
centos                centos7.6.1810      f1cb7c7d58b7        10 months ago       202MB
[root@docker201.yinzhengjie.org.cn ~]# 
[root@docker201.yinzhengjie.org.cn ~]# docker container ls
CONTAINER ID        IMAGE                   COMMAND             CREATED             STATUS              PORTS               NAMES
7d2e8defc0fc        centos:centos7.6.1810   "/bin/bash"         About an hour ago   Up About an hour                        myNginx
[root@docker201.yinzhengjie.org.cn ~]# [root@docker201.yinzhengjie.org.cn ~]# docker container commit -m "YinZhengjie's Docker Nginx" 7d2e8defc0fc jason/centos7-nginx:v0.1.20200114
sha256:7372d16c99bce2e8345432154179075ad627658e620379b3739a4d492bbcdeb4
[root@docker201.yinzhengjie.org.cn ~]# 
[root@docker201.yinzhengjie.org.cn ~]# docker image ls
REPOSITORY            TAG                 IMAGE ID            CREATED             SIZE
jason/centos7-nginx   v0.1.20200114       7372d16c99bc        2 seconds ago       448MB
jason/centos7-nginx   latest              c4e0980a825a        10 minutes ago      448MB
centos                centos7.6.1810      f1cb7c7d58b7        10 months ago       202MB
[root@docker201.yinzhengjie.org.cn ~]#

四.基于自己制作的镜像启动容器

1>.创建容器

[root@docker201.yinzhengjie.org.cn ~]# docker image ls
REPOSITORY            TAG                 IMAGE ID            CREATED             SIZE
jason/centos7-nginx   v0.1.20200114       7372d16c99bc        9 minutes ago       448MB
jason/centos7-nginx   latest              c4e0980a825a        20 minutes ago      448MB
centos                centos7.6.1810      f1cb7c7d58b7        10 months ago       202MB
[root@docker201.yinzhengjie.org.cn ~]# 
[root@docker201.yinzhengjie.org.cn ~]# docker container ls
CONTAINER ID        IMAGE                   COMMAND             CREATED             STATUS              PORTS               NAMES
7d2e8defc0fc        centos:centos7.6.1810   "/bin/bash"         About an hour ago   Up About an hour                        myNginx
[root@docker201.yinzhengjie.org.cn ~]# 
[root@docker201.yinzhengjie.org.cn ~]# ss -ntl
State      Recv-Q Send-Q                                                                                          Local Address:Port                                                                                                         Peer Address:Port              
LISTEN     0      128                                                                                                         *:22                                                                                                                      *:*                  
LISTEN     0      100                                                                                                 127.0.0.1:25                                                                                                                      *:*                  
LISTEN     0      128                                                                                                        :::22                                                                                                                     :::*                  
LISTEN     0      100                                                                                                       ::1:25                                                                                                                     :::*                  
[root@docker201.yinzhengjie.org.cn ~]# 
[root@docker201.yinzhengjie.org.cn ~]# hostname -i
192.168.6.201
[root@docker201.yinzhengjie.org.cn ~]# 
[root@docker201.yinzhengjie.org.cn ~]# docker container run -it -d --name myDockerNginx --hostname yinzhengjieDockerNginx -p 192.168.6.201:8080:80/tcp --dns 192.168.7.254 jason/centos7-nginx:v0.1.20200114 /usr/sbin/nginx
4d4bbd064581e4ca301d1fe8de1978e38ab63cb6a64fc8615f8d37779fff087e
[root@docker201.yinzhengjie.org.cn ~]# 
[root@docker201.yinzhengjie.org.cn ~]# docker container ls
CONTAINER ID        IMAGE                               COMMAND             CREATED             STATUS              PORTS                        NAMES
4d4bbd064581        jason/centos7-nginx:v0.1.20200114   "/usr/sbin/nginx"   3 seconds ago       Up 2 seconds        192.168.6.201:8080->80/tcp   myDockerNginx
7d2e8defc0fc        centos:centos7.6.1810               "/bin/bash"         About an hour ago   Up About an hour                                 myNginx
[root@docker201.yinzhengjie.org.cn ~]# 
[root@docker201.yinzhengjie.org.cn ~]# ss -ntl
State      Recv-Q Send-Q                                                                                          Local Address:Port                                                                                                         Peer Address:Port              
LISTEN     0      20480                                                                                           192.168.6.201:8080                                                                                                                    *:*                  
LISTEN     0      128                                                                                                         *:22                                                                                                                      *:*                  
LISTEN     0      100                                                                                                 127.0.0.1:25                                                                                                                      *:*                  
LISTEN     0      128                                                                                                        :::22                                                                                                                     :::*                  
LISTEN     0      100                                                                                                       ::1:25                                                                                                                     :::*                  
[root@docker201.yinzhengjie.org.cn ~]# 
[root@docker201.yinzhengjie.org.cn ~]#

2>.连接咱们的容器并验证nginx服务是否正常启动

五.使用客户端浏览器访问测试,如下图所示

目录
相关文章
|
2天前
|
缓存 Linux 网络安全
docker的镜像无法下载如何解决?
【10月更文挑战第31天】docker的镜像无法下载如何解决?
90 28
|
15天前
|
缓存 监控 持续交付
|
4天前
|
存储 监控 Linux
docker构建镜像详解!!!
本文回顾了Docker的基本命令和管理技巧,包括容器和镜像的增删改查操作,容器的生命周期管理,以及如何通过端口映射和数据卷实现容器与宿主机之间的网络通信和数据持久化。文章还详细介绍了如何使用Docker部署一个简单的Web应用,并通过数据卷映射实现配置文件和日志的管理。最后,文章总结了如何制作自定义镜像,包括Nginx、Python3和CentOS镜像,以及如何制作私有云盘镜像。
44 2
|
5天前
|
关系型数据库 MySQL Docker
docker环境下mysql镜像启动后权限更改问题的解决
在Docker环境下运行MySQL容器时,权限问题是一个常见的困扰。通过正确设置目录和文件的权限,可以确保MySQL容器顺利启动并正常运行。本文提供了多种解决方案,包括在主机上设置正确的权限、使用Dockerfile和Docker Compose进行配置、在容器启动后手动更改权限以及使用 `init`脚本自动更改权限。根据实际情况选择合适的方法,可以有效解决MySQL容器启动后的权限问题。希望本文对您在Docker环境下运行MySQL容器有所帮助。
14 1
|
7天前
|
存储 Java 开发者
成功优化!Java 基础 Docker 镜像从 674MB 缩减到 58MB 的经验分享
本文分享了如何通过 jlink 和 jdeps 工具将 Java 基础 Docker 镜像从 674MB 优化至 58MB 的经验。首先介绍了选择合适的基础镜像的重要性,然后详细讲解了使用 jlink 构建自定义 JRE 镜像的方法,并通过 jdeps 自动化模块依赖分析,最终实现了镜像的大幅缩减。此外,文章还提供了实用的 .dockerignore 文件技巧和选择安全、兼容的基础镜像的建议,帮助开发者提升镜像优化的效果。
|
11天前
|
存储 缓存 Java
Java应用瘦身记:Docker镜像从674MB优化至58MB的实践指南
【10月更文挑战第22天】 在容器化时代,Docker镜像的大小直接影响到应用的部署速度和运行效率。一个轻量级的Docker镜像可以减少存储成本、加快启动时间,并提高资源利用率。本文将分享如何将一个Java基础Docker镜像从674MB缩减到58MB的实践经验。
22 1
|
18天前
|
Docker 容器
docker:记录如何在x86架构上构造和使用arm架构的镜像
为了实现国产化适配,需将原x86平台上的Docker镜像转换为适用于ARM平台的镜像。本文介绍了如何配置Docker buildx环境,包括检查Docker版本、安装buildx插件、启用实验性功能及构建多平台镜像的具体步骤。通过这些操作,可以在x86平台上成功构建并运行ARM64镜像,实现跨平台的应用部署。
171 2
|
14天前
|
应用服务中间件 BI nginx
Nginx的location配置详解
【10月更文挑战第16天】Nginx的location配置详解
|
21天前
|
缓存 负载均衡 安全
Nginx常用基本配置总结:从入门到实战的全方位指南
Nginx常用基本配置总结:从入门到实战的全方位指南
198 0
|
25天前
|
应用服务中间件 Linux nginx
Jetson 环境安装(四):jetson nano配置ffmpeg和nginx(亲测)之编译错误汇总
这篇文章是关于在Jetson Nano上配置FFmpeg和Nginx时遇到的编译错误及其解决方案的汇总。
67 4