1

Mount DVD

[root@rhel66 ~]#  mount /dev/sr0 /media

Install the repo metadata

[root@rhel66 ~]# cp /media/media.repo /etc/yum.repos.d/rhel6.repo

List the repos

[root@rhel66 ~]# yum repolist all
Loaded plugins: product-id, security, subscription-manager
This system is not registered to Red Hat Subscription Management. You can use subscription-manager to register.
repo id          repo name                                              status
InstallMedia     Red Hat Enterprise Linux 6.6                           disabled
rhel-source      Red Hat Enterprise Linux 6Server - x86_64 - Source     disabled
rhel-source-beta Red Hat Enterprise Linux 6Server Beta - x86_64 - Sourc disabled
repolist: 0

Try to enable the repo

[root@rhel66 ~]# yum-config-manager --enable InstallMedia
Loaded plugins: product-id
============================== repo: InstallMedia ==============================
[InstallMedia]
bandwidth = 0
base_persistdir = /var/lib/yum/repos/x86_64/6Server
baseurl =
cache = 0
cachedir = /var/cache/yum/x86_64/6Server/InstallMedia
cost = 500
enabled = True
enablegroups = True
exclude =
failovermethod = priority
gpgcadir = /var/lib/yum/repos/x86_64/6Server/InstallMedia/gpgcadir
gpgcakey =
gpgcheck = False
gpgdir = /var/lib/yum/repos/x86_64/6Server/InstallMedia/gpgdir
gpgkey =
hdrdir = /var/cache/yum/x86_64/6Server/InstallMedia/headers
http_caching = all
includepkgs =
keepalive = True
mdpolicy = group:primary
mediaid = 1411733344.627228
metadata_expire = -1
metalink =
mirrorlist =
mirrorlist_expire = 86400
name = Red Hat Enterprise Linux 6.6
old_base_cache_dir =
password =
persistdir = /var/lib/yum/repos/x86_64/6Server/InstallMedia
pkgdir = /var/cache/yum/x86_64/6Server/InstallMedia/packages
proxy = False
proxy_dict =
proxy_password =
proxy_username =
repo_gpgcheck = False
retries = 10
skip_if_unavailable = False
ssl_check_cert_permissions = True
sslcacert =
sslclientcert =
sslclientkey =
sslverify = True
throttle = 0
timeout = 30.0
username =

List again, still disabled

[root@rhel66 ~]# yum repolist all
Loaded plugins: product-id, security, subscription-manager
This system is not registered to Red Hat Subscription Management. You can use subscription-manager to register.
repo id          repo name                                              status
InstallMedia     Red Hat Enterprise Linux 6.6                           disabled
rhel-source      Red Hat Enterprise Linux 6Server - x86_64 - Source     disabled
rhel-source-beta Red Hat Enterprise Linux 6Server Beta - x86_64 - Sourc disabled
repolist: 0

From the docs this looks like it simply has to work. But the repository stored on the DVD remains disabled.

  • yum install <package> --enablerepo=InstallMedia – Dejan Jan 12 '15 at 16:13
  • How should I know what the package is called when I can't even list the repo (since I cannot enable it)... – Marki Jan 12 '15 at 19:46
0

You have to modify the file copied into /etc/yum.repos.d/ and add the baseurl attribute with the path where the DVD is mounted as value.

baseurl=file:///path_to_DVD/
| improve this answer | |

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.