Google Plus

How to Use RPM to Effectively Manage Your Computer

Written by Mel Kham on . Posted in linux command

 

RPM Package Manager (originally Red Hat Package Manager, abbreviated RPM) is

a package management system. The name RPM refers to two things: a software

package file format, and a free software tool which installs, updates, uninstalls, verifies

and queries software packaged in this format. RPM was intended primarily for Linux

distributions; the file format RPM is the baseline package format of the Linux Standard

Base.

RPM is Package Manager for

  1. Redhat

  2. Suse

  3. CentOS

  4. Fedora

  5. and many other Linux distributions

Install RPM package / file
To install a new package use command
rpm – I packagename.rpm

rpm -i — What does it do?

Of the many things RPM can do, probably the one that people think of first is the installation of software. As mentioned earlier, installing new software is a complex, error-prone job. RPM turns that process into a single command.

rpm -i (–install is equivalent) installs software that’s been packaged into an RPM package file. It does this by:

  • Performing dependency checks.

  • Checking for conflicts.

  • Performing any tasks required before the install.

  • Deciding what to do with config files.

  • Unpacking files from the package and putting them in the proper place.

  • Performing any tasks required after the install.

  • Keeping track of what it did.

Let’s go through each of these steps in a bit more detail.

Upgrade a package /file  To upgrade an existing package use the command :  rpm -U packagename.rpm 

rpm -U — What Does it Do?

If there was one RPM command that could win over friends, it would be RPM’s upgrade command. After all, anyone who has ever tried to install a newer version of any software knows what a traumatic experience it can be. With RPM, though, this process is reduced to a single command: rpm -U. The rpm -U command (–upgrade is equivalent) performs two distinct operations:

  1. Installs the desired package.

  2. Erases all older versions of the package, if any exist.

To erase a package  rpm -e packagename.rpm  

rpm -e — What Does it Do?

 

The rpm -e command (–erase is equivalent) removes, or erases, one or more

packages from the system.

RPM performs a series of steps whenever it erases a package:

  • It checks the RPM database to make sure that no other packages depend on the package being erased.

  • It executes a pre-uninstall script (if one exists).

  • It checks to see if any of the package’s config files have been modified. If so, it saves copies of them.

  • It reviews the RPM database to find every file listed as being part of the package, and if they do not belong to another package, deletes them.

  • It executes a post-uninstall script (if one exists).

  • It removes all traces of the package (and the files belonging to it) from the RPM database.

That’s quite a bit of activity for a single command. No wonder RPM can be such a time-saver!

Verify a package in your system use the command rpm -V packagename.rpm

rpm -V — What Does it Do?

The command rpm -V (The options -y and –verify are equivalent) verifies an installed

package that does it verify ?

every file installed by RPM is examined. No less than nine different attributes of each file can be checked. Here is the list of attributes:

  • Owner

  • Group

  • Mode

  • MD5 Checksum

  • Size

  • Major Number

  • Minor Number

  • Symbolic Link String

  • Modification Time

{loadposition user9}

Related Articles By Tags :

{loadposition user1}

For questions please refer to our Q/A forum at : http://ask.unixmen.com

Mel Kham

Founder of Unixmen, Living in Amsterdam. Am working in my free time to help people to understand the Opensource and to explain them in easy way how to make the fist steps to the the light. Working day and night with my Co-founder Zinovsky to keep this website live even with less resources.

Like us on Facebook

This week Top Posts

Write for us

Recent Comments

jacky can

|

You can actually unzip your secret archive by leaving out the -t option, instead using:

unzip newPhoto.jpg

DragonFartOutLoud

|

it went to china.

DragonFartOutLoud

|

great review! i’ve been using it as my main OS since Beta 1 release. its been a awesome ride so far :)

jet li

|

i try the method, and i unzip the image contain zip secret, i dont find the file that i was hide, where it go? and how to open it? :s

zinovsky

|

Yes, it is possible using Steganography, we will post another quick howto do that in the next few days

 
IDG Tech Network
Copyright © 2008-2013 Unixmen.com .
Maintained by Anblik .