software management Introduction
in SLES : software management can be done with one of the following :
- Graphically with Yast
- Command line with Suse Tool Zypper
- Command Line with Tool RPM
RPM (RPM Package Manager) is used for managing software packages.
Its main commands are rpm and rpmbuild.
The powerful RPM database can be queried by the users, system administrators and package builders for detailed information about the installed software.
rpm has the following modes:
- installing,
- uninstalling
- updating software packages,
- rebuilding the RPM database,
- querying RPM bases or individual RPM archives,
- integrity checking of packages and signing packages.
- rpmbuild can be used to build installable packages from pristine sources.
Verifying Package Authenticity
RPM packages have a GPG signature.
To verify the signature of an RPM package, use the command
rpm --checksig PACKAGE-1.2.3.rpm
to determine whether the package originates from SUSE or from another trustworthy facility.
This is especially recommended for update packages from the Internet.
While fixing issues in the operating system, you might need to install a Problem Temporary Fix (PTF) into a production system. The packages provided by SUSE are signed against a special PTF key.
However, in contrast to SUSE Linux Enterprise 11, this key is not imported by default on SUSE Linux Enterprise 12 systems. To manually import the key, use the following command:
rpm --import \ /usr/share/doc/packages/suse-build-key/suse_ptf_key.asc
After importing the key, you can install PTF packages on your system.
install package with RPM
use Linux is similar to RPM based Linux distro such as RHEL but does not comes with yum command.
Normally, the installation of an RPM archive is quite simple:
rpm -i PACKAGE.rpm.
With this command the package is installed, but only if its dependencies are fulfilled and if there are no conflicts with other packages.
With an error message, rpm requests those packages that need to be installed to meet dependency requirements. In the background, the RPM database ensures that no conflicts arise—a specific file can only belong to one package.
RPM Queries
With the -q option rpm initiates queries, making it possible to inspect an RPM archive (by adding the option -p) and to query the RPM database of installed packages
remove package with rpm
simple command to remove package is
rpm -e packagname.rpm
but some packages has dependencies
so we need to use command
rpm -e --nodeps packagname.rpm
RPM Archives and the RPM Database
Midnight Commander (mc) can display the contents of RPM archives and copy parts of them. It represents archives as virtual file systems, offering all usual menu options of Midnight Commander. Display the HEADER with F3. View the archive structure with the cursor keys and Enter. Copy archive components with F5
RPM vs Zypper cpmmand
rpm does not pull in dependencies you got to do that manually
while > zypper/yast/apper all resolve dependencies and will download and install any that are needed that can be found in the available repos