The basis of operating system management during software installation. Different from windows, there are many methods for Linux software management. The most common method of RedHat is rpm, which allows you to install RPM packages integrated into the CD. This method is more convenient than software management on the Windows platform.ProgramIt is a little complicated to install and uninstall.
1. Location of the RPM package in RedHat-- The package directory in the CD directory is all.
2. Interpretation of common RPM commands:
A. Installer: rpm-IVH <absolute path of the software package> # I: Install; V, verbose; H, hash
[Root @ ASDF/] #Rpm-IVH/Media/rhel_6.1 \ i386 \ disc \ 1/packages/vsftpd-2.2.2-6.el6_0.1.i686.rpm
B. Uninstall the program: rpm-E <software Name>
[Root @ ASDF/] #Rpm-E vsftpd # E => erase, uninstall[Root @ ASDF/] #Rpm-Q vsftpd # Check whether it has been uninstalledPackage vsftpd Is Not Installed
Rpm-AQ | grep Yum | xargs rpm-e -- nodeps # Uninstall all Yum-related packages
C. Check whether the specified software is installed: rpm-q <software Name>/rpm-Qa | grep <software Name>
[Root @ ASDF /] # Rpm- Q Yum # Q, queryYum - 3.2 .29 - 17 . El6.noarch [root @ Peano /] # Rpm- QA Yum # This command is not as fast as the previous commandYum - 3.2 . 29 - 17 . El6.noarch [root @ Peano /] # Rpm-Qa | grep Yum # This command uses pipelines for regular matchingYum -Metadata-parser- 1.1 .2 - 16 . El6.i686packagekit -Yum- 0.5 . 8 - 19 . El6.i686yum -Utils- 1.1 . 30 - 6 . El6.noarchyum -RHN-plugin- 0.9 . 1 - 26 . El6.noarchpackagekit -Yum-plugin- 0.5 . 8 - 19 . El6.i686yum - 3.2 . 29 - 17 . El6.noarch
D. query the software package name of a file in the installed software: rpm-QF <a File>
[Root @ Peano/] #Rpm-qf/etc/Yum. conf# QF, query fileyum-3.2.29-17. El6.noarch
E. query where the installed programs are installed: rpm-QL <program name>
[Root @ ASDF/] # Rpm- QL yum# Prediction: Ql, query location /Etc/ Bash_completion.d /Etc/bash_completion.d/ Yum. Bash /Etc/logrotate. d/ Yum /Etc/ Yum /Etc/Yum. conf /Etc/ Yum. Repos. d /Etc/Yum/ Pluginconf. d /Etc/Yum/ Protected. d /Etc/Yum/ Vars /Etc/Yum/version- Groups . Conf /Usr/bin/ Yum /Usr/lib/python2. 6 /Site-packages/ Rpmutils /Usr/lib/python2. 6 /Site-packages/rpmutils/ _ Init _. py /Usr/lib/python2. 6 /Site-packages/rpmutils/ _ Init _. PyC /Usr/lib/python2. 6 /Site-packages/rpmutils/ _ Init _. Pyo /Usr/lib/python2. 6 /Site-packages/rpmutils/ Arch. py /Usr/lib/python2. 6 /Site-packages/rpmutils/ Arch. PyC /Usr/lib/python2. 6 /Site-packages/rpmutils/ Arch. Pyo /Usr/lib/python2. 6 /Site-packages/rpmutils/ Miscutils. py /Usr/lib/python2. 6 /Site-packages/rpmutils/ Miscutils. PyC /Usr/lib/python2. 6 /Site-packages/rpmutils/ Miscutils. Pyo /Usr/lib/python2. 6 /Site-packages/rpmutils/ Oldutils. py /Usr/lib/python2. 6 /Site-packages/rpmutils/ Oldutils. PyC /Usr/lib/python2. 6 /Site-packages/rpmutils/Oldutils. Pyo /Usr/lib/python2. 6 /Site-packages/rpmutils/ Transaction. py /Usr/lib/python2. 6 /Site-packages/rpmutils/ Transaction. PyC /Usr/lib/python2. 6 /Site-packages/rpmutils/ Transaction. Pyo --- more ---
F. query the installed software package information: rpm-Qi <software Name>
[Root @ ASDF/] # Rpm- Qi Yum # Qi, query InfomationName: Yum relocations: (not relocatable) version: 3.2 . 29 Vendor: Red Hat, Inc. Release: 17 . El6 build Date: Thu 28 APR 2011 10 : 43 : 39 Am pdtinstall Date: Mon 02 Jul 2012 02 : 58 : 17 Am PDT build host: x86- 005 . Build. Bos. RedHat. comgroup: System Environment /Base source RPM: Yum- 3.2 . 29 - 17 . El6.src. rpmsize: 4640583 License: gplv2 +Signature: RSA / 8 , Fri 29 APR 2011 06 : 41 : 01 Am PDT, key ID 199e2f91fd431d51packager: Red Hat, Inc. <Http: // Bugzilla.redhat.com/bugzilla> URL: http: // Yum.baseurl.org/ Summary: rpm package installer/Updater/Managerdescription: Yum is a utility that can check For And automatically download and Install Updated RPM packages. dependencies are obtained and downloadedautomatically, prompting the user For Permission as necessary. [root @ ASDF /] #
G. query the document location information of installed software: rpm-Qd <software Name>
[Root @ ASDF/] # Rpm-Qd Yum # qd, query document /Usr/share/doc/Yum- 3.2 . 29 /Authors /Usr/share/doc/Yum- 3.2 . 29 / Copying /Usr/share/doc/Yum- 3.2 . 29 / Changelog /Usr/share/doc/Yum- 3.2 . 29 / Install /Usr/share/doc/Yum- 3.2 . 29 / Readme /Usr/share/doc/Yum- 3.2 . 29 / Todo /Usr/share/ Man /Man5/yum. conf. 5 . GZ /Usr/share/ Man /Man8/Yum-shell. 8 . GZ /Usr/share/ Man /Man8/yum. 8 . GZ [root @ ASDF /] #
H. query dependencies of installed software: rpm-QR <software Name>
[Root @ ASDF/] # Rpm-QR Yum # QR, query relation /Usr/bin/ Python config (YUM) = 3.2 . 29 - 17 . El6pygpgme Python > = 2.4 Python (ABI) = 2.6 Python - Iniparse Python - SQLite Python -Urlgrabber> =3.9 . 0 - 8 Rpm > = 0 : 4.4 . 2 Rpm - Python rpmlib (compressedfilenames) <= 3.0 . 4 - 1 Rpmlib (filedigests) <= 4.6 .0 - 1 Rpmlib (partialhardlinksets) <= 4.0 . 4 - 1 Rpmlib (payloadfileshaveprefix) <= 4.0 - 1 Rpmlib (versioneddependencies) <= 3.0 . 3 - 1 Yum -Metadata-parser> = 1.1 . 0 Rpmlib (payloadisxz) <= 5.2 - 1
I. If you want to queryPackage Not InstalledYou can add a lower-casePYou can query related parameters, such as in h, to query dependencies:
[Root @ ASDF packages] #Rpm-qpc vsftpd-2.2.2-6.el6_0.1. I686.rpm Warning: vsftpd-2.2.2-6. El6_0.1. I686.rpm: Header V3 RSA/Sha256 signature, key ID fd431d51: nokey/Etc/logrotate. d/Vsftpd/Etc/PAM. d/Vsftpd/Etc/vsftpd/Ftpusers/Etc/vsftpd/User_list/Etc/vsftpd/Vsftpd. conf [root @ ASDF packages] #
J. There are two ways to update the software: rpm-uvh and-fvl. The difference between the two is that the former will automatically install the software that has not been installed, while the latter will not install the software; to downgrade, use the following command:
Rpm-uvh -- oldpackage gaim-1.3.0-1.fc4.i386.rpm //Downgrade the new version to the old version.
Reprinted please indicate the source: http://www.cnblogs.com/picaso