• Skip to main content

Uly.me

cloud engineer

  • Home
  • About
  • Archives

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 Repo Plugins

April 2, 2020

Here’s how to disable plugin in Yum repos.

# check which plugins are enabled
yum repolist
# disable plugins
yum update --disableplugin=product-id,subscription-manager
# check agin
yum repolist

# check which plugins are enabled yum repolist # disable plugins yum update --disableplugin=product-id,subscription-manager # check agin yum repolist

If that doesn’t work, check the individual config files of each plugin.

cd /etc/yum/pluginconf.d/
vim product-id.conf
vim subscription-manager.conf

cd /etc/yum/pluginconf.d/ vim product-id.conf vim subscription-manager.conf

Disable it.

[main]
enable=0

[main] enable=0

Filed Under: Linux Tagged With: plugins, redhat, repo, repolist, 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->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->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

Yum Add Repo Manually

August 5, 2019

Add a yum repo manually by adding a configuration file in /etc/yum.repo.d/ directory.

cd /etc/yum.repos.d/
vi newrepo

cd /etc/yum.repos.d/ vi newrepo

Add the following.

[newrepo]
name=New Repo for RHEL/ CentOS $releasever - $basearch
baseurl=http://newrepo.domain.com/centos/$releasever/$basearch/
enabled=1
gpgcheck=1
gpgkey=http://newrepo.domain.com/RPM-GPG-KEY.txt

[newrepo] name=New Repo for RHEL/ CentOS $releasever - $basearch baseurl=http://newrepo.domain.com/centos/$releasever/$basearch/ enabled=1 gpgcheck=1 gpgkey=http://newrepo.domain.com/RPM-GPG-KEY.txt

You may need to import the key.

rpm --import http://newrepo.domain.com/RPM-GPG-KEY.txt

rpm --import http://newrepo.domain.com/RPM-GPG-KEY.txt

Finally, test the new repo by running the following.

yum update -y
yum install new-package

yum update -y yum install new-package

Filed Under: Cloud Tagged With: 3rd party, add, new, repo, yum

Amazon Linux Docker Install

July 10, 2019

Here’s the installation of Docker for the original Amazon Linux.

# To install docker
sudo yum install docker
sudo service docker start
# Validate it's working
docker --version
docker run hello-world
docker ps -a
docker image ls

# To install docker sudo yum install docker sudo service docker start # Validate it's working docker --version docker run hello-world docker ps -a docker image ls

Filed Under: Cloud, Linux Tagged With: amazon linux, aws, docker, install, yum

Local RPM Install

March 11, 2019

Steps for creating a local RPM package installation.

# download plugin
yum install yum-plugin-downloadonly
# download package and dependencies
yum install --downloadonly reiserfs
# download package and dependencies to a specific directory
yum install --downloadonly --downloaddir=/home/ec2-user package
# download multiple packages
yum install --downloadonly --downloaddir=/root/mypackages/ package1 package2
# finally install package
rpm -ivh -r /home/ec2-user package.rpm

# download plugin yum install yum-plugin-downloadonly # download package and dependencies yum install --downloadonly reiserfs # download package and dependencies to a specific directory yum install --downloadonly --downloaddir=/home/ec2-user package # download multiple packages yum install --downloadonly --downloaddir=/root/mypackages/ package1 package2 # finally install package rpm -ivh -r /home/ec2-user package.rpm

Filed Under: Linux Tagged With: download, install, packages, yum

Yum Remove Repo

February 19, 2019

How to remove repos in Yum. Just delete the repo file in /etc/yum.repos.d.

rm /etc/yum.repos.d/repo-name.repo

rm /etc/yum.repos.d/repo-name.repo

Filed Under: Linux Tagged With: redhat, remove, repo, yum

  • « Go to Previous Page
  • Go to page 1
  • Go to page 2
  • Home
  • About
  • Archives

Copyright © 2023