当前位置:网站首页>快速学会配置yum的本地源和网络源,并学会yum的使用
快速学会配置yum的本地源和网络源,并学会yum的使用
2022-07-26 16:31:00 【我是渣渣辉】
yum本地源配置
1、先将本地光盘挂载至本地目录
[[email protected] ~]# mkdir /media/cdrom
[[email protected] ~]# mount /dev/cdrom /media/cdrom
2、更改/etc/yum.repos.d/rhe18.repo
[[email protected] ~]# vim /etc/yum.repos.d/rhel8.repo
#[软件仓库]: 软件仓库配置的开始
#name=指定一个名字
#baseurl=配置的就是软件仓库的位置: Packages的上一层目录
本地配置:file://
网络配置: http://
https://
#enabled=0或者1, 等于0代表不启用,默认是等于1
#gpgcheck=0或者1,等于0是不校验,等于1是要校验
#gpgkey=提供的key来校验(当gpgcheck=1的时候才生效)
[BaseOS]
name=BaseOS
baseurl=file:///mnt/BaseOS
gpgcheck=0
[AppStream]
name=AppStream
baseurl=file:///mnt/AppStream
gpgcheck=0
[[email protected] ~]# yum clean all
[[email protected] ~]# yum makecache
yum网络源配置
- 阿里云网络源,aliyun的镜像站点为https://mirrors.aliyun.com/
[[email protected] ~]# cat /etc/redhat-release
Rocky Linux release 8.5 (Green Obsidian)
注:此处先查看自己的发行版本信息,选择相应的仓库。
#仓库文件可以自己写也可以从aliyun网站下载
[[email protected] ~]# cat /etc/yum.repos.d/aliyun.repo
[appstream]
name=appstream
baseurl=https://mirrors.aliyun.com/rockylinux/8.5/AppStream/x86_64/os/
gpgcheck=0
#gpgcheck=1 #如果gpgcheck为1,需要写秘钥文件路径
#gpgkey=https://mirrors.aliyun.com/rockylinux/RPM-GPG-KEY-rockyofficial
[baseos]
name=baseos
baseurl=https://mirrors.aliyun.com/rockylinux/8.5/BaseOS/x86_64/os/
gpgcheck=0
#gpgcheck=1
#gpgkey=https://mirrors.aliyun.com/rockylinux/RPM-GPG-KEY-rockyofficial
清华源镜像站点为https://mirrors.tuna.tsinghua.edu.cn/
中国科技大学镜像站点https://mirrors.ustc.edu.cn/
网易开源镜像站http://mirrors.163.com/
安装httpd软件
yum install httpd -y
查看vim命令属于哪个软件包
yum provides vim
yum卸载httpd
yum reinstall httpd
清理缓存
yum clean all
重新创建缓存
yum makcahre
安装postgresql模块中的版本13
yum moudle install postgresql:13 -y
边栏推荐
- From SiCp to LISP video replay
- Analyzing method and proc in Ruby
- Alibaba side: analysis of ten classic interview questions
- [e-mr] error recovery record of namenode
- Tao and art of R & D Efficiency - Tao chapter
- 理财产品锁定期是什么意思?理财产品在锁定期能赎回吗?
- 如何借助自动化工具落地DevOps|含低代码与DevOps应用实践
- 什么是分布式定时任务框架?
- Operating system migration practice: deploying MySQL database on openeuler
- How to write unit tests
猜你喜欢
随机推荐
Re8: reading papers Hier spcnet: a legal stat hierarchy based heterogeneous network for computing legal case
Marxan模型保护区优化与保护空缺甄选技术、InVEST生态系统中的应用
接口比较器
How to balance open utilization and privacy security compliance of public data?
Tdengine landed in GCL energy technology, with tens of billions of data compressed to 600gb
mysql锁机制(举例说明)
Guangzhou Municipal Safety Committee Office issued warnings and reminders on safety precautions in hot weather
Clojure Web Development -- ring user guide
Pyqt5 rapid development and practice 3.4 signal and slot correlation
Digital currency of quantitative transactions - merge transaction by transaction data through timestamp and direction (large order consolidation)
Use verdaccio to build your own NPM private library
TensorFlow Lite源码解析
[arm learning (9) ARM compiler understanding learning (armcc/armclang)]
限流对比:Sentinel vs Hystrix 到底怎么选?
It turns out that cappuccino information security association does this. Let's have a look.
What is a distributed timed task framework?
2022-2023 topic recommendation of information management graduation project
kubernetes之ReplicationController与ReplicaSet
公共数据如何兼顾开放利用和隐私安全合规?
什么是分布式定时任务框架?

![[fluent -- advanced] packaging](/img/aa/bd6ecad52cbe4a34db75f067aa4dfe.png)







