练习——配置阿⾥云yum仓库、配置清华镜像仓库、配置腾讯镜像仓库、配置自建仓库
创始人
2024-09-25 12:20:34
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

相关内容

热门资讯

代打辅助挂!wepoker私局... 代打辅助挂!wepoker私局代打,微信呢小程序游戏辅助器,指引教程(有挂分析)1、操作简单,无需微...
有玩家发现!wepoker游戏... 有玩家发现!wepoker游戏安装教程,牛总管辅助免费版,机巧教程(有挂功能)1、每一步都需要思考,...
黑科技教程!wepoker挂,... 黑科技教程!wepoker挂,微信小程序途游辅助免费,绝活儿教程(有挂存在)微信小程序途游辅助免费是...
现有关情况通报如下!hhpok... 现有关情况通报如下!hhpoker底牌透视脚本,广西友乐辅助器,诀窍教程(真的有挂)1、实时广西友乐...
方法辅助挂!德州局脚本,博雅红... 方法辅助挂!德州局脚本,博雅红河西元红河挂,窍门教程(果真有挂)博雅红河西元红河挂透视方法中分为三种...
据统计!hhpoker辅助器视... 据统计!hhpoker辅助器视频,情怀莆仙外g挂,秘籍教程(有挂功能)1、情怀莆仙外g挂透视辅助软件...
此事引发广泛关注!hhpkoe... 此事引发广泛关注!hhpkoer辅助器视频,情怀江湖手游辅助,教程书教程(有挂猫腻)1、玩家可以在情...
最新消息!红龙poker辅助平... 最新消息!红龙poker辅助平台,乐易四川麻将辅助,模块教程(存在有挂)1、许多玩家不知道乐易四川麻...
在玩家背景下!wepoker辅... 您好,全来潜山跑风辅助器这款游戏可以开挂的,确实是有挂的,需要了解加去威信【485275054】很多...
今天下午!德普之星透视,微信小... 今天下午!德普之星透视,微信小程序大贰辅助工具,阶段教程(真的有挂)1)微信小程序大贰辅助工具免费钻...