Archive for the tag 'rpm'

How to do rpm test install to check potential conflicts.

–test Do not install the package, simply check for and report potential conflicts.

–test Don’t really uninstall anything, just go through the motions. Useful in conjunction with the -vv option for debugging.

How can I backup a currently installed RPM

–repackage Re-package the files before erasing.

The previously installed package will be named according to the macro %_repackage_name_fmt and will be created in the directory named by the macro %_repackage_dir (default value is /var/spool/repackage).

–replacefiles

Install the packages even if they replace files from other, already installed, packages.

–replacepkgs

Install the packages even if some of them are already installed on this system.

Once the package has been downloaded, install it with the –repackage option.

This will create an RPM from the existing package and install the new one.

rpm -Fvh –repackage rpm-file-name.rpm

How do I install or upgrade an RPM package?

In order to install an RPM package you must first have the RPM you are trying to install on your system. Many people will download RPMs from a website and of course, Red Hat Network (RHN) provides all the RPM packages included in the distributions. There are two main flags that are used to install or upgrade RPM packages:

-i is used to install a new package. Always use this for kernel installations and upgrades.
-U is used to upgrade an RPM package but will also install a package if it does not exist in the RPM database.

Usage and additional options can be found in the RPM man page. Type man rpm from the command line.

Here is some information about the -i and -U flags:

INSTALL AND UPGRADE OPTIONS

The general form of an rpm install command is

rpm {-i|–install} [install-options] PACKAGE_FILE …

This installs a new package.

The general form of an rpm upgrade command is

rpm {-U|–upgrade} [install-options] PACKAGE_FILE …

SBDavid

Verifying Installed RPM Packages

Verifying Installed Packages

Over the course of a system’s normal usage, files get changed. This could be as innocent as simply changing a configuration file in the /etc directory or as problematic as a file being corrupted by a power failure. To assist in the detection of these changes, RPM allows users and administrators to verify the integrity of an installed package.

The command

rpm -V

or

rpm -Va

Will verify all installed packages. RPM then computes the MD5 checksum of all files on the disk and compares them to the stored MD5 sums from the original RPMs. The output of the command is a line indicating any files that differ from the versions that were originally installed and a code indicating how the file has changed.

SBDavid

Administering RPM based distro

Description

rpm is a powerful Package Manager, which can be used to build, install, query, verify, update, and erase individual software packages. A package consists of an archive of files and meta-data used to install and erase the archive files.

RPM Commands:

  • To install a RPM package.
  1. rpm -ivh elinks.rpm
  • To uninstall a RPM package.
  1. rpm -e elinks.rpm
  • To upgrade a RPM package. RPM automatically uninstall the old version of the foo package and Install the new package.
  1. rpm -Uvh elinks.rpm
  • To query all installed packages.
  1. rpm -qa
  • To query a RPM package.
  1. rpm -q elinks
  • To display package information.
  1. rpm -qi elinks
  • To list files in installed package.
  1. rpm -ql elinks
  • To find out which package owns a file?
  1. rpm -qf /usr/bin/elinks
  • How to find out the list files in RPM file.
  1. rpm -qpl elinks.rpm
  • To verify an installed package.
  1. rpm –verify elinks

Note:

–replacefiles

Install the packages even if they replace files from other, already installed, packages.

–replacepkgs

Install the packages even if some of them are already installed on this system.

–test

Do not install the package, simply check for and report potential conflicts.

« Prev - Next »