• Skip to main content

Uly.me

cloud engineer

  • Home
  • About
  • Archives

rpm

RPM Updates the last month

November 9, 2021

Here’s the software packages updated the last month.

rpm -qa --last | grep -w "$(date --date='1 month ago' +'%b %Y')"

rpm -qa --last | grep -w "$(date --date='1 month ago' +'%b %Y')"

Result

python-perf-3.10.0-1160.42.2.el7.x86_64       Mon 04 Oct 2021 02:16:16 AM UTC
openldap-2.4.44-24.el7_9.x86_64               Mon 04 Oct 2021 02:16:12 AM UTC
kpartx-0.4.9-135.el7_9.x86_64                 Mon 04 Oct 2021 02:16:09 AM UTC
kernel-tools-libs-3.10.0-1160.42.2.el7.x86_64 Mon 04 Oct 2021 02:16:05 AM UTC
kernel-tools-3.10.0-1160.42.2.el7.x86_64      Mon 04 Oct 2021 02:16:05 AM UTC
kernel-3.10.0-1160.42.2.el7.x86_64            Mon 04 Oct 2021 02:14:41 AM UTC
virt-what-1.18-4.el7_9.1.x86_64               Mon 04 Oct 2021 01:03:22 AM UTC
bind-export-libs-9.11.4-26.P2.el7_9.7.x86_64  Mon 04 Oct 2021 01:03:22 AM UTC
# ... truncated output

python-perf-3.10.0-1160.42.2.el7.x86_64 Mon 04 Oct 2021 02:16:16 AM UTC openldap-2.4.44-24.el7_9.x86_64 Mon 04 Oct 2021 02:16:12 AM UTC kpartx-0.4.9-135.el7_9.x86_64 Mon 04 Oct 2021 02:16:09 AM UTC kernel-tools-libs-3.10.0-1160.42.2.el7.x86_64 Mon 04 Oct 2021 02:16:05 AM UTC kernel-tools-3.10.0-1160.42.2.el7.x86_64 Mon 04 Oct 2021 02:16:05 AM UTC kernel-3.10.0-1160.42.2.el7.x86_64 Mon 04 Oct 2021 02:14:41 AM UTC virt-what-1.18-4.el7_9.1.x86_64 Mon 04 Oct 2021 01:03:22 AM UTC bind-export-libs-9.11.4-26.P2.el7_9.7.x86_64 Mon 04 Oct 2021 01:03:22 AM UTC # ... truncated output

Filed Under: Linux Tagged With: installed, last, list, month, rpm

RPM Hung

September 10, 2021

Check if there’s a runaway rpm process. This returns number of processes that are running.

ps -ef | grep rpm | wc -l

ps -ef | grep rpm | wc -l

Kill it.

killall -9 rpm

killall -9 rpm

You should be able to run yum updates from this point on.

Filed Under: Linux Tagged With: hung, kill, processes, rpm

Checking Yum Transaction Logs

February 1, 2021

Check if package is on the system.

rpm -q httpd
httpd-2.4.6-97.el7.centos.x86_64

rpm -q httpd httpd-2.4.6-97.el7.centos.x86_64

Check the history logs.

yum history list
Loaded plugins: fastestmirror
ID     | Login user               | Date and time    | Action(s)      | Altered
-------------------------------------------------------------------------------
   115 | System <unset>           | 2021-02-01 03:40 | Update         |    1
   114 | System <unset>           | 2021-02-01 02:03 | I, U           |   10
   113 | System <unset>           | 2021-01-29 19:54 | Update         |    1
   112 | System <unset>           | 2021-01-21 14:41 | Update         |    1

yum history list Loaded plugins: fastestmirror ID | Login user | Date and time | Action(s) | Altered ------------------------------------------------------------------------------- 115 | System <unset> | 2021-02-01 03:40 | Update | 1 114 | System <unset> | 2021-02-01 02:03 | I, U | 10 113 | System <unset> | 2021-01-29 19:54 | Update | 1 112 | System <unset> | 2021-01-21 14:41 | Update | 1

Check detail transaction id.

yum history info 114 | grep python 
    Updated python-perf-3.10.0-1160.6.1.el7.x86_64          @updates
    Updated python-sss-1.16.5-10.el7_9.5.x86_64             @your-repo
    Updated python-sssdconfig-1.16.5-10.el7_9.5.noarch      @your-repo

yum history info 114 | grep python Updated python-perf-3.10.0-1160.6.1.el7.x86_64 @updates Updated python-sss-1.16.5-10.el7_9.5.x86_64 @your-repo Updated python-sssdconfig-1.16.5-10.el7_9.5.noarch @your-repo

It looks like python was updated in transaction id #114.

Filed Under: Linux Tagged With: history, logs, rpm, yum

Yum localinstall

December 24, 2020

Here’s how to install a RPM locally. Download the RPM first.

wget https://domain.com/path/to/file/rpmfile1.rpm
wget https://domain.com/path/to/file/rpmfile2.rpm

wget https://domain.com/path/to/file/rpmfile1.rpm wget https://domain.com/path/to/file/rpmfile2.rpm

Then install RPM from a local file.

yum localinstall /path/to/rpmfile1.rpm
yum localinstall /path/to/rpmfile2.rpm

yum localinstall /path/to/rpmfile1.rpm yum localinstall /path/to/rpmfile2.rpm

Filed Under: Linux Tagged With: install, local, rhel, rpm, yum

Yum RPMDB failed

October 4, 2019

If you are getting an error similar to the yum error below, yum may be broken in your system.

error: rpmdb: BDB0113 Thread/process 2196/139984719730496 failed: BDB1507 Thread died in Berkeley DB library
error: db5 error(-30973) from dbenv-&gt;failchk: BDB0087 DB_RUNRECOVERY: Fatal error, run database recovery
error: cannot open Packages index using db5 - (-30973)
error: cannot open Packages database in /var/lib/rpm
CRITICAL:yum.main:
 
Error: rpmdb open failed

error: rpmdb: BDB0113 Thread/process 2196/139984719730496 failed: BDB1507 Thread died in Berkeley DB library error: db5 error(-30973) from dbenv-&gt;failchk: BDB0087 DB_RUNRECOVERY: Fatal error, run database recovery error: cannot open Packages index using db5 - (-30973) error: cannot open Packages database in /var/lib/rpm CRITICAL:yum.main: Error: rpmdb open failed

Here’s the fix.

mv /var/lib/rpm/__db* /tmp
yum clean all

mv /var/lib/rpm/__db* /tmp yum clean all

Run your yum commands. The errors should be gone.

Filed Under: Linux Tagged With: database, error, failed, rpm, yum

TrendMicro Security Agent

July 25, 2019

How to start/stop/restart/status TrendMicro Security agent.

/etc/init.d/ds_agent start
/etc/init.d/ds_agent stop
/etc/init.d/ds_agent restart
/etc/init.d/ds_agent status
/etc/init.d/ds_agent reset

/etc/init.d/ds_agent start /etc/init.d/ds_agent stop /etc/init.d/ds_agent restart /etc/init.d/ds_agent status /etc/init.d/ds_agent reset

Check if installed.

rpm -qa | grep 'ds_agent'

rpm -qa | grep 'ds_agent'

Install with verbose and hash.

rpm -ivh package-name

rpm -ivh package-name

Uninstall with verbose.

rpm -ev package-name

rpm -ev package-name

Filed Under: Linux Tagged With: agent, install, rpm, security, trendmicro, uninstall

Checking Last Patch

March 1, 2019

You can check when the system was last patch using the following.

# check RPM when the last updates were ran.
rpm -qa --last | grep kernel
# this is a bit of a stretch, but typically a reboot is performed after an upgrade.
uptime

# check RPM when the last updates were ran. rpm -qa --last | grep kernel # this is a bit of a stretch, but typically a reboot is performed after an upgrade. uptime

Filed Under: Linux Tagged With: grep, kernel, rpm, uptime

RPM Check Packages

February 20, 2019

How to check RPM if packages are installed.

rpm -qa --last 
rpm -qa --last | more
rpm -qa --last | grep "package name"

rpm -qa --last rpm -qa --last | more rpm -qa --last | grep "package name"

Filed Under: Linux Tagged With: check, rpm

  • Home
  • About
  • Archives

Copyright © 2023