[Linux] Update the package offline

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


that's all.

Recommended Posts

[Linux] Update the package offline
Install the package in an offline environment
Install the python package in an offline environment
Control the Linux trackpad
Linux command (sequential update)
ubuntu package update script
Update vscode on linux
What is the Linux kernel?
Install the JDK on Linux
Understand the Linux audit system Audit
The Linux Watchdog driver API
[Linux] Directory under the root
Linux main package management system
Paste the link on linux
[Linux] How to disable the automatic update of the /etc/resolv.conf file (AmazonLinux2)
Detects Linux (yum / apt) package updates
[Linux ☓ Nvidia] Curve Control the fan
Get the site update date seriously
Try the Linux kernel lockdown mechanism
Create Scratch Offline Editor for Linux
[linux] kill command to kill the process
AlterLinux-About the fully Japanese Linux distribution
Installing and uninstalling the egg package
Introduction of ferenOS 3 (package update, installation)
[Linux] Who is the background job! ??
Docker environment update: add Python package