栏目分类:
子分类:
返回
名师互学网用户登录
快速导航关闭
当前搜索
当前分类
子分类
实用工具
热门搜索
名师互学网 > IT > 前沿技术 > 大数据 > 大数据系统

rpm的用法

rpm的用法

1.rpm -ivh 安装包的名字

-i就是安装,加上vh可以看到安装的详细信息和安装进度

可以一次安装一个,也可以一次安装两个

rpm -ivh 安装包1 安装包2

也可以直接网络安装,后面加这个安装包网络位置

rpm -ivh http://......rpm

2.rpm -Uvh:更新软件包,没安装会直接安装,安装了就自动更新

rpm -Fvh:不安装不会更新,安装了就会更新

3.rpm -e小写的e是卸载

4.rpm -rebuilddb重建数据库

以下都是查询:

查询分两种,安装的RPM rpm -q,和没安装的RPM,没安装的话就是要rpm -qp

后面接的i,c,d,l,R都一样

5.rpm -qa查询已经安装软件

6.rpm -qi软件包,查询这个软件包的信息信息

如果已经安装会显示安装的Date.

[root@localhost gen]# rpm -qi iproute.x86_64
Name        : iproute
Version     : 4.11.0
Release     : 30.el7
Architecture: x86_64
Install Date: Sat 22 Jan 2022 10:53:44 PM CST
Group       : Applications/System
Size        : 1901449
License     : GPLv2+ and Public Domain
Signature   : RSA/SHA256, Thu 15 Oct 2020 02:51:00 AM CST, Key ID 24c6a8a7f4a80eb5
Source RPM  : iproute-4.11.0-30.el7.src.rpm
Build Date  : Thu 01 Oct 2020 12:40:59 AM CST
Build Host  : x86-01.bsys.centos.org
Relocations : (not relocatable)
Packager    : CentOS BuildSystem 
Vendor      : CentOS
URL         : http://kernel.org/pub/linux/utils/net/iproute2/
Summary     : Advanced IP routing and network device configuration tools
Description :
The iproute package contains networking utilities (ip and rtmon, for example)
which are designed to use the advanced networking capabilities of the Linux
kernel.

7.rpm -ql ,,查询这个软件包提供的目录

[root@localhost gen]# rpm -ql ftp
/usr/bin/ftp
/usr/bin/pftp
/usr/share/man/man1/ftp.1.gz
/usr/share/man/man1/pftp.1.gz
/usr/share/man/man5/netrc.5.gz

 8.展示这个软件的配置文件和帮助文档

[root@localhost gen]# rpm -qc passwd
/etc/pam.d/passwd
[root@localhost gen]# 
[root@localhost gen]# 
[root@localhost gen]# rpm -qd passwd
/usr/share/doc/passwd-0.79/AUTHORS
/usr/share/doc/passwd-0.79/COPYING
/usr/share/doc/passwd-0.79/ChangeLog
/usr/share/doc/passwd-0.79/NEWS
/usr/share/man/ja/man1/passwd.1.gz
/usr/share/man/man1/passwd.1.gz

9.系统某个文件上属于什么安装包

[root@localhost gen]# rpm -qf /usr/sbin/ip
iproute-4.11.0-30.el7.x86_64

10.还需要哪些文件,查看依赖性,没安装的软件包,但是已经下载到本地的,用rpm -qpR

[root@localhost gen]# rpm -qR iproute.x86_64
/bin/bash
/bin/sh
config(iproute) = 4.11.0-30.el7
libc.so.6()(64bit)
libc.so.6(GLIBC_2.11)(64bit)
libc.so.6(GLIBC_2.14)(64bit)
libc.so.6(GLIBC_2.2.5)(64bit)
libc.so.6(GLIBC_2.3)(64bit)
libc.so.6(GLIBC_2.3.4)(64bit)
libc.so.6(GLIBC_2.4)(64bit)
libc.so.6(GLIBC_2.7)(64bit)
libc.so.6(GLIBC_2.8)(64bit)
libdb-5.3.so()(64bit)
libdl.so.2()(64bit)
libdl.so.2(GLIBC_2.2.5)(64bit)
libm.so.6()(64bit)
libm.so.6(GLIBC_2.2.5)(64bit)
libmnl.so.0()(64bit)
libmnl.so.0(LIBMNL_1.0)(64bit)
libpthread.so.0()(64bit)
libpthread.so.0(GLIBC_2.2.5)(64bit)
libselinux.so.1()(64bit)
libxtables.so.10()(64bit)
rpmlib(CompressedFileNames) <= 3.0.4-1
rpmlib(FileDigests) <= 4.6.0-1
rpmlib(PayloadFilesHavePrefix) <= 4.0-1
rtld(GNU_HASH)
rpmlib(PayloadIsXz) <= 5.2-1

转载请注明:文章转载自 www.mshxw.com
本文地址:https://www.mshxw.com/it/730980.html
我们一直用心在做
关于我们 文章归档 网站地图 联系我们

版权所有 (c)2021-2022 MSHXW.COM

ICP备案号:晋ICP备2021003244-6号