有时候你的linux系统不能联网,当然就不能很便捷的使用联网的yum源了,这时候就需要你自己会利用linux系统光盘制作一个yum源。具体步骤如下:

(1)挂载光盘

[[email protected] ~]# mount /dev/cdrom /mnt

(2)删除/etc/yum.repos.d目录所有的repo文件

[[email protected] ~]# rm -rf /etc/yum.repos.d/*

(3) 创建新文件dvd.repo

[[email protected] ~]# vim /etc/yum.repos.d/dvd.repo

加入以下内容:

[dvd] name=install dvd baseurl=file:///mnt enabled=1 gpgcheck=0

(4)刷新 repos 生成缓存

[[email protected] ~]# yum makecache

然后就可以使用yum命令安装你所需要的软件包了

搭建本地yum仓库

搭建本地yum仓库

搭建本地yum仓库


转载于:https://blog.51cto.com/12360027/1934336

相关文章:

  • 2022-12-23
  • 2021-04-02
  • 2021-12-31
  • 2022-02-04
  • 2021-10-02
  • 2021-07-11
  • 2021-12-21
  • 2022-12-23
猜你喜欢
  • 2022-01-17
  • 2021-12-22
  • 2021-12-17
  • 2021-05-20
  • 2022-01-24
  • 2021-05-02
  • 2021-08-18
相关资源
相似解决方案