Rpm-Pi in Shell

Source: Internet
Author: User
Common RPM parameters for these tasks !!! In Linux, you can run man rpm !!! It's only in English, or you can get Baidu RPM !!! I 'd like to paste a few below !!!! Common RPM commands 1. install a package # rpm-IVH 2. upgrade a package # rpm-uvh 3. remove a package # rpm-E 4. installation parameter -- Force installation even if it overwrites files of other packages -- nodeps if the installation of this RPM package depends on other packages, even if other packages are not installed, force installation. 5. check whether a package is installed # rpm-q <RPM package name> 6. obtain the information of the installed package # rpm-Qi <RPM package name> 7. list the files in this package # rpm-QL <RPM package name> 8. list the RPM packages of a file on the server # rpm-QF 9. it can be used together with several parameters # rpm-qil <RPM package name> 10. list all installed RPM packages # rpm-Qa 11. list the files in an RPM package that have not been installed into the system? # Rpm-qilp <RPM package name>
 
 
Generally
"Rpm-Qa | grep package name" to find out the desired Software Package
Then, based on this result, use "rpm-Qi previous result" to find the specific information.

I want to combine these two commands with management.
I am like this (for example, querying MySQL)

Rpm
-Qa | grep MySQL | rpm-Qi

However, rpm-Qi prompts a problem.

What should I do?

Rpm-Qi 'rpm-Qa | grep software name'

 
 
I found that the Linux (RedHat as3) machine I installed does not have the RZ and Sz commands. Every time I upload files, I had to use ftp, which was very troublesome. So I encountered the following problems during installation:
1. What is the RPM name corresponding to these two commands? Fortunately, you can use the RZ and Sz commands on a previous machine, so that you can use rpm-qf/usr/bin/RZ (path of the RZ command, you can use the whereis RZ or which RZ command to query the path );
2. So we know the RPM package of RZ, lrzsz-0.12.20-16.rpm;
3. Go to the Internet to download or take out your Linux installation CD, and then upload the package to the server to be installed;
4. Rpm-IVH lrzsz-0.12.20-16.rpm
5. Okay. In this way, the sz command can be used;

Note: Some common options of the RPM command:

1. Installation Package: rpm-IVH package name
2. Upgrade package: register for rpm-uvh (if there are no old ones, install them, and upgrade them if there are old ones );
3. If an RPM package has installed those files, you can use this command:
# Rpm-QL packagename
4. # Rpm-e packagename
"-E" indicates that the specific packagename is deleted.

5. There is also the most important command to reverse query the RPM package corresponding to the command,
Rpm-qf/usr/bin/Rz to know the RPM package corresponding to the RZ command.

6. How do I know the RPM packages I want to install in those directories? In case that the RPM package installation is complete, you may be confused by using the following RPM command:
# Rpm-qpl file-3.26-6.i386.rpm
/Usr/bin/File
/Usr/man/Man1/file.1
/Usr/man/man4/magic.4
/Usr/share/magic
.....
.....
This command lists the directories in which all files in the RPM package will be placed;

7. How can I install the RPM package in a specified directory?
# Rpm-IVH -- prefix/dirname rpmname. rpm
Note that the installation path of some RPM packages cannot be modified. In this case, you can only use the default installation.

8. After the installation is complete, confirm the following:
Rpm-QL rpmname. rpm

Summary:
In this way, the common options of RPM commands are basically available. As long as you are familiar with the use of these options, you should not ask people to deal with problems encountered in daily work;
A) how to find the RPM package of a file (the premise is that the file is installed from the RPM package)
B) how to install and uninstall an RPM package (including path changes)
C) how to find the default RPM package installation path
D) wait. I will not repeat it again.
Related Article

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.