1. 程式人生 > >yum掛載本地光盤鏡像

yum掛載本地光盤鏡像

yum掛載本地光盤鏡像

[root@aniu-saas-1 yum.repos.d]# ls -l /dev | grep cdrom

lrwxrwxrwx 1 root root 3 Nov 16 00:33 cdrom -> sr0

crw-rw----+ 1 root cdrom 21, 0 Nov 16 00:27 sg0

brw-rw----+ 1 root cdrom 11, 0 Nov 16 00:33 sr0

[root@aniu-saas-1 yum.repos.d]# mount /dev/cdrom /mnt

mount: /dev/sr0 is write-protected, mounting read-only

[root@aniu-saas-1 yum.repos.d]# vim yum.repo

[yum]

name=yum

baseurl=file:///mnt

gpgcheck=0

enabled=1

[root@aniu-saas-1 yum.repos.d]# yum clean all

Loaded plugins: langpacks, product-id, subscription-manager

This system is not registered to Red Hat Subscription Management. You can use subscription-manager to register.

Cleaning repos: yum

Cleaning up everything

[root@aniu-saas-1 yum.repos.d]# yum makecache

Loaded plugins: langpacks, product-id, subscription-manager

This system is not registered to Red Hat Subscription Management. You can use subscription-manager to register.

yum | 4.1 kB 00:00:00

(1/5): yum/group_gz | 134 kB 00:00:00

(2/5): yum/filelists_db | 3.0 MB 00:00:22

(3/5): yum/primary_db | 3.4 MB 00:00:30

(4/5): yum/other_db | 1.3 MB 00:00:09

(5/5): yum/productid | 1.6 kB 00:00:01

Metadata Cache Created


yum掛載本地光盤鏡像