Anda di halaman 1dari 2

Add DVD ISO To Yum Repository

I have some issues to connect to internet in my CentOS 6.4 minimal server and i need to install some pac a!es ri!ht no". So "hat should i do no" "ithout internet# Its very simple$ I %ust added my CentOS 6.4 DVD location to my repository &iles &ound in the /etc/yum.repos.d/ directory and installed the so&t"are's "hich i need. This is ho" i added the CentOS DVD iso to my yum repository. (irst o& all) you need to create a mount point and mount the Installation *edia.
# mkdir /mnt/cdrom

*ount the cdrom drive to /mnt/cdrom+


# mount /dev/cdrom /mnt/cdrom/ mount: block device /dev/sr0 is write-protected, mounting read-only

Chec i& it is correctly mounted+


# ls -altr /mnt/cdrom/

Sample output+
total 547 -r--r--r--. -r--r--r--. -r--r--r--. -r--r--r--. -r--r--r--. -r--r--r--. -r--r--r--. -r--r--r--. dr-9r-9r-9. dr-9r-9r-9. dr-9r-9r-9. -r--r--r--. -r--r--r--. -r--r--r--. dr-9r-9r-9. dr-9r-9r-9. drw9r-9r-9. root root root root root root root root root root root root root root root root root root root root root root root root root root root root root root root root root root !7"4 #ar ! !$:!5 %&#-'&'-()*-+ent,--.esting-$ !7"0 #ar ! !$:!5 %&#-'&'-()*-+ent,---ecurity-$ !7"0 #ar ! !$:!5 %&#-'&'-()*-+ent,--/ebug-$ !70$ #ar ! !$:!5 %&#-'&'-()*-+ent,--$ !0001 #ar ! !$:!5 '&2 ! #ar ! !$:!5 )324 !"54 #ar ! !$:!5 %)2)4-)-5,.)--en-3-.6tml !4 #ar 4 0:00 +ent,-78uild.ag 040 #ar 4 0:! isolinu9 040 #ar 4 0:!" images 50115 #ar 5 !1:"$ &ackages 1 #ar 5 !1:"$ .discin:o ""4 #ar 5 !1:"7 .treein:o "!$5 #ar 5 !1:"7 .%45-..82 401$ #ar 5 !1:"7 repodata 401$ #ar 5 !1:"7 . 401$ 4ug !1 0$:44 ..

" ! ! ! $ "

,et us add ISO location to /etc/yum.repos.d/CentOS-Media.repo.


# nano /etc/yum.repos.d/+ent,--#edia.repo

*a e the chan!es as sho"n -elo". See the red coloured lines.


# # # # # # +ent,--#edia.repo .6is repo can be used wit6 mounted /;/ media, veri:y t6e mount point :or +ent,--$. *ou can use t6is repo and yum to install items directly o:: t6e /;/ <-, t6at we release.

# .o use t6is repo, put in your /;/ and use it wit6 t6e ot6er repos too: # yum --enablerepo=c$-media >command? # # or :or ,52* t6e media repo, do t6is: # # yum --disablerepo=@A --enablerepo=c$-media >command? >c$-media? name=+ent,--Breleasever - #edia baseurl=:ile:///media/+ent,-/ ## 4dd t6e :ollowing lines ## :ile:///mnt/cdrom/ gpgc6eck=! enabled=! gpgkey=:ile:///etc/pki/rpm-gpg/%&#-'&'-()*-+ent,--$

.o" try to install some pac a!es li e /0nome Des top'.


# yum groupinstall C/esktopC

Anda mungkin juga menyukai