1、RPM
- Redhat Package Manager:软件包管理工具
- 软件适用操作系统
x86_64表示该软件适用64位 i686、i386表示该软件适用32位 noarch表示通用
-qa
- 查询已安装的包
查询所有:rpm -qa rpm -qa | more 查询过滤是否有安装火狐:rpm -qa | grep firefox
-qi
- 查看安装的软件信息:rpm -qi firefox
[root@hadoop1 test]# rpm -qi firefox Name : firefox Relocations: (not relocatable) Version : 52.8.0 Vendor: CentOS Release : 1.el6.centos Build Date: 2018年05月16日 星期三 23时47分28秒 Install Date: 2021年01月05日 星期二 00时28分09秒 Build Host: c1bl.rdu2.centos.org Group : Applications/Internet Source RPM: firefox-52.8.0-1.el6.centos.src.rpm Size : 140844829 License: MPLv1.1 or GPLv2+ or LGPLv2+ Signature : RSA/SHA1, 2018年05月17日 星期四 00时35分44秒, Key ID 0946fca2c105b9de Packager : CentOS BuildSystem http://bugs.centos.org
URL : http://www.mozilla.org/projects/firefox/
Summary : Mozilla Firefox Web browser
Description :
Mozilla Firefox is an open-source web browser, designed for standards
compliance, performance and portability.
-ql
- 查看安装的软件有哪些文件
[root@hadoop1 test]# rpm -ql firefox
/etc/firefox/pref
/usr/bin/firefox
/usr/lib64/firefox
/usr/lib64/firefox/LICENSE
/usr/lib64/firefox/application.ini
/usr/lib64/firefox/browser/blocklist.xml
-qf
- 查询文件属于哪个软件包
[root@hadoop1 test]# rpm -qf /etc/profile
setup-2.8.14-23.el6.noarch
删除软件包
- 删除软件包,如果软件包被其他包依赖,会产生错误信息
删除:rpm -e firefox 强制删除:rpm -e —nodeps firefox
安装软件包
- -i 安装
- -v 提示
- -h 进度条
rpm -ivh /opt/firefox-52.8.0-1.el6.centos.x86_64.rpm
2、YUM
- 基于RPM,可以从指定服务器自动下载RPM,并且自动处理依赖关系,一次性安装
查询YUM服务器是否有要安装的软件
yum list | grep firefox
安装
yum install firefox
