当前位置:网站首页>关于yum源的配置及更新
关于yum源的配置及更新
2022-07-31 06:29:00 【c.Coder】
什么是yum?
yum本质上其实就类似于我们常用的软件商店,用于下载软件的一个工具
具体关系如下图:

yum源分为本地yum源与网络yum源,本篇主要介绍如何在Linux下配置网络yum源
只需几行简单命令即可完成
首先执行以下命令可以查看当前已有的yum源
ls /etc/yum.repos.d
我们首先要做的是先将该基础原有的yum源进行备份
进入到yum源所在目录下:cd /etc/yum.repos.d
然后复制一份即可
cp CentOS-Base.repo CentOS-Base.repo.bak
再下载新的yum源到该目录下覆盖原先的yum源即可
wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo
这里采用的为阿里云的yum源,一般选国内任意yum源都行,都比国外快
清理原先yum源
yum clean all
最后生成yum源缓存即可
yum makecache
最后附上yum的常用命令
- 1. 列出所有可更新的软件清单命令:yum check-update
- 2. 更新所有软件命令:yum update
- 3. 仅安装指定的软件命令:yum install <package_name>
- 4. 仅更新指定的软件命令:yum update <package_name>
- 5. 列出所有可安裝的软件清单命令:yum list
yum list | grep 关键字 - 6. 删除软件包命令:yum remove <package_name>
- 7. 查找软件包命令:yum search <keyword>
- 8. 清除缓存命令
- yum clean packages:清除缓存目录下的软件包
- yum clean headers:清除缓存目录下的headers
- yum clean oldheaders:清除缓存目录下旧的headers
- yum clean, yum clean all(= yum clean packages; yum clean oldheaders):清除缓存目录下的软件包及旧的header
边栏推荐
- Difficulty comparison between high concurrency and multithreading (easy to confuse)
- [PSQL] SQL基础教程读书笔记(Chapter1-4)
- The Ballad of Lushan Sends Lu's Servant to the Void Boat
- 【C语言项目合集】这十个入门必备练手项目,让C语言对你来说不再难学!
- 解决win11/win10在登陆界面(解锁界面)点击获取每日壁纸无效的问题 - get Daily Lockscreen and Wallpaper - Win11/10的登录界面背景图片在哪里?
- 事务的四大特性
- SQLite数据库连接字符串
- Postgresql source code learning (33) - transaction log ⑨ - see the overall process of log writing from the insert record
- 文件 - 03 下载文件:根据文件id获取下载链接
- 金融租赁业务
猜你喜欢

Postgresql source code learning (33) - transaction log ⑨ - see the overall process of log writing from the insert record

MySQL detailed explanation

2022.07.20_Daily Question

03-SDRAM: Write operation (burst)

Core Tower Electronics won the championship in the Wuhu Division of the 11th China Innovation and Entrepreneurship Competition

MySQL安装到最后一步 write configuration file 失败 怎么办?及后安装步骤

文件 - 04 下载文件: 根据文件下载链接下载文件

DAY18:Xss 靶场通关手册

MySQL详解

Log4net 思维导图
随机推荐
【科普向】5G核心网架构和关键技术
2022.07.12_每日一题
Difficulty comparison between high concurrency and multithreading (easy to confuse)
电压源的电路分析知识分享
Leetcode952. Calculate maximum component size by common factor
2022.07.29_每日一题
sort函数(快速排列)的使用方法
Introduction and self-order of bcos
2022.07.13_每日一题
'vite' is not an internal or external command, nor is it a runnable program or batch file.
【Star项目】小帽飞机大战(七)
强化学习科研知识必备(数据库、期刊、会议、牛人)
How to set the computer password?How to add "safety lock" to your computer
从入门到一位合格的爬虫师,这几点很重要
Gradle remove dependency demo
事务的四大特性
R——避免使用 col=0
van-uploader uploads images, and cannot preview the image using base64 echo
深度学习通信领域相关经典论文、数据集整理分享
【解决】npm ERR A complete log of this run can be found in npm ERR

