|
First, Introduction
RPM is RedHatPackageManager Abbreviation, developed by RedHat package installation and management procedures, with relatively similar Uninstaller on the Windows platform. Use RPM, users can install and manage applications and system tools on Linux. RPM allows users to directly install binary packages and can be installed for user queries whether the relevant library; when you remove programs using RPM, it would be wise to ask if the user wants to delete the relevant procedures. If you use RPM to upgrade software, RPM will retain the original configuration file, so that users do not have to re-configure the new software. RPM maintains a database, which contains information on all of the packages through the database, the user can query package. Although RPM is designed for Linux, but it has moved to a value other UNIX systems SunOS, Solaris, AIX, Irix wait. RPM follow the GPL copyright agreement, the user can freely use and dissemination RPM in conformity with the GPL.
Second, the configuration
RPM package management profile is rpmrc, you can use the following command to find
# Locate rpmrc
You can be viewed via the following command
rpm --showrc
Third, the function
1, initialization rpm database functions;
By rpm command to query a rpm package is installed, but also through the rpm database to complete; therefore we should always use the following two commands to initialize the rpm database;
[Root @ localhost beinan] # rpm --initdb
[Root @ localhost beinan] # rpm --rebuilddb Note: This will take a long time;
Note: The above two parameters are extremely useful, sometimes rpm system is a problem, can not be installed and queries, mostly a problem here;
[Root @ localhost beinan] # updatedb
[Root @ localhost beinan] # locate the software or file name
Tip: updatedb, we can locate some software to query where to install the; when the system is first installed to perform updatedb, from time to time have to be performed once; to keep the installed software libraries latest; updatedb slocate package is all; If you do not have this command, you have to install slocate;
2, RPM package management
1) query:
rpm {-q | --query} [select-options] [query-options]
Example
1) a query file has been installed belong to which package
rpm -qf filename
2) query installed packages are installed to where
rpm -ql Software name
or
rpm rpmquery -ql Software name
3) look at the installed software configuration files
rpm -qc Software name
4) View a document to install the software already installed
rpm -qd Software name
5) Check your installed software packages and documents relied
rpm -qR Software name
6) Check the package contains a file
rpm -qpl filename
2) package installation, upgrade, delete
1) Conventional package installation
-ivh: Setup displays installation progress --install - verbose - hash
-Uvh: Upgrade Package --Update;
-Va: Check all of the RPM packages, find lost files [View Lost];
-e: Delete Package
2) Source Package installation
rpm --recompile vim-4.6-4.src.rpm # This command will unpack the source code and compile, install it, if you use the command:
rpm --rebuild vim-4.6-4.src.rpm # After the installation is complete, will the compiled executable file repackaged into i386.rpm RPM packages.
Detailed usage, please refer to: http: //ftp.tsingpost.com/index.php/archives/379/
3) network installation package
# Rpm -qpi http://mirrors.kernel.org/Fedora/core/4/i386/os/ Fedora / RPMS / gaim-1.3.0-1.fc4.i386.rpm
# Rpm -ivh http://mirrors.kernel.org/fedora/core/4/i386/os/ Fedora / RPMS / gaim-1.3.0-1.fc4.i386.rpm
4) specify the installation directory: parameter to add -relocate
rpm -ivh --relocate / = / opt / gaim gaim-1.3.0-1.fc4.i386.rpm # gaim-1.3.0-1.fc4.i386.rpm installed in the specified directory: / opt / gaim in
3. Import function signature
rpm --import signature file
4, rpm package file extraction function
rpm2cpio file.rpm | cpio -div
Under extracted files to usr and etc in the current directory: Tips |
|
|
|