centos中yum和rpm的区别

rpm

rpm相当于windows里面的控制面板中程序卸载与安装的功能,它是一个本地软件包的管理器。

其常用的参数有
rpm -qa |grep packagename 查询是否有本地包
rpm -ivh packagename 安装某个包,并显示安装过程
rpm -e packagename 卸载某个包

更多参数和使用方法可以man rpm就不赘述了。

yum

yum is an interactive, rpm based, package manager. It can automatically
perform system updates, including dependency analysis and obsolete processing based on “repository” metadata. It can also perform installation of new packages, removal of old packages and perform queries on the installed and/or available packages among many other commands/services (see below). yum is similar to other high level package managerslike apt-get and smart.
这个是man里面的描述,已经很清楚了。它就是基于rpm的一个软件包管理工具,它可以从网上下载rpm包和依赖。就像deepin阵营里的aptget一样。

二者的区别
rpm管理本地包的安装、卸载、查询
yum拥有rpm的功能,还具备了从网络上下载rpm包和依赖的功能。

下面可以给一个例子看一下:
centos中yum和rpm的区别
centos中yum和rpm的区别
是不是很能看出不同?是不是顿时觉得yum很可爱了?

以上是一个新菜鸟的理解,如有错误,请大佬不吝指出。