How to: Manage Software Updates¶
InterWorx utilizes the yum
package manager for OS and Interworx updates.
From the Software Updates page in NodeWorx, Server Administrators can easily enable or disable automatic OS-level updates, set the InterWorx update channel, view available updates, enable or disable specific installed yum repos, and view yum history.
Contents
Enabling or Disabling Automatic OS-Level Updates¶
The automatic OS updates run as part of the InterWorx “daily” cron job.
Log into NodeWorx from the browser (https://ip.ad.dr.ess:2443/nodeworx)
From NodeWorx, navigate to Server > Software Updates
Under Automatic Update Options, select either Enabled or Disabled from the OS Updates dropdown
Automatic OS-level updates are enabled by Default
(Optional) Update the Email field with an email address that InterWorx should use to notify recipients that an update has occurred
Click Update
Setting the Interworx Update Channel¶
Detailed documentation on how to set the InterWorx update channel can be found here.
Managing Yum Repositories¶
Warning
InterWorx has several dependencies that are provided by outside repositories. Because of this, it is
required that the base
, updates
, epel
, and remi-safe
repositories stay enabled at all times.
It is also recommended to keep the specific repository for the system MySQL or MariaDB version enabled,
as well.
The interworx-hotfix
repository, as well as the repository for the desired InterWorx update Channel
are required to be enabled, as well, in order to receive InterWorx updates and bug fixes.
Log into NodeWorx from the browser (https://ip.ad.dr.ess:2443/nodeworx)
From NodeWorx, navigate to Server > Software Updates
Under Yum Software Repositories, click the Pencil next to the desired repository. This opens the Edit Yum Repository form
Update the desired settings:
Enabled: Enables or Disables the repository. If a repository is disabled, packages that are provided by that repository will not be updated
Exclude: List of packages to exclude from updates or installs. Shell globs using wildcards (eg. * and ?) are allowed
Include: Inverse of exclude. This is a list of packages that should always be installed or updated from a repository. If this option lists only one package, then that is all yum will ever see from the repository. Defaults to an empty list (Recommended)
Click Save
Managing Available Updates¶
To Refresh the List of Available Updates¶
Log into NodeWorx from the browser (https://ip.ad.dr.ess:2443/nodeworx)
From NodeWorx, navigate to Server > Software Updates
Under Available Updates, click the refresh button on the right-hand side. This will check for any new updates that may be available and update the list
To Install Available Updates¶
Log into NodeWorx from the browser (https://ip.ad.dr.ess:2443/nodeworx)
From NodeWorx, navigate to Server > Software Updates
Under Available Updates, select the checkbox next to the desired package
Select Install Updates from the With Selected dropdown
Click Go to update the package
Viewing Update History¶
Log into NodeWorx from the browser (https://ip.ad.dr.ess:2443/nodeworx)
From NodeWorx, navigate to Server > Software Updates
Scroll to the bottom of the page. The list of past updates can be found under Software Update History
Managing Yum Repositories at the CLI¶
To View Enabled Repositories¶
Log in to the server at the CLI as root, either via SSH or from the terminal
At the CLI, run the following command:
yum repolist
This will list, for all enabled repositories:
Repo id: The reference ID of the repository
Repo name: The name of the repository
Status: The number of packages that repository provides. This does not correlate with the number of packages with available updates.
Example:
[root@server ~]# yum repolist Failed to set locale, defaulting to C Loaded plugins: fastestmirror Loading mirror speeds from cached hostfile * base: download.cf.centos.org * epel: ohioix.mm.fcix.net * extras: download.cf.centos.org * remi-php80: mirror.team-cymru.com * remi-safe: mirror.team-cymru.com * updates: download.cf.centos.org repo id repo name status base/7/x86_64 CentOS-7 - Base 10072 !epel/x86_64 Extra Packages for Enterprise Linux 7 - x86_64 13756 extras/7/x86_64 CentOS-7 - Extras 512 interworx-7-base/7/x86_64 InterWorx Base - RedHat Enterprise 7 591 interworx-build-test-2092/7/x86_64 InterWorx Build 2092 Test 10 interworx-build-test-noarch-2092 InterWorx Build 2092 Test - Generic 0 interworx-hotfix InterWorx Hotfix 0 mariadb-10.2 MariaDB 10.2 101 remi-php80 Remi's PHP 8.0 RPM repository for Enterprise Linux 7 - x86_64 382 remi-safe Safe Remi's RPM repository for Enterprise Linux 7 - x86_64 4852 updates/7/x86_64 CentOS-7 - Updates 4101 repolist: 34377 [root@server ~]#
To Enable or Disable a Specific Repository¶
Using a Text Editor¶
Log in to the server at the CLI as root, either via SSH or from the terminal
At the CLI, navigate to
/etc/yum.repos.d
cd /etc/yum.repos.d
Using a text editor, open the repository file. The following example uses the vim text editor and the InterWorx repository file
vim interworx-7.repo
Many repository files manage multiple related repositories. For example,
interworx-7.repo
includes the specific repository for each Interworx channel. Each individual repository section will include:Name: The name of the specific repository
Baseurl: The URL where package updates will be downloaded and installed from
Priority: Determines the priority of the repository in regard to updates. If a package is provided by multiple repositories, the one with the highest priority will be where updates to that package are pulled from
Gpgcheck: Verifies the authenticity of the packages by checking the GPG signatures
Enabled: Whether or not the repository is enabled:
0: Disabled
1: Enabled
Example of the Base repository managed by
interworx-7.repo
:## +----------------------------------------------------------------------+ ## | InterWorx Base repository - ENABLED BY DEFAULT AND REQUIRED | ## +----------------------------------------------------------------------+ ## | This repository contains the base rpms required for all versions of | ## | the InterWorx software. | ## +----------------------------------------------------------------------+ [interworx-7-base] name=InterWorx Base - RedHat Enterprise $releasever baseurl=https://updates.interworx.com/interworx/7/base/RPMS/$releasever/$basearch priority=1 gpgcheck=1 enabled=1
Edit the file so that enabled on the desired repository is set to either 0 or 1
Save and exit the file
Using a One-Liner¶
Log in to the server at the CLI as root, either via SSH or from the terminal
At the CLI, run the following command, replacing {flag} and {repo} with the desired repository and status:
yum-config-manager --{flag} {repo}
If the repository should be enabled, use the
enable
flag. This example enables theepel
repository:yum-config-manager --enable epel
If the repository should be disabled, use the
disable
flag.This example uses theepel
repository:yum-config-manager --disable epel
To Clear the Yum Cache¶
Sometimes, in order to pull in new package updates, it is required to clear the yum cache. If one is attempting to update a package, and receiving a message stating “No packages marked for update”, clearing the cache and running the update command again will often resolve the issue.
Log in to the server at the CLI as root, either via SSH or from the terminal
At the CLI, run the following command:
yum clean all
Updating Packages at the CLI¶
To Update Install All Available Updates¶
Log in to the server at the CLI as root, either via SSH or from the terminal
At the CLI, run the following command:
yum update
If there are any package updates available, they will be listed, along with all dependencies. There will also be a prompt to confirm or deny the update. Example:
[root@server ~]# yum update Failed to set locale, defaulting to C Loaded plugins: fastestmirror Loading mirror speeds from cached hostfile epel/x86_64/metalink | 20 kB 00:00:00 * base: download.cf.centos.org * epel: ohioix.mm.fcix.net * extras: download.cf.centos.org * remi-php80: mirror.team-cymru.com * remi-safe: mirror.team-cymru.com * updates: download.cf.centos.org extras | 2.9 kB 00:00:00 interworx-7-base | 2.5 kB 00:00:00 interworx-7-beta | 2.5 kB 00:00:00 interworx-7-ga | 2.5 kB 00:00:00 interworx-7-rc | 2.5 kB 00:00:00 interworx-build-test-2049 | 2.5 kB 00:00:00 interworx-build-test-noarch-2049 | 2.4 kB 00:00:00 mariadb-10.2 | 3.4 kB 00:00:00 remi-php80 | 3.0 kB 00:00:00 remi-safe | 3.0 kB 00:00:00 updates | 2.9 kB 00:00:00 (1/2): remi-php80/primary_db | 217 kB 00:00:00 (2/2): remi-safe/primary_db | 2.2 MB 00:00:00 Resolving Dependencies --> Running transaction check ---> Package clamav.x86_64 3:0.103.5-2.rhe7x.iworx will be updated ---> Package clamav.x86_64 3:0.105.0-4.rhe7x.iworx will be an update --> Processing Dependency: libpcre2-8.so.0()(64bit) for package: 3:clamav-0.105.0-4.rhe7x.iworx.x86_64 --> Running transaction check ---> Package pcre2.x86_64 0:10.23-2.el7 will be installed --> Finished Dependency Resolution Dependencies Resolved ============================================================================================================================================================================= Package Arch Version Repository Size ============================================================================================================================================================================= Updating: clamav x86_64 3:0.105.0-4.rhe7x.iworx interworx-7-beta 225 M Installing for dependencies: pcre2 x86_64 10.23-2.el7 base 201 k Transaction Summary ============================================================================================================================================================================= Install ( 1 Dependent package) Upgrade 1 Package Total download size: 225 M Is this ok [y/d/N]:
Selecting N will quit the update process and save it for later:
Is this ok [y/d/N]: N Exiting on user command Your transaction was saved, rerun it with: yum load-transaction /tmp/yum_save_tx.2022-08-09.12-55.X45Fsi.yumtx [root@server ~]#
Selecting y will allow the update to continue:
Is this ok [y/d/N]: y Downloading packages: Delta RPMs disabled because /usr/bin/applydeltarpm not installed. (1/2): pcre2-10.23-2.el7.x86_64.rpm | 201 kB 00:00:00 (2/2): clamav-0.105.0-4.rhe7x.iworx.x86_64.rpm | 225 MB 00:00:04 ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------- Total 51 MB/s | 225 MB 00:00:04 Running transaction check Running transaction test Transaction test succeeded Running transaction Installing : pcre2-10.23-2.el7.x86_64 1/3 Updating : 3:clamav-0.105.0-4.rhe7x.iworx.x86_64 2/3 Cleanup : 3:clamav-0.103.5-2.rhe7x.iworx.x86_64 3/3 Verifying : 3:clamav-0.105.0-4.rhe7x.iworx.x86_64 1/3 Verifying : pcre2-10.23-2.el7.x86_64 2/3 Verifying : 3:clamav-0.103.5-2.rhe7x.iworx.x86_64 3/3 Dependency Installed: pcre2.x86_64 0:10.23-2.el7 Updated: clamav.x86_64 3:0.105.0-4.rhe7x.iworx Complete! [root@server ~]#
To Update a Specific Package¶
Log in to the server at the CLI as root, either via SSH or from the terminal
At the CLI, run the following command, replacing {package} with the desired package to update:
yum update {package}
For example, to update ClamAV:
yum update clamav
If there are any package updates available, they will be listed, along with all dependencies. There will also be a prompt to confirm or deny the update. Example:
[root@server ~]# yum update clamav Failed to set locale, defaulting to C Loaded plugins: fastestmirror Loading mirror speeds from cached hostfile * base: download.cf.centos.org * epel: ohioix.mm.fcix.net * extras: download.cf.centos.org * remi-php80: mirror.team-cymru.com * remi-safe: mirror.team-cymru.com * updates: download.cf.centos.org Resolving Dependencies --> Running transaction check ---> Package clamav.x86_64 3:0.103.5-2.rhe7x.iworx will be updated ---> Package clamav.x86_64 3:0.105.0-4.rhe7x.iworx will be an update --> Processing Dependency: libpcre2-8.so.0()(64bit) for package: 3:clamav-0.105.0-4.rhe7x.iworx.x86_64 --> Running transaction check ---> Package pcre2.x86_64 0:10.23-2.el7 will be installed --> Finished Dependency Resolution Dependencies Resolved ============================================================================================================================================================================= Package Arch Version Repository Size ============================================================================================================================================================================= Updating: clamav x86_64 3:0.105.0-4.rhe7x.iworx interworx-7-beta 225 M Installing for dependencies: pcre2 x86_64 10.23-2.el7 base 201 k Transaction Summary ============================================================================================================================================================================= Install ( 1 Dependent package) Upgrade 1 Package Total download size: 225 M Is this ok [y/d/N]:
Selecting N will quit the update process and save it for later:
Is this ok [y/d/N]: N Exiting on user command Your transaction was saved, rerun it with: yum load-transaction /tmp/yum_save_tx.2022-08-09.13-11.J1S97g.yumtx [root@server ~]#
Selecting y will allow the update to continue:
Is this ok [y/d/N]: y Downloading packages: Delta RPMs disabled because /usr/bin/applydeltarpm not installed. (1/2): pcre2-10.23-2.el7.x86_64.rpm | 201 kB 00:00:00 (2/2): clamav-0.105.0-4.rhe7x.iworx.x86_64.rpm | 225 MB 00:00:04 ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------- Total 51 MB/s | 225 MB 00:00:04 Running transaction check Running transaction test Transaction test succeeded Running transaction Installing : pcre2-10.23-2.el7.x86_64 1/3 Updating : 3:clamav-0.105.0-4.rhe7x.iworx.x86_64 2/3 Cleanup : 3:clamav-0.103.5-2.rhe7x.iworx.x86_64 3/3 Verifying : 3:clamav-0.105.0-4.rhe7x.iworx.x86_64 1/3 Verifying : pcre2-10.23-2.el7.x86_64 2/3 Verifying : 3:clamav-0.103.5-2.rhe7x.iworx.x86_64 3/3 Dependency Installed: pcre2.x86_64 0:10.23-2.el7 Updated: clamav.x86_64 3:0.105.0-4.rhe7x.iworx Complete! [root@server ~]#