Rocky 9.8设置本地yum源

#先进入路径

cd /etc/yum.repos.d

#然后把所有的源移到文件夹里只留一个即可

mkdir bak

mv * bak/

cp bak/rocky.repo

#然后编辑配置文件,编辑成功就可以挂载并安装服务了,其他的全删掉

vim rocky.repo

rocky.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

baseurl=file:///media/BaseOS/

gpgcheck=1

enabled=1

countme=1

repo_gpgcheck=0

metadata_expire=6h

gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-Rocky-9

appstream

name=Rocky Linux $releasever - AppStream

baseurl=file:///media/AppStream/

gpgcheck=1

enabled=1

repo_gpgcheck=0

countme=1

metadata_expire=6h

gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-Rocky-9

gpgcheck=1

#保存并退出

:wq

mount /dev/cdrom /media

yum -y install vim

#成功即可

sudo dnf groupinstall "Development Tools" -y 安装必要的开发软件包

相关推荐
ajassi200037 分钟前
AI语音智能体开发日记(十八)智能体服务器xiaozhi-esp32-server源码部署指南
运维·服务器·人工智能·ai·ai编程
‎ദ്ദിᵔ.˛.ᵔ₎41 分钟前
linux 进程信号(下)
linux·运维·服务器
yumgpkpm1 小时前
Acceldata ODP 3.3.6.4 vs CDP Private Cloud Base 7.3.2 对比
大数据·运维·服务器·hadoop·华为·zookeeper·hbase
Liuqy-051 小时前
特殊进程——孤儿、僵尸、守护进程
linux·运维·服务器
等我调个Bug2 小时前
【Linux系统篇】权限
linux·服务器
Gauss松鼠会4 小时前
【GaussDB】破除gaussdb ugin索引支持中文模糊查询的迷思-字符序
java·运维·服务器·网络·数据库·gaussdb·经验总结
Bruce_Liuxiaowei5 小时前
内网“影子资产“:串口服务器安全盲区剖析
服务器·网络·安全·iot
晴天的雨.9925 小时前
【Linux】基础开发工具---软件包管理器
linux·运维·服务器
云计算练习生5 小时前
什么是操作系统安全?身份认证、访问控制与审计机
服务器·网络·安全·访问控制·操作系统安全
对空六课6 小时前
Vue 组件曝光埋点为什么会重复触发?去重方案与实现思路
服务器·前端·算法·数据分析