linux |离线安装软件 | rpm命令

本文介绍了如何使用rpm命令进行离线Linux包管理,包括检查安装包认证、检验依赖库、安装、查看状态、文件列表、软件更新、删除和获取详细信息等操作。

离线 安装包管理命令
rpm

#####
#检查安装包是否认证成功	简单讲 来源是否可靠	
rpm --checksig  xxx.rpm

rpm --checksig  nmap-7.92-1.x86_64.rpm
nmap-7.92-1.x86_64.rpm: sha1 md5 OK

####
安装前检验包的依赖库
rpm -qpR nmap-7.92-1.x86_64.rpm
python >= 2.4
rpmlib(FileDigests) <= 4.6.0-1
rpmlib(PayloadFilesHavePrefix) <= 4.0-1
rpmlib(CompressedFileNames) <= 3.0.4-1
rpmlib(PayloadIsXz) <= 5.2-1


####
#安装		-i 安装	-v 显示详细信息	-h 在打包归档文件解压缩时打印哈希标记
rpm -ivh xxx.rpm

rpm -ivh  nmap-7.92-1.x86_64.rpm

####
#安装以后查看是否安装成功
rpm -q xxx.rpm

rpm -q  nmap-7.92-1.x86_64.rpm
package nmap-7.92-1.x86_64.rpm is not installed


####
#查看安装了哪些文件
rpm -ql nmap
/usr/bin/ndiff
/usr/bin/nmap
/usr/lib/python2.6/site-packages/ndiff.py
/usr/lib/python2.6/site-packages/ndiff.pyc
/usr/lib/python2.6/site-packages/ndiff.pyo


####
#查询最近安装的软件
rpm -qa  --last
rpm -qa  --last | grep nmap

####
#更新软件		注意是大写  U
rpm -Uvh tree-1.6.0-10.el7.x86_64.rpm


####
#删除软件
rpm -evv 软件名

rpm -evv nmap

####
#查看软件的详细信息
rpm -qi 软件名

rpm -qi nmap
Name        : nmap
Epoch       : 2
Version     : 7.92
Release     : 1
Architecture: x86_64
Install Date: Fri 12 Jan 2024 02:44:50 PM CST
Group       : Applications/System
Size        : 28008919
License     : https://nmap.org/man/man-legal.html
Signature   : (none)
Source RPM  : nmap-7.92-1.src.rpm
Build Date  : Sat 07 Aug 2021 11:40:33 PM CST
Build Host  : localhost
Relocations : (not relocatable)
URL         : https://nmap.org
Summary     : Network exploration tool and security scanner
Description :

Nmap ("Network Mapper") is a free and open source utility
for network exploration or security auditing. Many systems and network
administrators also find it useful for tasks such as network
inventory, managing service upgrade schedules, and monitoring host or
service uptime. Nmap uses raw IP packets in novel ways to determine
what hosts are available on the network, what services (application
name and version) those hosts are offering, what operating systems
(and OS versions) they are running, what type of packet
filters/firewalls are in use, and dozens of other characteristics. It
was designed to rapidly scan large networks, but works fine against
single hosts. Nmap runs on all major computer operating systems, and
both console and graphical versions are available.



######################################################
http://rpmfind.net
http://www.redhat.com
http://freshrpms.net/
http://rpm.pbone.net/

注意 如果只想安装不展示安装信息 rpm -i xxx.rpm
参考1
参考2

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值