4
Linux 配置本地 YUM 镜像源
source link: https://segmentfault.com/a/1190000039681719
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
Linux 配置本地 YUM 镜像源
发布于 今天 11:00
# 手动挂载,将/dev/sr0设备挂载到/media目录,-o ro为只读模式
mount -o ro /dev/sr0 /media
# 配置开机自动执行挂载
echo "mount -o ro /dev/sr0 /media" >> /etc/rc.local
chmod -x /etc/rc.d/rc.local
# 查看文件系统的挂载点
df -h
# 查看光盘内容
ls /media/
# 配置本地YUM镜像源
cd /etc/yum.repos.d/
vim local.repo
[BaseOS]
name=baseos yum
enabled=1
baseurl=file:///media/BaseOS/
gpgcheck=0
[AppStream]
name=app yum
enabled=1
baseurl=file:///media/AppStream/
gpgcheck=0
# 清空yum缓存
yum clean all
# 创建yum缓存
yum makecache
# 查看仓库信息
yum repolist
Recommend
About Joyk
Aggregate valuable and interesting links.
Joyk means Joy of geeK