Posts tagged ‘repos’

How to use the RHEL / CentOS Media as the Repository.

When you don’t have an active subscription with RHN , you will not be ale to install any packages via yum command. In that case the only way to overcome this situation is to use your installation CD or the binary CD you have downloaded from the RHEL website.

1.
#mount /dev/sr0 /mnt

2.Copy the media.repo file from the root of the mounted directory to /etc/yum.repos.d/ and set the permissions to something sane,

#cp /mnt/media.repo /etc/yum.repos.d/rhel7dvd.repo
#chmod 644 /etc/yum.repos.d/rhel7dvd.repo

3.Edit the new repo file, changing the gpgcheck=0 setting to 1 and adding the following 3 lines

enabled=1
baseurl=file:///mnt/  –> Here provide the mount point you used in Step1—>
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release

4.

# yum clean all
# subscription-manager clean

5. Once the above steps are completed you could begin with your familiar yum installation.

NOTE: I have not tried these steps in CentOS , but I believe it is portable and applicable.

 

Advertisement

March 6, 2018 at 10:39 am Leave a comment


Archives

Categories

Follow Hope you like it.. on WordPress.com

Blog Stats

  • 65,261 hits

%d bloggers like this: