[Linux] installing software packages using rpm commands

Source: Internet
Author: User
Tags ftp port number

Read the following instructions carefully and then start installing your own software package.
Http://bbs.chinaunix.net/viewthread.php? Tid = 16209 & highlight = rpm
Http://bbs.chinaunix.net/viewthread.php? Tid = 765567 & highlight = rpm

I. Installation

Command Format:

Rpm-I (or -- install) options file1.rpm... fileN. rpm

Parameters:

File1.rpm... fileN. rpm to be installedRPMPackage file name

Detailed options:

-H (or -- hash) outputs the hash mark (''#'') during installation (''#'')
-- Test only tests the installation and does not actually install it.
-- Percent: the installation progress is displayed as a percentage.
-- Excludedocs does not install the document files in the Software Package
-- Includedocs installation document
-- Replacepkgs force the installed software package to be reinstalled
-- Replacefiles: Replace the files of other software packages.
-- Force ignores conflicts between software packages and files
-- Noscripts does not run the pre-Installation and post-installation scripts
-- Prefix <path>; install the software package to the path specified by <path>;
-- Ignorearch does not validate the structure of the software package
-- Ignoreos does not check the operating system of the software package.
-- Nodeps does not check Dependencies
-- Ftpproxy -- Ftpport <port>; specifies the FTP port number as <port>;

Ii. Delete

Command Format:

Rpm-E (or -- erase) options pkg1... pkgN

Parameters

Pkg1... pkgN: package to be deleted

Detailed options

-- Test: only delete the test.
-- Noscripts does not run the pre-Installation and post-installation script programs
-- Nodeps does not check Dependencies

Iii. Upgrade

Command Format

Rpm-U (or -- upgrade) options file1.rpm... fileN. rpm

Parameters

File1.rpm... fileN. rpm package name

Detailed options

-H (or -- hash) outputs the hash mark (''#'') during installation (''#'')
-- Oldpackage allows "Upgrade" to an old version
-- Test: only test the upgrade.
-- Excludedocs does not install the document files in the Software Package
-- Includedocs installation document
-- Replacepkgs force the installed software package to be reinstalled
-- Replacefiles: Replace the files of other software packages.
-- Force ignores conflicts between software packages and files
-- Percent: the installation progress is displayed as a percentage.
-- Noscripts does not run the pre-Installation and post-installation scripts
-- Prefix <path>; install the software package to the path specified by <path>;
-- Ignorearch does not validate the structure of the software package
-- Ignoreos does not check the operating system of the software package.
-- Nodeps does not check Dependencies
-- Ftpproxy -- Ftpport <port>; specifies the FTP port number as <port>;

Iv. Query

Command Format:

Rpm-Q (or -- query) options

Parameters:

Pkg1... pkgN: Query installed software packages

Detailed options

-P <file>; (or ''-'') query the file of the software package.
-F <file>; query the <file> Software Package
-A: Query all installed software packages.
-- Whatprovides <x>; a software package that provides the <x> function for query
-G <group>; query the packages that belong to the <group> group.
-- Whatrequires <x>; query all software packages that require the <x> Function

Information options

<Null>; displays all the packages.
-I: displays the summary of the software package.
-L display the file list in the Software Package
-C: display the configuration file list
-D: display the document file list
-S: displays the file list in the package and the status of each file.
-- Scripts displays scripts for installation, uninstallation, and validation
-- Queryformat (or -- qf) displays the query information in a user-specified manner.
-- Dump: displays all verified information for each file.
-- Provides: displays the functions provided by the software package.
-- Requires (or-R) shows the functions required by the Software Package

5. Verify installed software packages

Command Format:

Rpm-V (or -- verify, or-y) options

Parameters

Pkg1... pkgN name of the software package to be verified

Package options

-P <file>; Verify against package file <file>;
-F <file>; Verify <file>; the Software Package
-A Verify: verifies all software packages.
-G <group>; verify all software packages that belong to the group <group>;

Detailed options

-- Noscripts does not run the validation script
-- Nodeps does not verify Dependencies
-- Nofiles does not verify file attributes

6. Verify the files in the Software Package

Syntax:

Rpm-K (or -- checksig) options file1.rpm... fileN. rpm

Parameters:

File1.rpm... fileN. rpm package file name

Checksig -- detailed options

-- Nopgp does not verify the PGP Signature

VII. OthersRPMOption

-- Rebuilddb ReconstructionRPMDatabase
-- Initdb creates a newRPMDatabase
-- Quiet: reduce output as much as possible
-- Help: display the help File
-- Version displayRPMCurrent version

General options

-V: display additional information
-Vv: displays debugging information.
-- Root <path>;RPMUse the path specified by <path>; as the "root directory", so that both the preinstallation program and the post-installation program will be installed in this directory.
-- Rcfile <rcfile>; set the rpmrc file to <rcfile>;
-- Dbpath <path>; SetRPMThe path of the Data Inventory is <path>;

My practices

1. view all software packages installed in the current system
# Rpm-q-
2. Check the software package containing "java" in the software package name installed in the current system.
# Rpm-q-a | grep java
3. display the description of the software package
# Rpm-q-I <package>

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.