RPM basic usage

xiaoxiao2021-03-05  23

Some commonly used parameters of the RPM command:

1. Install a package

# rpm -ivh

Installation parameters:

- Even if the file that is covered with other packages is also forced to install

--Nodeps If the installation of the RPM package rely on other packages, even if other packages are not installed, it is also forced to install.

-H (or --hash) outputs a Hash mark ("# '') when installing

--Test only tests the installation and is not actually installed.

--Percent outputs the scheduled progress in the form of a percentage.

--ExCludedocs Do not install document files in your package

-v display additional information

--Root Let rpm use the path specified by as "root directory" so that the pre-installer and the post installer are installed in this directory.

2. Upgrade a package

# rpm -uvh

--Prefix Install the package to the path specified by

--Nodeps does not check dependency relationship

3. Remove a package

# rpm -e

--Test only executes the deleted test

--Nodeps does not check dependency

5. Query if a package is installed

# rpm -q

-p (or "- '') querying the file of the package

-f Query Which package belonging to?

-a query all installed packages

-i display package profile

-l Display a list of files in the package

--Provides Display features provided by packages

--Requires (OR -R) Displays the features required for the package

6. Other RPM options

--Rebuilddb rebuild RPM database

--initdb creates a new RPM database

- quiet as much as possible

--help display help file

--Version displays the current version of RPM

转载请注明原文地址:https://www.9cbs.com/read-36089.html

New Post(0)