标签:refresh shell ted 创建 pki linux 插件 目录 package
搭建本地光盘yum源[root@localhost ~]#mkdir /mnt/cdrom
#创建cdrom目录,作为光盘的挂载点
[root@localhost ~]#mount -t iso9660 /dev/cdrom1 /mnt/cdrom/
mount: block device /dev/sr0 is write-protected mounting read-only
#挂载光盘到/mnt/cdrom目录下
[root@localhost ~]#cd /etc/yum.repos.d/
[root@localhost yum.repos.d]#mv *.repo /backup/
[root@localhost ~]# vim /etc/yum.repos.d/backup/CentOS-Media.repo
[c6-media]
name=CentOS-$releasever - Media
baseurl=file:///media/CentOS_6.6_Final/
file:///media/cdrom/
file:///dev/cdrom1
gpgcheck=1
enabled=0
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6
[root@localhost yum.repos.d]# yum clean all
已加载插件:fastestmirror, refresh-packagekit, security
Cleaning repos: demo
清理一切
[root@localhost yum.repos.d]# yum makecache
已加载插件:fastestmirror, refresh-packagekit, security
Determining fastest mirrors
demo
| 4.0 kB 00:00 ... demo/group_gz | 216 kB 00:00 ... demo/filelists_db
| 6.0 MB 00:00 ... demo/primary_db
| 4.5 MB 00:00 ... demo/other_db | 2.8 MB 00:00 ...
元数据缓存已建立
标签:refresh shell ted 创建 pki linux 插件 目录 package
原文地址:https://blog.51cto.com/9664355/2452408