- - - - - As of February 1st 2014 this blog is no longer updated - - - - -
RHEL local DVD Repo
Posted 04-23-2013 at 03:37 AM by druuna
Updated 05-16-2013 at 03:52 AM by druuna (added rhel subscription link)
Updated 05-16-2013 at 03:52 AM by druuna (added rhel subscription link)
This article describes how to make a local repository from a RHEL installation DVD.
First and foremost:
The steps below are based on RHEL server 6.4 but the basics are the same for other versions.
The following assumptions are made:
- RHEL is already installed,
- Approximately 4 Gb free HD space is available (8 Gb if an image is used).
All the described steps are executed with root privileges.
A directory needs to be created which will contain the repository:
Mount the DVD:
If an image is used instead of a DVD you can mount it as follows:
Copy the contents from the DVD to the newly created directory:
Set up the system to use the freshly created repository:
Disable RHN and activate DVD repository:
From this point on you can use yum to search, install and remove packages that are available on the local system.
The following message will still be visible but is a reminder and harmless:
First and foremost:
Warning: RHEL is not a free product.
To get access to the fully up-to-date repositories (RHN) a paid subscription is needed.
Without this subscription it will not be possible to get security updates and the newest versions of packages.
An alternative for using RHEL would be CentOS or Scientific Linux. Both are free and almost identical to RHEL.
The below steps should only be used for testing, studying or evaluation purposes.
To get access to the fully up-to-date repositories (RHN) a paid subscription is needed.
Without this subscription it will not be possible to get security updates and the newest versions of packages.
An alternative for using RHEL would be CentOS or Scientific Linux. Both are free and almost identical to RHEL.
The below steps should only be used for testing, studying or evaluation purposes.
The steps below are based on RHEL server 6.4 but the basics are the same for other versions.
The following assumptions are made:
- RHEL is already installed,
- Approximately 4 Gb free HD space is available (8 Gb if an image is used).
All the described steps are executed with root privileges.
A directory needs to be created which will contain the repository:
Code:
$ mkdir /mnt/rhel_6.4_dvd
Code:
$ mount /dev/dvd /media
Code:
$ mount -o loop /path/to/rhel.6.4.iso /media
Code:
$ cp -ar /media/. /mnt/rhel_6.4_dvd/
Code:
$ cd /etc/yum.repos.d/ $ rm *.repo $ vi rhel64dvd.repo # add the following information: [rhel-dvd-server] name=Red Hat Enterprise Linux - DVD Server Repository baseurl=file:///mnt/rhel_6.4_dvd/Server enabled=1 gpgkey=file:///mnt/rhel_6.4_dvd/RPM-GPG-KEY-redhat-release gpgcheck=1 [rhel-dvd-lb] name=Red Hat Enterprise Linux - DVD Load Balancer Repository baseurl=file:///mnt/rhel_6.4_dvd/LoadBalancer enabled=1 gpgkey=file:///mnt/rhel_6.4_dvd/RPM-GPG-KEY-redhat-release gpgcheck=1 [rhel-dvd-ha] name=Red Hat Enterprise Linux - DVD High Availability Repository baseurl=file:///mnt/rhel_6.4_dvd/HighAvailability enabled=1 gpgkey=file:///mnt/rhel_6.4_dvd/RPM-GPG-KEY-redhat-release gpgcheck=1
Code:
$ vi /etc/yum/pluginconf.d/rhnplugin.conf # make sure enabled is set to 0 (enabled = 0) $ yum clean 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. Cleaning repos: rhel-dvd-ha rhel-dvd-lb rhel-dvd-server Cleaning up Everything $ rpm --import /mnt/rhel_6.4_dvd/RPM-GPG-KEY-redhat-release $ yum update Loaded plugins: product-id, security, subscription-manager This system is not registered to Red Hat Subscription Management. You can use subscription-manager to register. Setting up Update Process No Packages marked for Update
The following message will still be visible but is a reminder and harmless:
Quote:
This system is not registered to Red Hat Subscription Management.