Rocky Linux 搭建本地源方法如下:

首先下载 Rocky Linux 的光盘镜像,官网下载地址:https://rockylinux.org/download/ 下载到的文件名为:Rocky-8.4-x86_64-dvd1.iso,我们暂时先放到/root 目录下。

创建挂载光盘镜像的目录并挂载iso到目录上:
mkdir -p /media/Rocky
mount -o loop Rocky-8.4-x86_64-dvd1.iso /media/Rocky

修改/etc/yum.repos.d/ 里的Rocky-AppStream.repo,Rocky-BaseOS.repo关闭和Rocky-Media.repo启用配置,内容如下

[root@mgt yum.repos.d]# vim Rocky-AppStream.repo

# Rocky-AppStream.repo
#
# The mirrorlist system uses the connecting IP address of the client and the
# update status of each mirror to pick current mirrors that are geographically
# close to the client.  You should use this for Rocky updates unless you are
# manually picking other mirrors.
#
# If the mirrorlist does not work for you, you can try the commented out
# baseurl line instead.[appstream]
name=Rocky Linux $releasever - AppStream
mirrorlist=https://mirrors.rockylinux.org/mirrorlist?arch=$basearch&repo=AppStream-$releasever
#baseurl=http://dl.rockylinux.org/$contentdir/$releasever/AppStream/$basearch/os/
gpgcheck=1
enabled=0
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-rockyofficial
# Rocky-Extras.repo
#
# The mirrorlist system uses the connecting IP address of the client and the
# update status of each mirror to pick current mirrors that are geographically
# close to the client.  You should use this for Rocky updates unless you are
# manually picking other mirrors.
#
# If the mirrorlist does not work for you, you can try the commented out
# baseurl line instead.[extras]
name=Rocky Linux $releasever - Extras
mirrorlist=https://mirrors.rockylinux.org/mirrorlist?arch=$basearch&repo=extras-$releasever
#baseurl=http://dl.rockylinux.org/$contentdir/$releasever/extras/$basearch/os/
gpgcheck=1
enabled=0
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-rockyofficial
# Rocky-BaseOS.repo
#
# The mirrorlist system uses the connecting IP address of the client and the
# update status of each mirror to pick current mirrors that are geographically
# close to the client.  You should use this for Rocky updates unless you are
# manually picking other mirrors.
#
# If the mirrorlist does not work for you, you can try the commented out
# baseurl line instead.[baseos]
name=Rocky Linux $releasever - BaseOS
mirrorlist=https://mirrors.rockylinux.org/mirrorlist?arch=$basearch&repo=BaseOS-$releasever
#baseurl=http://dl.rockylinux.org/$contentdir/$releasever/BaseOS/$basearch/os/
gpgcheck=1
enabled=0
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-rockyofficial
# Rocky-Media.repo
#
# You can use this repo to install items directly off the installation media.
# Verify your mount point matches one of the below file:// paths.[media-baseos]
name=Rocky Linux $releasever - Media - BaseOS
baseurl=file:///media/Rocky/BaseOSfile:///media/cdrom/BaseOSfile:///media/cdrecorder/BaseOS
gpgcheck=1
enabled=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-rockyofficial[media-appstream]
name=Rocky Linux $releasever - Media - AppStream
baseurl=file:///media/Rocky/AppStreamfile:///media/cdrom/AppStreamfile:///media/cdrecorder/AppStream
gpgcheck=1
enabled=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-rockyofficial

上述配置文件保存后,执行:
yum clean all
yum makecache

可以再 yum install cmake 之类的软件包安装一下试试。

Rocky Linux 挂载DVD光盘ISO作为yum本地源相关推荐

  1. 虚拟机下挂载CentOS 镜像并配置yum本地镜像源

    挂载光盘 #mkdir /mnt/media #中间有空格,创建挂载点 #mount /dev/cdrom /mnt/media #挂载 配置Yum本地源 rm -rf /etc/yum.respos ...

  2. CentOS-创建yum本地源

    yum概述 yum( Yellow dog Updater, Modified)是一个在Fedora和RedHat以及SUSE中的Shell前端软件包管理器. 基於RPM包管理,能够从指定的服务器自动 ...

  3. 【DVE命令报错,yum本地源配置】error while loading shared libraries:libtermcap.so.2

    做了一个覆盖率验证的小实验,当运行dve_cov命令查看覆盖率时报错:提示缺少库文件libtermcap.so.2 于是去网上搜索原因以及解决办法:使用指令"yum install comp ...

  4. yum本地源 baseurl repodata repomd.xml comps.xml(一)

    (一)相关讲解<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /> ...

  5. vmware 利用镜像 配置yum本地源

     在使用vmware workstation虚拟机配置yum本地源的时候往往不知道file:///后面该写些什么.vmware里面似乎有个tool可以自动挂载使用的镜像.但是很多时候ls /media ...

  6. centos配置yum本地源

    有时生产环境限制centos主机外联,这个时候要部署一些软件就比较麻烦,为利用yum机制,需要建立yum本地源,最好是建立ftp服务器作为源,可以在局域网内共享. yum 主要功能是更方便的添加/删除 ...

  7. yum命令,yum本地源,共享yum源

    yum命令 命令:####查看软件包yum list all ##列出yum源仓库里面的所有可用的安装包 yum list installed ##列出所有已经安装的安装包 yum list avai ...

  8. yum本地源 baseurl repodata repomd.xml comps.xml

    (一)相关讲解 repodata作为软件的仓库,其目录下有四个必要文件:filelists.xml.[gz],other.xml.[gz],primary.xml.[gz]和repomd.xml(md ...

  9. 通过linux挂载光盘以及搭建yum本地仓库使用rpm软件包

    linux挂载光盘 yum并没有从0创建仓库的能力,仓库的本质是rpm包+repodata元数据.必须要现有rpm包和repodata元数据,yum才能所谓的搭建一个软件仓库 光盘里自带了rpm包和r ...

最新文章

  1. Selective Search
  2. PyTorch | Tensor、Numpy、Variable之间的转换
  3. 多家防火墙设备存在信息泄露漏洞
  4. bcb隐藏窗口_BCB隐藏Windows任务栏的方法
  5. android 速度检测工具,IT之家学院:如何测试Android应用启动速度
  6. Virtualbox虚拟机Linux Guest的Additions安装方法
  7. aspnet网站开发实例_给自己开发一个网站,这是我的方法。
  8. XXE漏洞原理/防御
  9. “生命游戏之父”因新冠肺炎逝世,回顾数学顽童的一生
  10. 【NER】NLP-入门实体命名识别(NER)+Bilstm-CRF模型原理Pytorch代码详解——最全攻略...
  11. 24. flock() 函数
  12. 浅析 路印协议--Loopring 及整体分析 Relay 源码
  13. matlab node._matlab调用ansys
  14. 【转载】smobiler说明
  15. 梦幻手游网页版校验服务器失败,梦幻神域手游服务器验证失败进不去解决办法...
  16. 【VBA】通过VBA实现EXCEL真正的全屏显示
  17. sd卡格式化不了怎么办?
  18. 动态半导体ram依据什么存储信息_静态ram和动态ram的区别是什么
  19. 库文件搜索路径及GCC搜索路径总结
  20. Programming OpenGL in Linux: GLX and Xlib

热门文章

  1. linux4.6 EC11旋转编码器的驱动
  2. FTP 的Java客户端操作
  3. Java实例技术手册 中国电力出版社
  4. 我的实用设计模式之Observer模式
  5. 爬虫—豆瓣图书标签下的书籍信息
  6. CryptoAPI编程
  7. 从键盘输入圆柱体的半径和高,编程计算圆柱体的体积。
  8. 华为云计算学习:FusionStorage冗余性-副本
  9. mysql mof提权原理_(新安全原创精华)Mysql扩展文件MOF提权详讲
  10. java 启动多个jvm实例_当多个Java程序在同一台计算机上运行时