RPM installation skills for Linux software installation (2)

Source: Internet
Author: User

A few days ago, a netizen asked a Linux software installation RPM question. He did not think that he was very good at forgetting his knowledge ..... put some common ones here, and you can copy them as well. Do not lose the basic things, alas .... three days without hands-on training

The following describes how to install RPM for Linux software.

5. How to view files and other information related to the rpm package
All of the examples below assume that the software package mysql-3.23.54a-11 is used
1. I installed those rpm packages in my system
Rpm-qa: list all installed packages
If you want to find all installed software packages that contain a string of SQL
Rpm-qa | grep SQL

2. How to obtain the full name of a software package file
Rpm-q mysql can obtain the full name of the mysql software package installed in the system.
The version of the current software package. The information mysql-3.23.54a-11 can be obtained in this example

3. Where is the file in an rpm package installed?
Rpm-ql package name
Note that the software package name does not include the. rpm suffix.
That is to say, you can only use mysql or mysql-3.23.54a-11 instead of mysql-3.23.54a-11.rpm.
If you just want to know where the executable program is put, you can also use which, such
Which mysql

4. files contained in an rpm package
For a software package that has not been installed, use rpm-qlp *****. rpm
You can also use rpm-ql *****. rpm to install a software package.

5. How can I obtain the version, usage, and other information about a software package?
For a software package that has not been installed, use rpm-qip *****. rpm
You can also use rpm-qi *****. rpm to install a software package.

6. Which software package is installed for a program or which package contains the program?
Rpm-qf 'which program name' returns the full name of the package
Rpm-qif 'which program name' returns information about the software package.
Rpm-qlf 'which program name' returns the package file list
Note: here is not a quotation mark, but ', which is the key in the upper left corner of the keyboard.
You can also use rpm-qilf to output the package information and file list at the same time.

7. Which package is installed for a file or which package contains the file?
Note that the method in the previous question only applies to executable programs. The following method is not only applicable
It is used for executable programs or common files. The premise is that you know the file name.
First obtain the complete path of the program, you can use whereis or which, and then use rpm-qf for example:
# Whereis ftptop
Ftptop:/usr/bin/ftptop/usr/share/man/man1/ftptop.1.gz
# Rpm-qf/usr/bin/ftptop
Proftpd-1.2.8-1
# Rpm-qf/usr/share/doc/proftpd-1.2.8/rfc/rfc0959.txt
Proftpd-1.2.8-1

Summary:
To obtain information about the software package, use rpm-q and q to query the query. You can use other options, such
I indicates info to obtain information about the software package;
L indicates list to obtain the file list;
A Indicates all and queries are executed in all packages;
F indicates file, which can be queried Based on files;
P indicates the package, which is queried Based on the software package.
The required query conditions can be generated using grep or from the command line in ''.

6. Knowledge about rpm software packages
1. What is rpm?
Rpm (RedHat Package Management) is one of the RedHat inventions.

2. Why rpm?
In an operating system, you must install software packages that implement various functions. These software packages generally have their own
Program, but there are also intricate dependencies. At the same time, we also need to solve the software package version and install it,
Configuration and uninstall automation issues. To solve these problems, RedHat puts forward
It is a good way to manage hundreds of thousands of software. This is the RPM management system. The rpm management system is installed in the system.
In the future, as long as it is a package that meets the rpm file standards, you can easily install, upgrade, uninstall

3. Is it true that all linux systems use rpm?
Any system requires a package management system, so many linux systems use the rpm System. However, the rpm System is dedicated for RH
However, systems such as TL and Mandrake also use rpm. Since rpm source programs can be compiled on other systems,
So it is possible to use rpm on other systems.
In addition to rpm, some other systems also have their own software package management programs, such as debian's deb package,
Slakware also has its own package management system.

4. Why is the file name of the rpm package so long?
The rpm package file name contains the version information, operating system information, and hardware requirements of the software package.
For example, the mypackage-1.1-2TL.i386.rpm where mypackage is the name of the software package registered in the system
1.1 indicates the software version number, 2 indicates the release number, TL indicates the TL operating system, or RH. I386 indicates
It is used on intel x86 platforms, or it may be a type.

5. What does i686 and i386 in the package file name mean?
The rpm package file name contains not only the software name and version information, but also the applicable hardware architecture.
.
I386 indicates that this software package is applicable to computers with intel 80386 or more x86 architectures (AI32)
I686 indicates that this software package is applicable to computers with x86 architectures (IA32) over intel 80686 (Pentium pro and above)
Noarch indicates that this software package is not related to the hardware architecture and can be used in general.
The program of the i686 software package is usually optimized for the CPU, so backward compatibility is used for comparison.
It can be used on x86 machines. Forward is generally incompatible. However, there are very few CPUs under the Pentium pro
Generally, the configured machine can use the i686 software package.

6. Can rpm packages released by different operating systems be mixed?
For rpm packages that have been compiled into binary files, they cannot be mixed due to different operating systems.
For software packages released with src. rpm, since local compilation is required during installation
Install it in the system.

7. Some special problems encountered when using rpm
Q I used rpm-e **. rpm to delete the rpm package.
Package A name does not include rpm,
Rpm-e package name, which can contain version numbers and other information, but cannot have a suffix. rpm

Q is there any tool for reading RPM files in MS?
A wincmd with rpm plugins .....

Q Can I install and upgrade the rpm package through ftp?
A can. Rpm-ivh ftp: // xxxxxxxx/PATH2SomeRPM

Q What if the version of the existing package is too high during rpm installation?
A sometimes because the installed software package is too old, and the related software package version in the system is relatively new, it may need
Some files dependent on the installed package cannot be found. There are two solutions,
First, find the file with the same or similar functions as the desired file in the system file and make a symbolic link
Directory.

We hope that the RPM installation tips of the above Linux software will be useful to you.

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.