How to Install Multiple RPM's - Red Hat 6
I have some RHEL 6 servers in a disconnected environment.
I have a Repo server in that environment that I built based on this solution: https://access.redhat.com/solutions/23016
These RHEL 6 servers are built to specific baseline, so I can't simply run 'YUM update' on these servers.
Every few months I'm given a list of RPM's to apply to these servers.
What's the best way to accomplish this?
I assume there is a better way than manually installing each RPM separately on each server?
Responses
If you followed the article you linked, your RPMs are on the repository server in /var/www/html/<repo-id>.
Now, make another directory /var/www/html/<name-of-your-baseline> and copy (or just link) the applicable RPMs from the main repository directory to that directory.
Then run createrepo -v /var/www/html/<name-of-your-baseline> and you'll now have another yum repository which contains only the RPMs validated for your baseline.
Follow https://access.redhat.com/solutions/2785791 to create a .repo file that refers to this new repository, and put it into /etc/yum.repos.d/ on the servers that are built to that baseline. Make sure that is the only .repo file in /etc/yum.repos.d/. Now you can use yum update (or perhaps yum --noplugins update if the yum command complains about not being able to contact RedHat).
Whenever you get a new set of RPMs, just copy/link them to the directory of the baseline repository, and run the createrepo command again, and you'll be ready to yum update the servers to the updated baseline.
Bottom line: creating a yum repository is easy. Any old pile of RPMs in a directory + the createrepo command on that directory = a repository for yum. If the RPMs are haphazardly chosen, the resulting repository may have dependency problems so that some of the RPMs available in it cannot actually be installed, but the yum update command will do the best job it can with what is available in the repository even in that situation.
If you need to keep multiple versions of the baseline available, just create multiple repository directories.
For example, you could have /var/www/html/baseline-2017-01, /var/www/html/baseline-2017-04, /var/www/html/baseline-2017-07 and so on. Then add a symbolic link /var/www/html/baseline-current and keep it pointed to whatever is the most recent version. On those servers that need to stay with the newest version of the baseline, use the "baseline-current" name in the .repo file. If a server needs to stay with an older version of the baseline, you can update its .repo file to point to that specific version.
Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.
