您好,登錄后才能下訂單哦!
搭建本地光盤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 ...
元數據緩存已建立
免責聲明:本站發布的內容(圖片、視頻和文字)以原創、轉載和分享為主,文章觀點不代表本網站立場,如果涉及侵權請聯系站長郵箱:is@yisu.com進行舉報,并提供相關證據,一經查實,將立刻刪除涉嫌侵權內容。