RPM Installation and uninstallation
[[email protected] ~]# ls /mnt //mnt is an empty directory //the system CD-ROM is mounted to the/MNT directory [[ email protected] ~]# mount /dev/cdrom /mnt //mount to mnt directory mount: block device /dev/sr0 is write-protected, mounting read-only [[email protected] ~]# ls /mnt //View the MNT directory There are many files in the ;mnt directory, which is the RPM installation package CentOS_BuildTag Packages rpm-gpg-key-centos-security-6 eula RELEASE-NOTES-en-US.html RPM-GPG-KEY-CentOS-Testing-6 gpl repodata trans. tbl images rpm-gpg-key-centos-6 isolinux Rpm-gpg-key-centos-debug-6 [[email protected] ~]# ls /mnt/packages/ |head 389-ds-base-1.2.11.15-29.el6.i686.rpm //each RPM package is made up of-and. Divided into several parts 389- ds-base-libs-1.2.11.15-29.el6.i686.rpm abrt-2.0.8-21.el6.centos.i686.rpm abrt-addon-ccpp-2.0.8-21.el6.centos.i686.rpm abrt-addon-kerneloops-2.0.8-21.el6.centos.i686.rpm Abrt-addon-python-2.0.8-21.el6.centos.i686.rpm abrt-cli-2.0.8-21.el6.CENTOS.I686.RPM         //EG: ABRT-CLI is the package name and 2.0.8 is the version information. 21.el6 for release version, i686 for running platform abrt-desktop-2.0.8-21.el6.centos.i686.rpm abrt-gui-2.0.8-21.el6.centos.i686.rpm abrt-libs-2.0.8-21.el6.centos.i686.rpm // Install a RPM package [[email protected] packages]# rpm -ivh zip-3.0-1.el6.i686.rpm // where-ivh is the RPM option, I is the meaning of the installation. V is the meaning of visualization. H Display Installation Progress Preparing... ########################################### [100%] package zip-3.0-1.el6.i686 is already installed /* In addition, when selecting the RPM package, you can use --force to indicate the mandatory installation of  , even if overwriting files belonging to other packages will be installed &nbSp; --nodeps: When the RPM package installed depends on other packages, the package is installed even if no other packages are installed */ [[email protected] packages] #rpm -uvh zip-3.0-1.el6.i686.rpm //is to update an installation package. Note U is capital Letter [[email protected] Packages]# rpm -ivh yum-utils-1.1.30-14.el6.noarch.rpm //Installing an RPM package Preparing... ###################################### ##### [100%] 1:yum-utils ########################################### [100%] [[email protected] packages]# rpm -e yum-utils // Uninstall the rpm you just installed, notice that the package name you want to uninstall is called after uninstalling [[email protected] packages]# rpm -qa |grep yum-utils // Check if RPM package is unloaded [[email protected] Packages]#         RPM Packet Query [[email protected] packages ]# rpm -ivh yum-utils-1.1.30-14.el6.noarch.rpm //Install a RPM package preparing ... ############## ############################# [100%] 1:yum-utils ########################################### [100%][[email protected] packages]# rpm -q yum-utils /* Check the RPM package for freshly-wiped installation directly followed by the package name, without detailed information &NBSp;yum-utils-1.1.30-14.el6.noarch [[email protected] packages]# rpm -q yum-utilsyum-utils-1.1.30-14.el6.noarch */ [[email protected] The PACKAGES]# RPM -QA |HEAD -N5      //-QA option queries the system for all installed RPM packages; Displays the previous 5 lines of gnome-python2-libwnck-2.28.0-5.el6.i686cups-libs-1.4.2-50.el6_4.5. i686pax-3.4-10.1.el6.i686basesystem-10.0-4.el6.noarchgdm-plugin-fingerprint-2.30.4-64.el6.i686 [[ email protected] packages]# rpm -qi yum-utils // Get the information of an already installed RPM package, and add the package name directly after it Name : yum-utils Relocations: (not relocatable) version : 1.1.30 Vendor: centosrelease : 14.el6 build date: 2012 June 22 Friday 20 23 minutes 05 seconds install date: 2015 October 16 Friday 04 55 minutes 30 seconds Build Host: c6b8.bsys.dev.centos.orgGroup : Development/Tools Source RPM: yum-utils-1.1.30-14.el6.src.rpmSize : 308503 License: GPLv2+Signature : RSA/SHA1, June 25, 2012 Monday 06 08 minutes 38 seconds, key id 0946fca2c105b9depackager : CentOS BuildSystem
RPM Installation and uninstallation