13 demo instances deal with RPM package management tools

Source: Internet
Author: User

Preface:If you are lucky to be seen by a friend and find something wrong in this article, you may want to criticize and correct it. If you have any questions, we hope you can discuss them together.


What is RPM?

Rpm is short for "RedHat Package Manager" and is now changed to "rpm is Package Manager ". On Linux/UNIX operating systems, the RPM package management tool allows system administrators to install, update, uninstall, query, verify, and manage RPM packages. The basic functions of the RPM package management tool.

650) This. width = 650; "src =" http://s3.51cto.com/wyfs02/M02/3F/A3/wKiom1PLlfbDIUSAAAFN3bprZck724.jpg "Title =" Figure 1 "alt =" wkiom1pllfbdiusaaafn3bprzck724.jpg "/>


Preparations

To better demonstrate the RPM package management tool, we need to mount the CD image to the file system. The main steps are as follows:

1. Click the CD mark on the VM and select Settings ...;

650) This. width = 650; "src =" http://s3.51cto.com/wyfs02/M00/3F/A3/wKiom1PLlmXy-qgiAAHtXuwyyWo356.jpg "Title =" Figure 2 "alt =" wKiom1PLlmXy-qgiAAHtXuwyyWo356.jpg "/>

2. In the displayed dialog box, click: browse..., select the Linux operating system CD image file, and click: OK;

650) This. width = 650; "src =" http://s3.51cto.com/wyfs02/M02/3F/A3/wKioL1PLl8ri9BZcAAF1AXvZtg0435.jpg "Title =" Figure 3 "alt =" wkiol1pll8ri9bzcaaf1axvztg0435.jpg "/>

3. Click the CD mark on the VM and select connect;

650) This. width = 650; "src =" http://s3.51cto.com/wyfs02/M01/3F/A3/wKioL1PLmGeiEhyqAAIFBFSHtZ8864.jpg "Title =" Figure 4 "alt =" wkiol1plmgeiehyqaaifbfshtz8864.jpg "/>

4. Mount the CD image to the file system on the command line.

650) This. width = 650; "src =" http://s3.51cto.com/wyfs02/M02/3F/A3/wKiom1PLl8DT2xxcAADtGqfctAM823.jpg "Title =" Figure 5 "alt =" wkiom1pll8dt2xxcaadtg1_ctam823.jpg "/>

Tip: You can also directly obtain the RPM package from the network when the network is connected.


1. How to check the legitimacy and integrity of the RPM package source?

650) This. width = 650; "src =" http://s3.51cto.com/wyfs02/M00/3F/A4/wKioL1PLmWjxnhs9AAHXbVX6RbM121.jpg "Title =" Fig 6 "alt =" wkiol1plmwjxnhs9aahxbvx6rbm121.jpg "/>

Note: 1. Import the public key of the package maker on the current system;

2. All public keys in GPG format imported are displayed on the current system;

3. Check the legitimacy and integrity of the httpd-2.2.15-29.el6.centos.x86_64.rpm package;

2. How to check the dependency of the RPM package before installation or upgrade?

650) This. width = 650; "src =" http://s3.51cto.com/wyfs02/M02/3F/A5/wKiom1PLrQDDM63dAAILng7p8so571.jpg "Title =" Figure 13 "alt =" wkiom1plrqddm63daailng7p8so571.jpg "/>

3. How to install the RPM package?

650) This. width = 650; "src =" http://s3.51cto.com/wyfs02/M00/3F/A4/wKiom1PLmWKw-s5EAAEyD6Rw55M815.jpg "Title =" Figure 7 "alt =" wKiom1PLmWKw-s5EAAEyD6Rw55M815.jpg "/>

Note: Ignore the RPM package dependency and install the RPM package: rpm-IVH -- nodeps RPM package


4. How do I check whether the file attributes generated by the installed RPM package have changed?

1. Check whether the file attributes generated by a package have changed.

650) This. width = 650; "src =" http://s3.51cto.com/wyfs02/M02/3F/A5/wKiom1PLnl7BH41qAAD61C5jlCM040.jpg "Title =" Fig 8 "alt =" wkiom1plnl7bh41qaad61c5jlcm040.jpg "/>

Changes that occur before and after modifying the file attributes generated by the installed RPM package.


2. listing all the file attributes generated by the package changes

650) This. width = 650; "src =" http://s3.51cto.com/wyfs02/M01/3F/A5/wKiom1PLpfSy20OyAAI51OM1Rh0425.jpg "Title =" Fig 9 "alt =" wkiom1plpfsy20oyaai51om1rh0112.jpg "/>


5. How can I check whether an RPM package is installed or not?

650) This. width = 650; "src =" http://s3.51cto.com/wyfs02/M00/3F/A5/wKioL1PLqM_A6IZrAABmH673REw589.jpg "Title =" Figure 10 "alt =" wkiol1plqm_a6izraabmh673rew589.jpg "/>


6. How do I install all the RPM packages?

650) This. width = 650; "src =" http://s3.51cto.com/wyfs02/M01/3F/A5/wKiom1PLqYrRxYebAAMvlLxsFvU258.jpg "Title =" Fig 11 "alt =" wkiom1plqyrrxyebaamvllxsfvu258.jpg "/>

Note: view the currently installed RPM package and its date: rpm-Qa -- last


7. How do I query all files generated by the installed RPM package?

650) This. width = 650; "src =" http://s3.51cto.com/wyfs02/M01/3F/A5/wKiom1PLqv7gcwx4AAFn9LWUEAk904.jpg "Title =" Fig 12 "alt =" wkiom1plqv7gcwx4aafn9lwueak904.jpg "/>

8. How to update an installed RPM package?

650) This. width = 650; "src =" http://s3.51cto.com/wyfs02/M02/3F/A5/wKioL1PLsUvQ8IE-AAE0O1Et0sg505.jpg "Title =" Fig 14 "alt =" wKioL1PLsUvQ8IE-AAE0O1Et0sg505.jpg "/>

9. How to uninstall an installed RPM package?

650) This. width = 650; "src =" http://s3.51cto.com/wyfs02/M02/3F/A5/wKiom1PLsVqyRCX3AAKnP_zNMsA246.jpg "Title =" Figure 15 "alt =" wkiom1plsvqyrcx3aaknp_znmsa246.jpg "/>

Note: uninstall the RPM package that has been installed to ignore dependencies: rpm-evv -- nodeps RPM package


10. How can I query uninstalled packages?

650) This. width = 650; "src =" http://s3.51cto.com/wyfs02/M00/3F/A5/wKioL1PLuEiA7j_gAALDGcWA_RY858.jpg "Title =" Figure 18 "alt =" wkiol1plueia7j_gaaldgcwa_ry858.jpg "/>


11. How do I query the RPM package description?

650) This. width = 650; "src =" http://s3.51cto.com/wyfs02/M01/3F/A5/wKiom1PLsqrQ7zFSAAOi4QMqG0w322.jpg "Title =" Fig 16 "alt =" wkiom1plsqrq7zfsaaoi4qmq1_w322.jpg "/>

12. How can I query which RPM package generates a file?

650) This. width = 650; "src =" http://s3.51cto.com/wyfs02/M00/3F/A5/wKioL1PLtNLihA07AABvP_EM0fc786.jpg "Title =" Figure 17 "alt =" wkiol1pltnliha07aabvp_em0fc786.jpg "/>


13. How to reconstruct the RPM database?

Database directory:/Var/lib/RPM

Reconstruction:

Rpm -- initdb: initialization

If no database exists, a new one is created. If yes, no new one is created;

Rpm -- rebuilddb: Rebuilding

Directly re-build and overwrite the original database.


Updating...

13 demo instances deal with RPM package management tools

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.