table of Contents
RPM and YUM
1 rpm package management
1.1 Introduction
Internet download package for packaging and installation tool, which is included in some Linux distributions, he generates a file with the extension RPM. RPM is an acronym for ReadHat Package Manager (RedHat package management tool), similar to the windows steup.exe, although the name of this file format marked signs RedHat, but the concept is universal, Linux distributions have adopted (suse, redhat, centos, etc.), it can be regarded as the accepted industry standard.
Simple query commands 1.2 rpm package
rpm query list of installed rpm -qa | grep xx
Please look at the current Linux has not been installed Firefox
rpm -qa|grep Firefox
https://i.loli.net/2019/09/13/U2dojYK7b9Zufq5.jpg
1.3 rpm package name basic format
A rpm package name: Firefox-45.0.1 -1.e16.centos.x86_64.rpm
Name: Firefox
Version: 45.0.1-1
For the operating system: e16.centos.x86_64
It represents a 64-bit system centos6.x
If i686, i3986 represents 32-bit system, noarch general represents
Other queries instruction 1.4 rpm package:
rpm -qa: query all rpm packages installed
rpm -qa | morep [Pagination]
rpm -qa | grep X [rpm -qa|grep firefox ]
https://i.loli.net/2019/09/13/vKuj3bONaMSegEq.jpg
rpm -q package name: Query package is installed
rpm -q Firefox
rpm -qi package names: package information inquiries
https://i.loli.net/2019/09/13/3u1nQZBSATg9vyX.jpg
rpm -qi file
rpm -ql Package name: query files in the package
rpm -ql Firefox
https://i.loli.net/2019/09/13/IyNEtrolSj5BZ8p.jpg
Software name rpm -qf file full path name of the query file belongs
rpm -qf /etc/passwd
rpm -qf /root/install.log
https://i.loli.net/2019/09/13/8xu4jcSsZHeJO72.jpg
1.5 Uninstall rpm package
- The basic syntax
Name rpm -e RPM package
- Applications
1) Delete Firefox package
https://i.loli.net/2019/09/13/uqyLrVNeU2oSsQI.jpg
- Details
1) If another software package depends on the software you want to uninstall, uninstall information when an error occurs
Such as:
$rpm -e foo removing these packages would berak dependencies:foo is needed by bar -1.0-1
2) If we are to delete the rpm package foo. Can increase the parameters -nodeps, you can force the removal, but is generally not recommended, because depend on this package may not run
Such as: $ rpm -e --nodeps foo
Bring --nodeps is forced to delete
1.6 rpm package installed
- The basic syntax
rpm -ivh RPM package full path name
- Parameter Description
i = install install
v = verbose tips
h = hash progress bar
- Applications
1) demonstrates install the Firefox browser
Firefox is the first step to find the rpm package installation, you need to mount our centos install iso file, and then to the / media / down to look rpm.
cp Firefox-45.0.1-1.e16.centos.x86_64.rpm/opt/
https://i.loli.net/2019/09/13/U9Fo6k5l2LIaCjv.jpg
2 yum
2.1 Introduction
yum shell is a front-end package manager. Based rpm package management, can be automatically downloaded from the server specified rpm package and install, can be handled automatically dependencies and install all dependent packages. Use yum premise that can be networked.
https://i.loli.net/2019/09/13/R4TxB3jYhkGW69C.jpg
The basic instructions 2.2yum
- Yum query the server for software to be installed
yum list | grep xx software list
- Install the specified package yum
yum install xxx download and install
2.3 Application examples yum
Case: Make way to use yum to install Firefox
1) First look at Firefox rpm yum server does not have the
https://i.loli.net/2019/09/13/8x6Vd9AOzlLc7Yo.jpg
2) Installation
yum install Firefox
Will install the latest version of the software.