RPM package

RPM package

RPM package was developed by the company Red Hat package management system
RPM compiled, you can not see the source code, but the installation will be much faster speed

RPM Package Manager

RPM Package Naming

Package name - version -.. Release version of the software publisher platform .rpm

RPM command

Commonly used commands:

# 安装
rpm -ivh rpm-file

# 升级
rpm -Uvh rpm-file

# 卸载
rpm -e rpm-file-name

# 查询安装的包
rpm -qa

# 查询指定包是否安装
rpm -q rpm-file-name

# 查询指定包信息
rpm -qi rpm-file-name

# 列出包安装的文件
rpm -ql rpm-file-name

# 查看安装此文件的包
rpm -qf file-path

# 查看依赖
rpm -qR file-path

# 将 rpm 包中文件提取到指定目录下
rpm2cpio rpm-file | cpio -idv file-path

parameter:

-i 安装 install
-v 可视化 verbose
-h 显示进度 hash
-U 升级安装,如果没有安装就直接安装 upgrade
-F 升级,只有安装了较低版本才能升级 freshen
-q 查询 query

--replacefiles 替换文件。当包中的一些文件已经存在时,安装时就会报错,导致无法安装,需要替换文件进行安装
--replacepkgs 替换包。如果软件包已经安装,可以替换包再安装一遍
--force replacefiles + replacepkgs
--test 测试安装,只检测依赖性,并不会安装

SRPM package

An SRPM not compiled binaries, but the source code file is encapsulated into a packet format RPM

SRPM package naming convention

Package name - version - release version of the software publisher .src.rpm

Install SRPM package

# 编译 SRPM 包,生成 RPM 包后手动安装
rpmbuild --rebuild srpm-file

# 编译并安装 SRPM 包
rpmbuild --recompile srpm-file

yum

yum <- Click to view

yum handled automatically RPM package dependencies

Guess you like

Origin www.cnblogs.com/dbf-/p/11770396.html