2

How to install and update packages from DVD which I mounted? What I do so far is to mount the DVD.

#mount -r -t iso9660 /dev/sr0 /mnt/DVD

So now is there a way to update it automatic all packets or I must do one by one? For example:

yum --disablerepo=\* --enablerepo=DVD install ....

UPDATE: This is content of /etc/yum.repos.d/local.repo

[DVDRepo]
name=Local DVD Repository
baseurl=file:///mnt/DVD
enabled=1
gpgcheck=1
4

first you have to create a repo file for your new repo (the dvd) For example a file called /etc/yum.repos.d/dvd.repo

[dvd]
name=Local DVD Repository
baseurl=file:///mnt/DVD
enabled=1
gpgcheck=1

Then you should disable your other repos and update, and you'll be able to run a yum update from there.

| improve this answer | |
  • Sorry for my late comment and thanks for your answer. I have updated my question with content of the repo file. When I run yum update I got this: Loaded plugins: fastestmirror and file:///mnt/DVD/repodata/repomd.xml: [Errno -1] Error importing repomd.xml for DVDRepo: Damaged repomd.xml file – Garg Dec 14 '15 at 8:45
  • my bad I used my knowledge about old RedHat dvd to write the answer, I've tried with a new CentOS 7 DVD and updated my answer. – Pierre-Alain TORET Dec 14 '15 at 9:15
  • I have name name=Local DVD Repository – Garg Dec 14 '15 at 9:27
  • ah right, I will edit my answer. – Pierre-Alain TORET Dec 14 '15 at 9:28
  • So you mean that I must remove gpgcheck=1 from my file? – Garg Dec 14 '15 at 9:35

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.