LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Blogs > druuna
User Name
Password

Notices


- - - - - As of February 1st 2014 this blog is no longer updated - - - - -
Rate this Entry

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)
Tags dvd, repo, rhel

This article describes how to make a local repository from a RHEL installation DVD.

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.


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
Mount the DVD:
Code:
$ mount /dev/dvd /media
If an image is used instead of a DVD you can mount it as follows:
Code:
$ mount -o loop /path/to/rhel.6.4.iso /media
Copy the contents from the DVD to the newly created directory:
Code:
$ cp -ar /media/. /mnt/rhel_6.4_dvd/
Set up the system to use the freshly created repository:
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
Disable RHN and activate DVD repository:
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
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:
Quote:
This system is not registered to Red Hat Subscription Management.
Posted in General
Views 28040 Comments 0
« Prev     Main     Next »

  



All times are GMT -5. The time now is 07:51 AM.

Main Menu
Advertisement
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration