Rpm package and yum installation and uninstallation under CentOS

  

First, rpm package installation:

1. Install a package

# rpm -ivh

2. Upgrade A package

# rpm -Uvh

3. Remove a package

# rpm -e

4.Installation parameters

--force Forces installation even if it overwrites files belonging to other packages

--nodeps If the installation of this RPM package depends on other packages, even if other packages are not installed, the installation is forced.

5. Query whether a package is installed

# rpm -q < rpm package name>

6.Get information about the package being installed

# rpm -qi < rpm package name>

7. List which files are in the package

# rpm -ql < rpm package name>

8 List which RPM package a file belongs to on the server

#rpm -qf

9. Combine several parameters together

# rpm -qil < Rpm package name>

10.List all installed rpm packages

# rpm -qa

11.List an RPM package file that is not installed in the system What files are included in it?

# rpm -qilp < rpm package name>


Second, rpm package uninstall:

rpm -qa |  Grep package name

This command is to list the package-related packages.

rpm -e file name

This command is the software you want to uninstall, followed by Package name, the last version number is not used

For example:

# rpm -qa |   Grep mysql

mod_auth_mysql-2.6.1-2.2 php-mysql-5.3.9-3.15 mysql-devel-5.1.77-1.CenOS 5.2

mysql-5.0.77-1. CenOS 5.2 mysqlclient10-5.0.77-1.CentOS 5.2 libdbi-dbd-mysql-0.6.5-10.CentOS 5.2

# rpm -e mysqlclient

Third, yum installation:

# yum install package name

four, yum uninstall:

# yum -y remove package name

Copyright © Windows knowledge All Rights Reserved