当前位置:网站首页>软件管理rpm
软件管理rpm
2022-08-05 04:17:00 【anqiujiaduizhang】
一、rpm 介绍
rpm 软件包名称:
软件名称 版本号 (主版本、次版本、修订号)操作系统
#不能自动解决依赖关系
举例:openssh-6.6.1p1-31.el7.x86_64.rpm
数字前面的是名称 数字是版本号 :第一位主版本号,第二位次版本号,带横杠的是修订号, el 几-------操作版本的系统
用rpm 安装需要考虑如下信息:
1. 需要考虑系统的版本需要与rpm 对应
2. 系统的架构:如32位还是64位
3. 需要考虑依赖关系
rpm 安装
#ypm -ivh 软件包名称
-i install
-vh verbose human
-u upgrade
查找rpm 包的网站 :Rpmfind mirrorhttp://pkgs.org
1.通过rpm 安装
可以先下载下来
[[email protected] ~]# wget http://download-ib01.fedoraproject.org/pub/epel/7/x86_64/Packages/n/ntfs-3g-2017.3.23-11.el7.x86_64.rpm
#wget 下载命令
#wget -o 指定存放路径
#crul 下载地址 -o 另存为的地址
[[email protected] ~]# rpm -ivh ntfs-3g-2017.3.23-11.el7.x86_64.rpm #本地安装rpm包
2.直接通过连接安装rpm 包
[[email protected] ~]# rpm -ivh http://download-ib01.fedoraproject.org/pub/epel/7/x86_64/Packages/n/ntfs-3g-2017.3.23-11.el7.x86_64.rpm
各种查询
rpm -qa 展示出来下载的全部安装包
-q query
-l list
-f file
-a all
rpm -qa |grep 软件名 查找软件是否安装
rpm -ql httpd 查询http 安装的文件
rpm -qf /usr/share/httpd/noindex 查询该文件属于哪个包zhi
rpm -qf /etc/passwd 查询某一个文件是那个软件产生的 ;只能查询已经安装好的软件
卸载
rpm -e 软件名称
-e erase
rpm 工具管理软件包总结
很难解决包依赖关系
如果某个文件没有,很难知道它由哪个rpm 包提供
二、yum 方式管理文件
#可以自动解决rpm软件依赖关系,虽然是通过yum安装的但是最后执行的还是rpm,也就是说没有rpm命令yum也就不能用了。http 超文本传输协议 分类:本地yum和远程yum 本地yum: file:// 远程yum: http:// 超文本传输协议 ftp://
yum 操作
安装好环境之后我们有centos自带的官方yum源,我们也可以自行更换或者制作自己的yum源
yum clean all 清理yum 缓存
yum makecache 缓存软件包信息 提高搜索/安装软件的速度
yum repolist 软件包地址列出 缓存后显示
yum provides rz
yum list
yum install 软件名称 -y
yum -y reinstall 软件名
yum erase 软件名
yum remove 软件名 -y
yum -y remove``rpm -qa | grep httpd``
(反单引号)
yum 卸载rpm 查找出来的所有与 httpd 相关的软件包全部卸载掉
更换网络yum源 --aliyun
wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.163.com/.help/CentOS7-Base-163.repo
wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo
#cd /etc/yum.repos.d (切换至yum.repos.d目录)
#mkdir back (做个备份)
#mv *.repo back
#wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.163.com/.help/CentOS7-Base-163.repo (下载到CentOS-Base.repo *必须是.repo 否则无效)
#curl -o 指定存放路径
安装扩展源 --epel.repo
#wget -O /etc/yum.repos.d/epel.repo http://mirrors.aliyun.com/repo/epel-7.repo
#cd /etc/yum.repos.d
边栏推荐
- 多列属性column元素的可见性:display、visibility、opacity、垂直对齐方式:vertical-align、z-index 越大越显示在上层
- MySql的索引学习和使用;(本人觉得足够详细)
- 【informix】解决启动报错大全,以及解决办法
- 【8.4】代码源 - 【数学】【历法】【删库】【不朴素的数列(Bonus)】
- 【树莓派】树莓派调光
- Qixi Festival code confession
- How to solve complex distribution and ledger problems?
- The log causes these pits in the thread block, you have to guard against
- Based on holding YOLOv5 custom implementation of FacePose YOLO structure interpretation, YOLO data format conversion, YOLO process modification"
- Cron(Crontab)--使用/教程/实例
猜你喜欢
随机推荐
A 35-year-old software testing engineer with a monthly salary of less than 2W, resigns and is afraid of not finding a job, what should he do?
Ali's local life's single-quarter revenue is 10.6 billion, Da Wenyu's revenue is 7.2 billion, and Cainiao's revenue is 12.1 billion
数组常用方法总结
The most comprehensive exam questions for software testing engineers in 2022
Mini Program_Dynamic setting of tabBar theme skin
[MRCTF2020]PYWebsite
【8.1】代码源 - 【第二大数字和】【石子游戏 III】【平衡二叉树】
UE4 通过互动(键盘按键)开门
[8.2] Code Source - [Currency System] [Coins] [New Year's Questions (Data Enhanced Edition)] [Three Stages]
token, jwt, oauth2, session parsing
Hard power or soft power, which is more important to testers?
机器学习概述
Bosses, I noticed that a mysql CDC connector parameters scan. The incremental. Sna
Develop your own node package
工业级远距离无线传输装置的功能有哪些?
BI业务分析思维:现金流量风控分析(二)信用、流动和投资风险
UI自动化测试 App的WebView页面中,当搜索栏无搜索按钮时处理方法
Industry Status?Why do Internet companies prefer to spend 20k to recruit people rather than raise their salary to retain old employees~
bytebuffer internal structure
银行数据采集,数据补录与指标管理3大问题如何解决?