Linux 下安装docker

Linux 下安装docker

本机是centos 7 非root 用户安装 如果是root用户安装则以下所有命令去掉 sudo

安装gcc
  1. 查看虚拟机是否安装
    1. 这是安装好了的
命令
gcc --version[null@Docker module]$ gcc --version
gcc (GCC) 4.8.5 20150623 (Red Hat 4.8.5-44)
Copyright ? 2015 Free Software Foundation, Inc.
本程序是自由软件;请参看源代码的版权声明。本软件没有任何担保;
包括没有适销性和某一专用目的下的适用性担保。
[null@Docker module]$
  1. 什么都没有显示的就输入以下命令
  sudo yum -y install gcc  sudo yum -y install gcc-c++
# 命令
sudo yum -y install gcc
# 命令
sudo yum -y install gcc-c++[null@Docker module]$ sudo yum -y install gcc
已加载插件:fastestmirror, langpacks
Loading mirror speeds from cached hostfile* base: mirrors.nju.edu.cn* extras: mirrors.nju.edu.cn* updates: mirrors.nju.edu.cn
base                                                                                                    | 3.6 kB  00:00:00     
extras                                                                                                  | 2.9 kB  00:00:00     
updates                                                                                                 | 2.9 kB  00:00:00     
updates/7/x86_64/primary_db                                                                             |  27 MB  00:00:04     
软件包 gcc-4.8.5-44.el7.x86_64 已安装并且是最新版本
无须任何处理
[null@Docker module]$ sudo yum -y install gcc-c++
已加载插件:fastestmirror, langpacks
Loading mirror speeds from cached hostfile* base: mirrors.nju.edu.cn* extras: mirrors.nju.edu.cn* updates: mirrors.nju.edu.cn
软件包 gcc-c++-4.8.5-44.el7.x86_64 已安装并且是最新版本
无须任何处理
  1. 安装完成后再次输入查看版本是否和之前一样
# 命令
gcc --version[null@Docker module]$ gcc --version
gcc (GCC) 4.8.5 20150623 (Red Hat 4.8.5-44)
Copyright ? 2015 Free Software Foundation, Inc.
本程序是自由软件;请参看源代码的版权声明。本软件没有任何担保;
包括没有适销性和某一专用目的下的适用性担保。
[null@Docker module]$
安装utils
# 命令
sudo yum install -y yum-utils[null@Docker module]$ sudo yum install -y yum-utils
[sudo] null 的密码:
已加载插件:fastestmirror, langpacks
Loading mirror speeds from cached hostfile* base: mirrors.nju.edu.cn* extras: mirrors.nju.edu.cn* updates: mirrors.nju.edu.cn
软件包 yum-utils-1.1.31-54.el7_8.noarch 已安装并且是最新版本
无须任何处理
设置stable镜像仓库
# 命令
sudo yum-config-manager --add-repo http://mirrors.aliyun.com/docker-ce/linux/centos/docker-ce.repo[null@Docker module]$ sudo yum-config-manager --add-repo http://mirrors.aliyun.com/docker-ce/linux/centos/docker-ce.repo
已加载插件:fastestmirror, langpacks
adding repo from: http://mirrors.aliyun.com/docker-ce/linux/centos/docker-ce.repo
grabbing file http://mirrors.aliyun.com/docker-ce/linux/centos/docker-ce.repo to /etc/yum.repos.d/docker-ce.repo
repo saved to /etc/yum.repos.d/docker-ce.repo
[null@Docker module]$ 
更新yum 软件索引
# 命令
sudo yum makecache fast[null@Docker module]$ sudo yum makecache fast
已加载插件:fastestmirror, langpacks
Loading mirror speeds from cached hostfile* base: mirrors.nju.edu.cn* extras: mirrors.nju.edu.cn* updates: mirrors.nju.edu.cn
base                                                                                                    | 3.6 kB  00:00:00     
docker-ce-stable                                                                                        | 3.5 kB  00:00:00     
extras                                                                                                  | 2.9 kB  00:00:00     
updates                                                                                                 | 2.9 kB  00:00:00     
元数据缓存已建立
[null@Docker module]$ 
安装docker engin
# 命令
sudo yum -y install docker-ce docker-ce-cli containerd.io[null@Docker module]$ sudo yum -y install docker-ce docker-ce-cli containerd.io
已加载插件:fastestmirror, langpacks
Loading mirror speeds from cached hostfile* base: mirrors.nju.edu.cn* extras: mirrors.nju.edu.cn* updates: mirrors.nju.edu.cn
正在解决依赖关系
--> 正在检查事务
---> 软件包 containerd.io.x86_64.0.1.6.32-3.1.el7 将被 安装
--> 正在处理依赖关系 container-selinux >= 2:2.74,它被软件包 containerd.io-1.6.32-3.1.el7.x86_64 需要
---> 软件包 docker-ce.x86_64.3.26.1.3-1.el7 将被 安装
--> 正在处理依赖关系 docker-ce-rootless-extras,它被软件包 3:docker-ce-26.1.3-1.el7.x86_64 需要
---> 软件包 docker-ce-cli.x86_64.1.26.1.3-1.el7 将被 安装
--> 正在处理依赖关系 docker-buildx-plugin,它被软件包 1:docker-ce-cli-26.1.3-1.el7.x86_64 需要
--> 正在处理依赖关系 docker-compose-plugin,它被软件包 1:docker-ce-cli-26.1.3-1.el7.x86_64 需要
--> 正在检查事务
---> 软件包 container-selinux.noarch.2.2.119.2-1.911c772.el7_8 将被 安装
---> 软件包 docker-buildx-plugin.x86_64.0.0.14.0-1.el7 将被 安装
---> 软件包 docker-ce-rootless-extras.x86_64.0.26.1.3-1.el7 将被 安装
--> 正在处理依赖关系 fuse-overlayfs >= 0.7,它被软件包 docker-ce-rootless-extras-26.1.3-1.el7.x86_64 需要
--> 正在处理依赖关系 slirp4netns >= 0.4,它被软件包 docker-ce-rootless-extras-26.1.3-1.el7.x86_64 需要
---> 软件包 docker-compose-plugin.x86_64.0.2.27.0-1.el7 将被 安装
--> 正在检查事务
---> 软件包 fuse-overlayfs.x86_64.0.0.7.2-6.el7_8 将被 安装
--> 正在处理依赖关系 libfuse3.so.3(FUSE_3.2)(64bit),它被软件包 fuse-overlayfs-0.7.2-6.el7_8.x86_64 需要
--> 正在处理依赖关系 libfuse3.so.3(FUSE_3.0)(64bit),它被软件包 fuse-overlayfs-0.7.2-6.el7_8.x86_64 需要
--> 正在处理依赖关系 libfuse3.so.3()(64bit),它被软件包 fuse-overlayfs-0.7.2-6.el7_8.x86_64 需要
---> 软件包 slirp4netns.x86_64.0.0.4.3-4.el7_8 将被 安装
--> 正在检查事务
---> 软件包 fuse3-libs.x86_64.0.3.6.1-4.el7 将被 安装
--> 解决依赖关系完成依赖关系解决===============================================================================================================================Package                              架构              版本                                 源                           大小
===============================================================================================================================
正在安装:containerd.io                        x86_64            1.6.32-3.1.el7                       docker-ce-stable             35 Mdocker-ce                            x86_64            3:26.1.3-1.el7                       docker-ce-stable             27 Mdocker-ce-cli                        x86_64            1:26.1.3-1.el7                       docker-ce-stable             15 M
为依赖而安装:container-selinux                    noarch            2:2.119.2-1.911c772.el7_8            extras                       40 kdocker-buildx-plugin                 x86_64            0.14.0-1.el7                         docker-ce-stable             14 Mdocker-ce-rootless-extras            x86_64            26.1.3-1.el7                         docker-ce-stable            9.4 Mdocker-compose-plugin                x86_64            2.27.0-1.el7                         docker-ce-stable             13 Mfuse-overlayfs                       x86_64            0.7.2-6.el7_8                        extras                       54 kfuse3-libs                           x86_64            3.6.1-4.el7                          extras                       82 kslirp4netns                          x86_64            0.4.3-4.el7_8                        extras                       81 k事务概要
===============================================================================================================================
安装  3 软件包 (+7 依赖软件包)总下载量:114 M
安装大小:401 M
Downloading packages:
警告:/var/cache/yum/x86_64/7/extras/packages/container-selinux-2.119.2-1.911c772.el7_8.noarch.rpm: 头V3 RSA/SHA256 Signature, 密钥 ID f4a80eb5: NOKEY
container-selinux-2.119.2-1.911c772.el7_8.noarch.rpm 的公钥尚未安装
(1/10): container-selinux-2.119.2-1.911c772.el7_8.noarch.rpm                                            |  40 kB  00:00:00     
警告:/var/cache/yum/x86_64/7/docker-ce-stable/packages/docker-buildx-plugin-0.14.0-1.el7.x86_64.rpm: 头V4 RSA/SHA512 Signature, 密钥 ID 621e9f35: NOKEY
docker-buildx-plugin-0.14.0-1.el7.x86_64.rpm 的公钥尚未安装
(2/10): docker-buildx-plugin-0.14.0-1.el7.x86_64.rpm                                                    |  14 MB  00:00:29     
(3/10): containerd.io-1.6.32-3.1.el7.x86_64.rpm                                                         |  35 MB  00:01:11     
(4/10): docker-ce-26.1.3-1.el7.x86_64.rpm                                                               |  27 MB  00:00:55     
(5/10): docker-ce-cli-26.1.3-1.el7.x86_64.rpm                                                           |  15 MB  00:00:30     
(6/10): slirp4netns-0.4.3-4.el7_8.x86_64.rpm                                                            |  81 kB  00:00:00     
(7/10): fuse-overlayfs-0.7.2-6.el7_8.x86_64.rpm                                                         |  54 kB  00:00:00     
(8/10): fuse3-libs-3.6.1-4.el7.x86_64.rpm                                                               |  82 kB  00:00:00     
(9/10): docker-ce-rootless-extras-26.1.3-1.el7.x86_64.rpm                                               | 9.4 MB  00:00:20     
(10/10): docker-compose-plugin-2.27.0-1.el7.x86_64.rpm                                                  |  13 MB  00:00:28     
-------------------------------------------------------------------------------------------------------------------------------
总计                                                                                           898 kB/s | 114 MB  00:02:09     
从 file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7 检索密钥
导入 GPG key 0xF4A80EB5:用户ID     : "CentOS-7 Key (CentOS 7 Official Signing Key) <security@centos.org>"指纹       : 6341 ab27 53d7 8a78 a7c2 7bb1 24c6 a8a7 f4a8 0eb5软件包     : centos-release-7-9.2009.1.el7.centos.x86_64 (@anaconda)来自       : /etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7
从 https://mirrors.aliyun.com/docker-ce/linux/centos/gpg 检索密钥
导入 GPG key 0x621E9F35:用户ID     : "Docker Release (CE rpm) <docker@docker.com>"指纹       : 060a 61c5 1b55 8a7f 742b 77aa c52f eb6b 621e 9f35来自       : https://mirrors.aliyun.com/docker-ce/linux/centos/gpg
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction正在安装    : 2:container-selinux-2.119.2-1.911c772.el7_8.noarch                                                        1/10 正在安装    : containerd.io-1.6.32-3.1.el7.x86_64                                                                       2/10 正在安装    : docker-compose-plugin-2.27.0-1.el7.x86_64                                                                 3/10 正在安装    : slirp4netns-0.4.3-4.el7_8.x86_64                                                                          4/10 正在安装    : docker-buildx-plugin-0.14.0-1.el7.x86_64                                                                  5/10 正在安装    : 1:docker-ce-cli-26.1.3-1.el7.x86_64                                                                       6/10 正在安装    : fuse3-libs-3.6.1-4.el7.x86_64                                                                             7/10 正在安装    : fuse-overlayfs-0.7.2-6.el7_8.x86_64                                                                       8/10 正在安装    : 3:docker-ce-26.1.3-1.el7.x86_64                                                                           9/10 正在安装    : docker-ce-rootless-extras-26.1.3-1.el7.x86_64                                                            10/10 验证中      : fuse3-libs-3.6.1-4.el7.x86_64                                                                             1/10 验证中      : fuse-overlayfs-0.7.2-6.el7_8.x86_64                                                                       2/10 验证中      : docker-buildx-plugin-0.14.0-1.el7.x86_64                                                                  3/10 验证中      : containerd.io-1.6.32-3.1.el7.x86_64                                                                       4/10 验证中      : slirp4netns-0.4.3-4.el7_8.x86_64                                                                          5/10 验证中      : 2:container-selinux-2.119.2-1.911c772.el7_8.noarch                                                        6/10 验证中      : docker-ce-rootless-extras-26.1.3-1.el7.x86_64                                                             7/10 验证中      : docker-compose-plugin-2.27.0-1.el7.x86_64                                                                 8/10 验证中      : 3:docker-ce-26.1.3-1.el7.x86_64                                                                           9/10 验证中      : 1:docker-ce-cli-26.1.3-1.el7.x86_64                                                                      10/10 已安装:containerd.io.x86_64 0:1.6.32-3.1.el7       docker-ce.x86_64 3:26.1.3-1.el7       docker-ce-cli.x86_64 1:26.1.3-1.el7      作为依赖被安装:container-selinux.noarch 2:2.119.2-1.911c772.el7_8                docker-buildx-plugin.x86_64 0:0.14.0-1.el7                docker-ce-rootless-extras.x86_64 0:26.1.3-1.el7                   docker-compose-plugin.x86_64 0:2.27.0-1.el7               fuse-overlayfs.x86_64 0:0.7.2-6.el7_8                             fuse3-libs.x86_64 0:3.6.1-4.el7                           slirp4netns.x86_64 0:0.4.3-4.el7_8                               完毕!
[null@Docker module]$ 
启动docker
# 启动的时候什么都不会显示
sudo systemctl start docker[null@Docker module]$ sudo systemctl start docker
[sudo] null 的密码:
[null@Docker module]$ ps -ef|grep docker
root       3598      1  4 13:59 ?        00:00:00 /usr/bin/dockerd -H fd:// --containerd=/run/containerd/containerd.sock
null       3793   2952  0 13:59 pts/0    00:00:00 grep --color=auto docker
[null@Docker module]$ 

docker version

sudo docker version[null@Docker module]$ sudo docker version
Client: Docker Engine - CommunityVersion:           26.1.3API version:       1.45Go version:        go1.21.10Git commit:        b72abbbBuilt:             Thu May 16 08:36:24 2024OS/Arch:           linux/amd64Context:           defaultServer: Docker Engine - CommunityEngine:Version:          26.1.3API version:      1.45 (minimum version 1.24)Go version:       go1.21.10Git commit:       8e96db1Built:            Thu May 16 08:35:20 2024OS/Arch:          linux/amd64Experimental:     falsecontainerd:Version:          1.6.32GitCommit:        8b3b7ca2e5ce38e8f31a34f35b2b68ceb8470d89runc:Version:          1.1.12GitCommit:        v1.1.12-0-g51d5e94docker-init:Version:          0.19.0GitCommit:        de40ad0
[null@Docker module]$ 
Hello World
  1. 正常情况
[null@Docker module]$ sudo docker run hello-world
[sudo] null 的密码:
Unable to find image 'hello-world:latest' locally
latest: Pulling from library/hello-world
c1ec31eb5944: Pull complete 
Digest: sha256:266b191e926f65542fa8daaec01a192c4d292bff79426f47300a046e1bc576fd
Status: Downloaded newer image for hello-world:latestHello from Docker!
This message shows that your installation appears to be working correctly.To generate this message, Docker took the following steps:1. The Docker client contacted the Docker daemon.2. The Docker daemon pulled the "hello-world" image from the Docker Hub.(amd64)3. The Docker daemon created a new container from that image which runs theexecutable that produces the output you are currently reading.4. The Docker daemon streamed that output to the Docker client, which sent itto your terminal.To try something more ambitious, you can run an Ubuntu container with:$ docker run -it ubuntu bashShare images, automate workflows, and more with a free Docker ID:https://hub.docker.com/For more examples and ideas, visit:https://docs.docker.com/get-started/[null@Docker module]$ 
  1. 如果出现了这个问题
[null@Docker module]$ sudo docker run hello-world
Unable to find image 'hello-world:latest' locally
docker: Error response from daemon: Get "https://registry-1.docker.io/v2/": dial tcp: lookup registry-1.docker.io on 192.168.70.2:53: server misbehaving.
See 'docker run --help'.
[null@Docker module]$ 
  1. 解决方法
# 修改文件 resolv.conf
vim /etc/resolv.conf#添加以下内容 
---------------------------
# Generated by NetworkManager
search localdomain
# nameserver 192.168.70.2
nameserver 114.114.114.114 
nameserver 8.8.8.8
------------------------------
  1. 修改后再次拉取就正常了
[null@Docker module]$ sudo docker run hello-world
[sudo] null 的密码:
Unable to find image 'hello-world:latest' locally
latest: Pulling from library/hello-world
c1ec31eb5944: Pull complete 
Digest: sha256:266b191e926f65542fa8daaec01a192c4d292bff79426f47300a046e1bc576fd
Status: Downloaded newer image for hello-world:latestHello from Docker!
This message shows that your installation appears to be working correctly.To generate this message, Docker took the following steps:1. The Docker client contacted the Docker daemon.2. The Docker daemon pulled the "hello-world" image from the Docker Hub.(amd64)3. The Docker daemon created a new container from that image which runs theexecutable that produces the output you are currently reading.4. The Docker daemon streamed that output to the Docker client, which sent itto your terminal.To try something more ambitious, you can run an Ubuntu container with:$ docker run -it ubuntu bashShare images, automate workflows, and more with a free Docker ID:https://hub.docker.com/For more examples and ideas, visit:https://docs.docker.com/get-started/[null@Docker module]$ 
添加阿里云镜像加速

执行以下命令

sudo mkdir -p /etc/docker
sudo tee /etc/docker/daemon.json <<-'EOF'
{"registry-mirrors": ["https://你d的阿里云.mirror.aliyuncs.com"]
}
EOF
sudo systemctl daemon-reload
sudo systemctl restart docker
[null@Docker module]$ sudo mkdir -p /etc/docker
[null@Docker module]$ sudo tee /etc/docker/daemon.json <<-'EOF'
{"registry-mirrors": ["https://你的阿里云.mirror.aliyuncs.com"]
}
EOF
# 重新加载
[null@Docker module]$ sudo systemctl daemon-reload
# 重启
[null@Docker module]$ sudo systemctl restart docker
  1. 再次运行
[null@Docker module]$ sudo docker run hello-worldHello from Docker!
This message shows that your installation appears to be working correctly.To generate this message, Docker took the following steps:1. The Docker client contacted the Docker daemon.2. The Docker daemon pulled the "hello-world" image from the Docker Hub.(amd64)3. The Docker daemon created a new container from that image which runs theexecutable that produces the output you are currently reading.4. The Docker daemon streamed that output to the Docker client, which sent itto your terminal.To try something more ambitious, you can run an Ubuntu container with:$ docker run -it ubuntu bashShare images, automate workflows, and more with a free Docker ID:https://hub.docker.com/For more examples and ideas, visit:https://docs.docker.com/get-started/[null@Docker module]$ 

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.mzph.cn/web/22640.shtml

如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈email:809451989@qq.com,一经查实,立即删除!

相关文章

视频生成框架EasyAnimate正式开源!

近期&#xff0c;Sora模型的热度持续上涨&#xff0c;社区中涌现了一些类Sora的开源项目&#xff0c;这些项目均基于Diffusion Transformer结构&#xff0c;使用Transformer结构取代了UNet作为扩散模型的基线&#xff0c;旨在生成更长、更高分辨率、且效果更好的视频。EasyAnim…

罗德与施瓦茨RS SMA100A 9KHZ-3GHZ或6GHZ信号发生器

R&S SMA100A 提供信号质量、速度和灵活性。R&S SMA100A 是一款高级模拟发生器&#xff0c;因其出色的特性而树立了标准。 它结合了卓越的信号质量和极高的设置速度。无论是在开发、生产、服务还是维护方面&#xff0c;R&SSMA100A 都能出色地完成任务。 罗德与施瓦茨…

空调外机清洁机器人设计

现在的空调&#xff0c;有很多安装在高层&#xff0c;一旦安装使用后&#xff0c;外机几乎不可能再清洗。因为费用高&#xff0c;清洁工人的钱应该是好几百还不止&#xff1b;清洁风险高&#xff0c;空调师傅需要高空作业&#xff0c;如果发生意外业主难以承担。但空调运行几年…

Web IDE 在线编辑器综合实践(Web IDE 技术探索 三)

前言 前面两篇文章&#xff0c;我们简单讲述了 WebContainer/api 、Terminal 的基本使用&#xff0c;离完备的在线代码编辑器就差一个代码编辑了。今天通过 monaco editor &#xff0c;来实现初级代码编辑功能&#xff0c;讲述的是整个应用的搭建&#xff0c;并不单独针对monac…

LeetCode-43. 字符串相乘【数学 字符串 模拟】

LeetCode-43. 字符串相乘【数学 字符串 模拟】 题目描述&#xff1a;解题思路一&#xff1a;模拟乘法&#xff0c;两个数中每一位数相乘的时候乘上他们各自的进制数&#xff0c;之后求和。循环时&#xff0c;分别记录各自的进制数背诵版&#xff1a;解题思路三&#xff1a;0 题…

项目-双人五子棋对战:匹配模块的实现(3)

完整代码见: 邹锦辉个人所有代码: 测试仓库 - Gitee.com 模块详细讲解 功能需求 匹配就类似于大家平常玩的王者荣耀这样的匹配功能, 当玩家点击匹配之后, 就会进入到一个匹配队列, 当匹配到足够数量的玩家后, 就会进入确认页. 在这里, 我们主要实现的是1 - 1匹配功能, 首先先…

注册windows系统服务

目录 一、把任意exe程序注册成windows系统服务 二、将bat文件或exe程序注册成windows服务 三、设置window服务示例 1、redis 2、ActiveMQ 3、tomcat 4、nginx 一、把任意exe程序注册成windows系统服务 1、方法一&#xff1a;使用windows自带的命令InstallUtil.exe 步骤…

每日一练 - BGP协议报文发送机制

01 真题题目 BGP 协议的报文都是周期性发送. A.正确 B.错误 02 真题答案 B 03 答案解析 BGP&#xff08;Border Gateway Protocol&#xff09;边界网关协议并不定期或周期性发送其报文。与某些路由协议&#xff08;如RIP&#xff09;不同&#xff0c;BGP采用触发更新&#x…

pycharm链接auto al服务器

研0提前进组&#xff0c;最近阻力需求是把一个大模型复现&#xff0c;笔者电脑18年老机子&#xff0c;无法满足相应的需求。因此租用auto dl服务器。本文记录自己使用pycharm&#xff08;专业版&#xff09;链接auto dl期间踩过的坑。 1.下载pycharm专业版 这一步不解释了&am…

逐步掌握最佳Ai Agents框架-AutoGen 九 RAG应用

在最近的几篇文章里&#xff0c;我们使用AutoGen实现了一些Demo。这篇文章&#xff0c;我们将使用AutoGen来完成RAG应用开发。 RAG应用 RAG全称"Retrieval-Augmented Generation",即检索增强生成&#xff0c;它是自然语言处理中的一项技术。这种模型结合了检索式&a…

Latex之图片排列的简单使用(以MiKTeX工具为例)

一、参考资料 Latex如何插入图片 Latex 学术撰写工具推荐&#xff08;在线、Windows、Mac、Linux&#xff09; 关于Latex并排多张图片及加入图片说明的方法 二、准备工作 1. 在线LaTex工具 Overleaf 2. 本地LaTex工具 MiKTeX 3. 测试用例 \documentclass{article} \ti…

【Vue】computed 计算属性 VS methods 方法

文章目录 一、computed 计算属性二、methods 方法 一、computed 计算属性 作用&#xff1a;封装了一段对于数据的处理&#xff0c;求得一个结果&#xff0c;而且还可以拿这个结果去缓存。 语法&#xff1a; ① 写在 computed 配置项中 ② 作为属性&#xff0c;直接使用 → …

拓展商机的金钥匙:成为SSL证书合作商的长期回报

在当今数字化浪潮中&#xff0c;网络安全已经成为企业生存和发展不可或缺的一部分。随着在线交易和数据交换的增多&#xff0c;SSL证书作为保障网站安全和增强用户信任的关键工具&#xff0c;其重要性日益凸显。成为SSL证书的合作商后&#xff0c;不仅能够立即开启新的收入来源…

解决微信小程序分享按钮不可用

问题描述 在微信小程序中点击胶囊按钮上的三个点&#xff0c;在弹出的对话框中的【分享给好友】【分享到朋友圈】按钮都属于不可用的状态&#xff0c;显示未设置。 问题截图 解决方案 在每个需要此功能的页面都需要添加此代码&#xff0c;否则就不能进行使用。 // vue3时&l…

证件照太大了怎么压缩到100k?6个软件教你快速进行压缩

证件照太大了怎么压缩到100k&#xff1f;6个软件教你快速进行压缩 压缩证件照大小通常需要使用专门的图片压缩工具或者图片编辑软件。以下是六款常用的软件&#xff0c;它们可以帮助你快速压缩证件照大小到100KB以内&#xff1a; 1.迅捷压缩&#xff1a;这是一款图片压缩工具…

应用程序加固的优势及其在移动应用安全中的重要性

哈喽&#xff0c;大家好呀&#xff0c;淼淼又来和大家见面啦&#xff0c;现如今移动应用已成为人们生活和工作的重要组成部分。然而&#xff0c;随着移动应用的普及&#xff0c;安全威胁也在不断增加&#xff0c;用户的个人信息和机密数据面临着被窃取和篡改的风险。为了应对这…

Linux c fread/fseek 函数

函数&#xff1a;fread size_t fread(void *ptr, size_t size, size_t nmemb, FILE *stream); 参数说明&#xff1a; 参数 buffer 指向要读取的数组中首个对象的指针 size 每个对象的大小&#xff08;单位是字节&#xff09; count 要读取的对象个数 stream 输入流 …

【WP|8】深入解析WordPress钩子函数

钩子函数&#xff08;Hook&#xff09;是WordPress插件和主题开发中最重要的概念之一。钩子函数允许开发者在特定的时刻或事件发生时插入自定义代码&#xff0c;以改变WordPress的默认行为或者添加新功能。钩子分为两种主要类型&#xff1a;动作&#xff08;Actions&#xff09…

【Kubernetes】k8s的调度约束(亲和与反亲和)

一、调度约束 list-watch 组件 Kubernetes 是通过 List-Watch 的机制进行每个组件的协作&#xff0c;保持数据同步的&#xff0c;每个组件之间的设计实现了解耦。 用户是通过 kubectl 根据配置文件&#xff0c;向 APIServer 发送命令&#xff0c;在 Node 节点上面建立 Pod 和…

Java使用正则表达式匹配以某个字符开始,某个字符结束

前言 好久没用regex了,之前用的贼溜的东西都忘完了,这次遇到一个东西恰好我觉得用正则表达式会方便一点,所以把这次的开发过程记录一下 这遍文章包括Java如何使用正则表达式去匹配解决正确的表达式却匹配不到数据的问题使用正则表达式却出现栈溢出的问题背景需求 首先我会根…