Updating the entire package on an offline RHEL server.
It seems that there is no choice but to download and transfer the update file from another RHEL server that can be connected externally at the timing you want to update. Here, it is assumed that the server you want to update is completely offline and independent, and you want to update it in a single shot. Version is 7.5
Assumption: The server is RHEL subscribed and has the same OS version.
Download the update file on a server that has an external connection.
mkdir /tmp/rpms
yum update --exclude=kernel* --skip-broken --downloadonly --downloaddir=/tmp/rpms/
I don't want to update the kernel, so I put --exclude = kernel *
.
If you get an error, skip the dependency problem package with the --skip-broken
option.
yum install <Packagename> --exclude=kernel* --downloadonly --downloaddir=/tmp/rpms/
Dependent packages are also downloaded.
Transfer the rpms folder containing the downloaded package to the server you want to update. Here, it is assumed that the transfer is made under / tmp /.
On the server you want to update, update from the transferred file.
yum localupdate /tmp/rpms/*
I feel that this is the easiest if it is a single shot. No need to create a yum repository.
Use the localinstall
command to install a new package.
If both servers can communicate, you can also create a local repository. https://qiita.com/hijiri0404/items/eea563f34d2f73ef04bf
Recommended Posts