练习——配置阿⾥云yum仓库、配置清华镜像仓库、配置腾讯镜像仓库、配置自建仓库
创始人
2024-09-25 11:53:03
0

1.插⼊优盘,读取优盘数据

2.在vmware配置光盘iso⽂件,在linux系统中读取光盘⽂件

步骤一:在虚拟机上查看网络适配器的状态是否连接 步骤二:查看光盘读取情况 步骤三:查看挂载情况

3.配置阿⾥云yum仓库

(1)官方搜索 (2)在官方文件找到centos7 (3)回到虚拟机使用weget下载 (4)清除缓存,然后生成缓存 (5)查看仓库状态

4.配置清华镜像仓库

(1)编辑新的配置文件

(2)清除yum缓存

(3)在yum makecache 之前必须有自己的仓库不然不成功
就像这样:

(4)有了仓库之后就OK了

5.配置腾讯镜像仓库

(1)下载腾讯云的 yum 源配置文件

(2)清除 yum 缓存:

(3)更新 yum 缓存:

(4)验证

6.⾃建仓库 包含 net-tools bash-completion nginx tree等包

(1)配置文件定义软件包缓存路径
vim /etc/yum.conf

[main] [main] cachedir=/var/cache/yum/$basearch/$releasever #修改为1 keepcache=1 debuglevel=2 logfile=/var/log/yum.log exactarch=1 obsoletes=1 gpgcheck=1 plugins=1 installonly_limit=5 bugtracker_url=http://bugs.centos.org/set_project.php? project_id=23&ref=http://bugs.centos.org/bug_report_page.php? category=yum distroverpkg=centos-release
(2)先卸载nginx,再安装nginx
卸载nginx yum -y remove nginx
重新安装nginx yum -y install nginx
查找安装包
[root@localhost ~]# find /var/cache/ -name "*tree*" -type f /var/cache/yum/x86_64/7/os/packages/tree-1.6.0-10.el7.x86_64.rpm [root@localhost ~]# find /var/cache/ -name "*nginx*" -type f /var/cache/yum/x86_64/7/nginx-stable/packages/nginx-1.26.1- 2.el7.ngx.x86_64.rpm
只下载不安装
[root@localhost ~]# yum install --downloadonly --downloaddir=./soft samba
安装createrepo制作仓库的软件
[root@localhost ~]# yum -y install createrepo 已加载插件:fastestmirror Loading mirror speeds from cached hostfile 正在解决依赖关系 --> 正在检查事务 ---> 软件包 createrepo.noarch.0.0.9.9-28.el7 将被 安装 --> 正在处理依赖关系 python-deltarpm,它被软件包 createrepo-0.9.9- 28.el7.noarch 需要 --> 正在处理依赖关系 libxml2-python,它被软件包 createrepo-0.9.9- 28.el7.noarch 需要 --> 正在处理依赖关系 deltarpm,它被软件包 createrepo-0.9.9-28.el7.noarch 需要 --> 正在检查事务 ---> 软件包 deltarpm.x86_64.0.3.6-3.el7 将被 安装 ---> 软件包 libxml2-python.x86_64.0.2.9.1-6.el7_9.6 将被 安装 ---> 软件包 python-deltarpm.x86_64.0.3.6-3.el7 将被 安装 --> 解决依赖关系完成
把soft⽂件夹做成⼀个本地的⾃建仓库
[root@localhost ~]# createrepo soft/ Spawning worker 0 with 19 pkgs Workers FinishedSaving Primary metadata Saving file lists metadata Saving other metadata Generating sqlite DBs Sqlite DBs complete[root@localhost ~]# ls folder mysqlcommunity-libs-8.4.1-1.el7.aarch64.rpm mysql84-community-release-el7-1.noarch.rpm mysql-community-libs-compat-8.4.1-1.el7.aarch64.rpm mysql-community-client-8.4.1-1.el7.aarch64.rpm mysql-community-server-8.4.1-1.el7.aarch64.rpm mysql-community-client-plugins-8.4.1-1.el7.aarch64.rpm mysql-community-server-debug-8.4.1-1.el7.aarch64.rpm mysql-community-common-8.4.1-1.el7.aarch64.rpm rpm-4.16.1.3- 25.el9.src.rpm mysql-community-devel-8.4.1-1.el7.aarch64.rpm rpmbuild mysql-community-embedded-compat-8.4.1-1.el7.aarch64.rpm soft mysql-community-icu-data-files-8.4.1-1.el7.aarch64.rp
3.在/etc/yum.repos.d/下创建soft.repo
vim /etc/yum.repos.d/soft.repo [soft] name=soft_local gpgcheck=0 baseurl=file:///root/soft enable=1清理缓存 [root@localhost soft]# yum clean all 已加载插件:fastestmirror 正在清理软件源: soft Cleaning up list of fastest mirrors Other repos take up 748 M of disk space (use --verbose for details)
创建缓存[root@localhost soft]# yum makecache 已加载插件:fastestmirror Determining fastest mirrors soft | 2.9 kB 00:00:00 (1/3): soft/filelists_db | 6.6 kB 00:00:00 (2/3): soft/other_db | 10 kB 00:00:00 (3/3): soft/primary_db | 33 kB 00:00:00
元数据缓存已建⽴# 再次安装samba [root@localhost soft]# yum -y install samba 已加载插件:fastestmirror Loading mirror speeds from cached hostfile 正在解决依赖关系 --> 正在检查事务 ---> 软件包 samba.x86_64.0.4.10.16-25.el7_9 将被 安装 --> 正在处理依赖关系 samba-libs = 4.10.16-25.el7_9,它被软件包 samba-4.10.16- 25.el7_9.x86_64 需要 --> 正在处理依赖关系 samba-common-tools = 4.10.16-25.el7_9,它被软件包 samba- 4.10.16-25.el7_9.x86_64 需要 --> 正在处理依赖关系 samba-common-libs = 4.10.16-25.el7_9,它被软件包 samba- 4.10.16-25.el7_9.x86_64 需要 --> 正在处理依赖关系 samba-common = 4.10.16-25.el7_9,它被软件包 samba- 4.10.16-25.el7_9.x86_64 需要 --> 正在处理依赖关系 samba-common = 4.10.16-25.el7_9,它被软件包 samba- 4.10.16-25.el7_9.x86_64 需要 --> 正在处理依赖关系 samba-client-libs = 4.10.16-25.el7_9,它被软件包 samba- 4.10.16-25.el7_9.x86_64 需要 --> 正在处理依赖关系 libwbclient = 4.10.16-25.el7_9,它被软件包 samba- 4.10.16-25.el7_9.x86_64 需要
下载不安装以下指令
yum install --downloadonly --downloaddir=./soft tree
yum install --downloadonly --downloaddir=./soft net-tools
yum install --downloadonly --downloaddir=./soft bash-completion
yum install --downloadonly --downloaddir=./soft nginx [root@ddnn soft]# ls
bash-completion-2.1-8.el7.noarch.rpm
net-tools-2.0-0.25.20131004git.el7.x86_64.rpm
nginx-1.26.1-2.el7.ngx.x86_64.rpm

相关内容

热门资讯

终于找到“哪里购买斗牛牛链接房... 长虹大厅是一款非常受欢迎的棋牌游戏,咨询房/卡添加微信:44346008许多玩家在游戏中会购买房卡来...
玩家揭秘!微信里面炸金花链接房... 微信游戏中心:新乐游在哪里买打开微信,添加客【33699510】,进入游戏中心或相关小程序,搜索“微...
终于找到“牛牛链接房卡在哪里弄... 新永和是一款非常受欢迎的棋牌游戏,咨询房/卡添加微信:44346008许多玩家在游戏中会购买房卡来享...
玩家揭秘!炸金花从哪里买房卡,... 微信游戏中心:新乐游在哪里买打开微信,添加客【33699510】,进入游戏中心或相关小程序,搜索“微...
ia实测“哪里有卖微信扎金花房... 狂飙大厅是一款非常受欢迎的棋牌游戏,咨询房/卡添加微信:44346008许多玩家在游戏中会购买房卡来...
玩家揭秘!微信炸金花房卡自建房... 微信游戏中心:熊猫在哪里买打开微信,添加客【33699510】,进入游戏中心或相关小程序,搜索“微信...
正版授权“金花房卡购买正规渠道... 长虹大厅是一款非常受欢迎的棋牌游戏,咨询房/卡添加微信:44346008许多玩家在游戏中会购买房卡来...
玩家揭秘!微信牛牛房卡自建房间... 微信游戏中心:新世界在哪里买打开微信,添加客【33699510】,进入游戏中心或相关小程序,搜索“微...
房卡必备教程“扎金花房卡链接怎... 牛魔王正厅是一款非常受欢迎的棋牌游戏,咨询房/卡添加微信:44346008许多玩家在游戏中会购买房卡...
房卡必备教程“金花大厅房卡链接... 新众乐是一款非常受欢迎的棋牌游戏,咨询房/卡添加微信:44346008许多玩家在游戏中会购买房卡来享...
玩家揭秘!拼三张的房卡找谁买,... 微信游戏中心:新九游在哪里买打开微信,添加客【33699510】,进入游戏中心或相关小程序,搜索“微...
终于找到“金花游戏房卡怎么获得... 牛魔王正厅是一款非常受欢迎的棋牌游戏,咨询房/卡添加微信:44346008许多玩家在游戏中会购买房卡...
玩家揭秘!微信的炸金花房卡怎么... 微信游戏中心:新九五在哪里买打开微信,添加客【33699510】,进入游戏中心或相关小程序,搜索“微...
一分钟推荐“如何在微信上购买金... 新西部是一款非常受欢迎的棋牌游戏,咨询房/卡添加微信:44346008许多玩家在游戏中会购买房卡来享...
ia实测“微信群牛牛房卡去哪买... 人皇大厅是一款非常受欢迎的棋牌游戏,咨询房/卡添加微信:44346008许多玩家在游戏中会购买房卡来...
玩家揭秘!微信里面拼三张链接房... 微信游戏中心:新人皇在哪里买打开微信,添加客【33699510】,进入游戏中心或相关小程序,搜索“微...
正版授权“金花房卡微信链接怎么... 金牛座是一款非常受欢迎的棋牌游戏,咨询房/卡添加微信:44346008许多玩家在游戏中会购买房卡来享...
玩家揭秘!拼三张房卡怎么弄,茄... 微信游戏中心:在哪里买打开微信,添加客【33699510】,进入游戏中心或相关小程序,搜索“微信炸金...
一分钟了解“斗牛房间如何开启房... 新毛豆互娱是一款非常受欢迎的棋牌游戏,咨询房/卡添加微信:44346008许多玩家在游戏中会购买房卡...
给大家讲解“微信金花群怎么买房... 随意玩是一款非常受欢迎的棋牌游戏,咨询房/卡添加微信:44346008许多玩家在游戏中会购买房卡来享...