Rpm-qpl xxxxxx. rpm
1. How to install the RPM Software Package
The RMP package can be installed using the program rpm. Run the following command:
Rpm-I your-package.rpm
The your-package.rpm is the file name of the RPM package you want to install, usually under the current directory.
The following warning or prompt may appear during installation:
... Conflict with... may be that some files in the package to be installed may overwrite the existing
Files, which cannot be correctly installed and can be used in such cases.
Rpm -- force-I force Installation
... Is needed...
... Is not installed... some software required for this package is not installed and can be used.
Rpm -- nodeps-I to ignore this information
That is to say, rpm-I -- force -- nodeps can ignore all dependencies and file problems.
Can be installed, but this forced installation package cannot ensure full functionality
2. How to install the. SRC. RPM Software Package
Some software packages end with. SRC. rpm. These software packages are RPM packages that contain the original code.
Compilation is required. There are two installation methods for such software packages,
Method 1:
1. Execute rpm-I your-package.src.rpm
2. CD/usr/src/RedHat/specs
3. rpmbuild-BP your-package.specs A specs file with the same name as your package
4. CD/usr/src/RedHat/build/your-package/a directory with the same name as your package
5 ../configure this step is the same as compiling common source code software. parameters can be added.
6. Make
7. make install
Method 2:
1. Execute rpm-I you-package.src.rpm
2. CD/usr/src/RedHat/specs
The first two steps are the same as method 1.
3. rpmbuild-BB your-package.specs A specs file with the same name as your package
At this time, in/usr/src/RedHat/RPM/i386/(depending on the specific package, it may be i686, noarch, etc)
There is a new RPM package under this Directory, which is a compiled binary file.
Run the rpm-I new-package.rpm to complete the installation.
3. How to uninstall the RPM Software Package
Use the command rpm-e package name. The package name can contain version numbers and other information, but it cannot have a suffix. rpm
For example, uninstalling a software package proftpd-1.2.8-1 can use the following format:
Rpm e proftpd-1.2.8-1
Rpm e proftpd-1.2.8
Rpm-e ProFTPD-
Rpm-e ProFTPD
It cannot be in the following format:
Rpm e proftpd-1.2.8-1.i386.rpm
Rpm e proftpd-1.2.8-1.i386
Rpm e proftpd-1.2
Rpm e proftpd-1
Sometimes there are some errors or warnings:
... Is needed by... This indicates that this software is required by other software and cannot be detached.
Force uninstall with rpm-e -- nodeps
4. Why not install it, But retrieve files in the RPM package
Use tools rpm2cpio and cpio
Rpm2cpio XXX. RPM | cpio-vi
Rpm2cpio XXX. RPM | cpio-idmv
Rpm2cpio XXX. RPM | cpio -- extract -- make-Directories
The parameter I is the same as the extract parameter, indicating that the file is extracted. V indicates the execution process.
D is the same as make-Directory, which indicates creating a directory based on the original path of the file in the package.
M indicates the file update time.
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?
Rpm-Q MySQL can obtain the full name of the MySQL software package installed in the system.
The version of the current software package. 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 want to know where the executable program is stored, you can also use which, for example
Which MySQL
4. files contained in an RPM package
For a software package that has not been installed, use rpm-qlp *****. rpm
A software package that has been installed can also use rpm-QL *****. rpm
5. How can I obtain the version, purpose, and other information about a software package?
For a software package that has not been installed, use rpm-QIP *****. rpm
An installed software package can also use rpm-Qi *****. rpm
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 both package information and file lists.
7. Which software package is installed for a file or which package contains the file
Note that the method in the previous question is applicable only to and executable programs. The following method can not only
It is used for executable programs and common files. The premise is that you know the file name.
First obtain the complete path of the program, 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. Other options can be followed, 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,
Set 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, any package that meets the RPM file standards can be easily installed, upgraded, and uninstalled.
3. Is it true that all Linux systems use RPM?
All systems require 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 the RPM source path 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 the software package is independent of the hardware architecture and can be used universally.
The program of the i686 software package is usually optimized for the CPU, so backward compatibility is used for comparison.
Can be used on x86 machines. Forward is generally incompatible. However, at present, the CPU below the Pentium Pro is very small
Use. Generally, the i686 software package can be used on the specified machine.
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, some files on which the installation package depends may not be found. There are two solutions at this time.
first, find the file with the same or similar functions as the desired file in the system file and create a symbolic link to the
directory.
download and install the new software package.