managing linux software

Posted by Tully on Thu 14 May 2009

To check the checksum of a file:

sum YOUR_FILE

RPM Packages

Acroread-7.0.5-15.i586.rmp

Acroread - Package name.

7.0.5 - Version Number.

15 - Release Number

I586 - Architecture Type.

Package Name - This part of the file name simply identifies the name of the package.

Version Number - This part of the file name specifies the version of the software in the package.

Release Number - This part of the file name indicates the current release of the software version. On occasion, errors are encountered in the process of creating an RPM package. When a new package release is made available for the same version of the software that fixes an error, the release number is incremented.

Optional Distribution Designator:

Fcx - Specifies that the package is intended for Fedora Core version x.

Rhlx - Specifies that the package is intended for Red Hat Linux version x.

Susexxx - Specifies that the package is intended for SUSE Linux version xxx.

Architecture Type - This part of the file name specifies the CPU architecture that the software inside the package will run on. In the preceding example, the architecture is
specified as i586. That means the software will run on any Intel Pentium or later CPU.

You many also see the following architectures specified ina package's file name:

I386 - Specifies that the software will run on an Intel 80386 or later CPU.

I686 - Specifies that the software will run on an Intel Pentium II or later CPU.

Athlon - Specifies that the software is intended to run on an AMD Athlon CPU.

Ppc - Specifies that the software is intended to run on the PowerPC CPU.

Noarch - Specifies that the package is not architecture-dependent.

To install an RPM:

rpm -ihv filename.rpm

The -I is for install.

The h is to show hash marks (progress)

The -v is for verbose.

Rpm will check for dependencies when installing a rpm file
and fail if dependencies aren't met. These will be displayed on the screen.

To check the dependencies needed without installing you can use the command:

rpm -test filename.rpm

Don't delete the source files used to install a package from source.

To uninstall a source package:

make uninstall

To uninstall a RPM:

rpm -e package.rpm

The rpm utility checks dependencies during uninstall as well
as install operations. If other software is installed on the system that is dependent on the package you are trying to uninstall, an error message will be displayed listing the dependent packages.

You must first uninstall those packages before you can continue.

To upgrade a package with the rpm utility:

rpm -U package.rpm

RPM Options:

-i - This option displays summary information about a specific package.

--whatrequires - This option displays a list of packages that require the specified packages. For example, entering rpm -q -whatrequires postfix will display a list of packages that require the postfix package.

-l - This option displays a list of files that are included in an RPM package.

--provides - This option displays the functionality the specified package supplies.

--requires - This useful option displays the functionality required by the specified package.

Verify a Package:

rpm -V package

The error message will have the following parameters:

S - Indicates a problem in the size of a file.

M - Indicates a problem with a file's mode.

5 - Indicates a problem with the MD5 checksum of a file.

D - Indicates a problem with a file's revision numbers.

L - Indicates a problem with a file's symbolic link.

U - Indicates a problem with a file's owner.

G - Indicates a problem with a file's group.

T - Indicates a problem with the modification time of a file.

c - Indicates the specified file is a configuration file.

file_name - Specifies the name of the file that failed verification.