SHELL 001 -- rpm命令常用方法

1.检查软件安装包是否安装
   rpm -qa 软件名
   eg:    
[root@LNP ~]# rpm -qa mysql 
mysql-5.1.73-7.el6.x86_64

2.安装rpm格式软件包
   rpm -ihv 软件包路径
   eg:
[root@LNP ~]# rpm -ivh  http://download.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm
Retrieving http://download.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm
warning: /var/tmp/rpm-tmp.dW7P4T: Header V3 RSA/SHA256 Signature, key ID 0608b895: NOKEY
Preparing...                ########################################### [100%]
        package epel-release-6-8.noarch is already installed

3.卸载rpm软件包
   rpm -e  软件安装包
   rpm -e --nodeps  软件安装包  (--nodeps参数表示强制,不考虑其它依赖包警告)
   eg:
[root@LNP ~]# rpm -e  --nodeps lrzsz-0.12.20-27.1.el6.x86_64
[root@LNP ~]# 

4.更新rpm软件包
   rpm -Uvh  软件包路径  (U表示更新,但不改变原有的配置文件)
   eg:
[root@LNP ~]# rpm -Uvh  http://download.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm 
Retrieving http://download.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm
warning: /var/tmp/rpm-tmp.qVHygv: Header V3 RSA/SHA256 Signature, key ID 0608b895: NOKEY
Preparing...                ########################################### [100%]
   1:epel-release           ########################################### [100%]


上一篇:函数计算搭建小程序Web应用后端服务


下一篇:wireshark抓包