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

离线 安装包管理命令
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

你可能感兴趣的:(综合部,操作系统,linux,linux,数据库,运维)