Friday, 30 December 2016

Red Hat Enterprise Linux 7.3 - Setting up a YUM Repository

Well, I've done this for most other RH-based distros over the years: -

so here goes for RHEL 7.3: -

Mount the RHEL ISO

mount /dev/cdrom  /mnt

Install the required RPMs

rpm -ivh /mnt/Packages/deltarpm-3.6-3.el7.x86_64.rpm 

rpm -ivh /mnt/Packages/python-deltarpm-3.6-3.el7.x86_64.rpm 

rpm -ivh /mnt/Packages/createrepo-0.9.9-23.el7.noarch.rpm

Install the GPG Key

rpm --import /mnt/RPM-GPG-KEY-redhat-release

Setup the Target Directory

mkdir /var/repo
mkdir /var/repo/rhel72
cd /var/repo/rhel72/

Copy the RPMs from the ISO

cp -R /mnt/Packages/* .

Create the Repository

cd ..
createrepo .

Update YUM to reflect the newly added Respository

mv /etc/yum.repos.d /etc/yum.repos.original

mkdir /etc/yum.repos.d

cd /etc/yum.repos.d/

vi server.repo

inserting: -


Unmount the ISO

umount /mnt

Validate the Repository

yum list

Install an RPM from the Repository

yum install -y telnet

Job done

No comments:

Grokking grep

A colleague was tinkering with grep  and, thanks to him, I discovered a bit more about the trusty little utility. I had not really explored ...