1. 程式人生 > >Linux 制作本地yum源

Linux 制作本地yum源

linux 本地 yum yum源

將鏡像掛載

[[email protected] ~]# cd /mnt
[[email protected] mnt]# mkdir /mnt/cdrom
[[email protected] mnt]# mount -t iso9660 /dev/cdrom /mnt/cdrom

將鏡像內的文件拷貝到本地

[[email protected] ~]# mkdir /opt/localbase
[[email protected] ~]# cp -r /mnt/cdrom/* /opt/localbase/


在/etc/yum.repos.d 創建 local.repo 源文件

[[email protected] ~]# touch /etc/yum.repos.d/local.repo
[[email protected] ~]# vim /etc/yum.repos.d/local.repo
[rhel64]                           #這是庫名稱
baseurl=     #存放源的地址
gpgcheck=0                         #檢查GPG-KEY,0為不檢查,1為檢查
enabled=1                          #是否用該yum源,0為禁用,1為使用
name=rhel64                        #庫名稱的描述


測試yum是否配置成功

[[email protected] ~]# yum list


清理yum緩存

[[email protected] ~]# yum clean all



本文出自 “謝育政” 博客,請務必保留此出處http://kurol.blog.51cto.com/11433546/1927721

Linux 制作本地yum源