SHIFT

--- Sjoerd Hooft's InFormation Technology ---

User Tools

Site Tools


Sidebar

Recently Changed Pages:

View All Pages


View All Tags


LinkedIn




WIKI Disclaimer: As with most other things on the Internet, the content on this wiki is not supported. It was contributed by me and is published “as is”. It has worked for me, and might work for you.
Also note that any view or statement expressed anywhere on this site are strictly mine and not the opinions or views of my employer.


Pages with comments

View All Comments

redhatrepo

Red Hat Repositories

Red Hat uses repositories to manage the software. Every system comes with the Red Hat subscription channels which are available after you've registered your system. This article is about managing the repositories.

Create A Software Repository

If you have some rpms available which you want to install on a couple of systems you can do so by creating a repository and then adding the repo on the systems you want to install the RPMs on.

createrepo /software/repo

In this command the /software/repo directory holds the RPMs. This command adds the info yum needs to use the directory as a repo.

Add a Software Repository

You can add custom repo's by adding files to the correct directory. These files should have the following contents:

[label]
name=Optional name
baseurl=http://softwareserver.local/pub
gpgcheck=0/1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release
enabled=0/1
Note that if you set the gpgcheck to 0 you don't need the gpgkey.

List all Repositories

yum repolist
yum repolist all

Note that yum repolist also lists the repo's that are disabled.

Add Temporary Software Repo from Installation DVD

An installation medium is by default formatted as a repo, so just mounting it and adding it to the list of repo's is enough to make it possible to install software from it.

First mount the dvd:

mkdir /mnt/cdrom; mount -o loop /dev/cdrom /mnt/cdrom

Add the repository by going to the /etc/yum.repos.d directory and create a file. The name doesn't matter that much as long as it ends on .repo:

[root@redhatbox yum.repos.d]# vi dvd.repo
[dvd]
baseurl=file:///mnt/cdrom/Server
enabled=1
gpgcheck=0
Note: If you receive this error:
warning: rpmts_HdrFromFdno: Header V3 RSA/SHA256 Signature, key ID fd431d51: NOKEY
Public key for xorg-x11-drv-intel-2.16.0-1.el6.x86_64.rpm is not installed

You forgot to add the line “gpgcheck=0” in the .repo file.

Use the Repo

You can now user the repository to install for example the gnome desktop environment:

yum grouplist
yum groupinstall "X Window System" "GNOME Desktop Environment"
yum groupinstall "Development Tools"

For more information regarding yum see Red Hat Software

Resources

You could leave a comment if you were logged in.
redhatrepo.txt · Last modified: 2021/09/24 00:25 (external edit)