Difference between revisions of "Rpm"
From Notes_Wiki
m |
m |
||
Line 9: | Line 9: | ||
</pre> | </pre> | ||
to list the name of the rpm package. | to list the name of the rpm package. | ||
==Advantages of using package manager== | |||
Few advantages of use of package manager over installation using sources are: | |||
*You can find out which files are associated with a given package. | |||
*:<pre> | |||
*::rpm -ql <package name> | |||
*:</pre> | |||
*For a given file, you can find out which package it's associated with. | |||
*:<pre> | |||
*::rpm -qf <file-path> | |||
*:</pre> | |||
*You can remove all files associated with a given package, even if they're spread out over multiple directories. | |||
*:<pre> | |||
*::rpm -e <package-name> | |||
*:</pre> | |||
*You can know which packages are dependent on a given package | |||
*:<pre> | |||
*:: rpm -qR <package-name> #OR | |||
*:: yum deplist <package-name> | |||
*:</pre> | |||
*You can know which packages a given package depends on | |||
*:<pre> | |||
*:: yum remove <package-name> (Can cancel with N) | |||
*:</pre> | |||
*Cryptographic security ensuring package is untampered | |||
*:Handled by yum automatically. Keys are installed in /etc/pki/rpm-gpg folder. Installation works only if package is properly signed | |||
*Upgrading of packages does not overwrites modified configuration files | |||
*:Results into .rpmnew or .rpmsave files | |||
*Packages installed by package managers can be updated using package managers easily | |||
*:<pre> | |||
*::yum -y update | |||
*:</pre> | |||
*Package managers ensure that one package does not overwrites file created by another package | |||
*:Results into conflicts | |||
Revision as of 17:39, 25 March 2013
<yambe:breadcrumb>Package_management_tools|Package management tools</yambe:breadcrumb>
rpm
Finding which package installed given file
Many times we require to know the name of the page which installed a given file. In such cases one can use:
rpm -qf <full-path-of-file>
to list the name of the rpm package.
Advantages of using package manager
Few advantages of use of package manager over installation using sources are:
- You can find out which files are associated with a given package.
- rpm -ql <package name>
- For a given file, you can find out which package it's associated with.
- rpm -qf <file-path>
- You can remove all files associated with a given package, even if they're spread out over multiple directories.
- rpm -e <package-name>
- You can know which packages are dependent on a given package
- rpm -qR <package-name> #OR
- yum deplist <package-name>
- You can know which packages a given package depends on
- yum remove <package-name> (Can cancel with N)
- Cryptographic security ensuring package is untampered
- Handled by yum automatically. Keys are installed in /etc/pki/rpm-gpg folder. Installation works only if package is properly signed
- Upgrading of packages does not overwrites modified configuration files
- Results into .rpmnew or .rpmsave files
- Packages installed by package managers can be updated using package managers easily
- yum -y update
- Package managers ensure that one package does not overwrites file created by another package
- Results into conflicts
References
References for understanding and learning rpm and yum properly:
- Information on restoring original files if package was installed via RPM is at https://www.g-loaded.eu/2012/03/26/restore-original-configuration-files-from-rpm-packages/
- Detailed information on RPM and yum is available at https://www.ibm.com/developerworks/linux/library/l-lpic1-v3-102-5/?ca=drs-
- RPM uses a fairly complex logic while upgrading a package to decide fate of configuration files. The logic is described in detail at http://www.rpm.org/max-rpm/ch-rpm-upgrade.html