当前位置:网站首页>How to build a private yum source
How to build a private yum source
2022-07-31 02:39:00 【north is south】
前言
yum 主要用于自动安装、升级rpm软件包,它能自动查找并解决rpm包之间的依赖关系.要成功的使用 yum 工具安装更新软件或系统,就需要有一个包含各种rpm软件包的repository(软件仓库),这个软件仓库我们习惯称为 yum源.For machines that can access the public network environment,The public network can be configured quicklyyum源,But for private environments,When the machine cannot access the external network,需要安装各种lib库,devel when the base is dependent,没有yumThe source is an extremely painful thing.
This article describes how to set up privateyum源.
一 Main server side configuration
1.1 创建目录
mkdir -p /data/yum/ky/x86_64/
1.2 安装createrepo软件:
yum -y install createrepo
createrepo -pdo /data/yum/ky/x86_64/ /data/yum/ky/x86_64/
1.3 提供http服务,It is convenient to use on the intranet
cd /data/yum/ky/x86_64/
python -m SimpleHTTPServer 5901 &>/dev/null &
1.4 上传yum 安装包到目录
The current one can be used hereyum Download the configuration belowrpm 包 但是不安装.比如
yumdownloader openssl-devel nginx libaio-devel mariadb
图
1.5 Configure the machine to use thisyum源
### 编辑 poc 安装使用的yum源
vim ky_poc.repo
[ky_poc] # 指定使用 ky_poc 库
name=Server
baseurl=http://127.0.0.1:5888/ #yum仓库IP 端口,pythonSpecify a different port when starting the service
enable=1 # 启用yum
gpgcheck=0 #Do not check checkgpg
1.6 更新索引
createrepo --update /data/yum/ky/x86_64
二 客户端配置
2.1 配置yum config
### backup otheryum 配置文件,如果有的话
cd /etc/yum.repos.d/
mkdir yum_bak
mv * yum_bak
编辑 poc 安装使用的yum源
vim ky_poc.repo
[ky_poc] # 指定使用 ky_poc 库
name=Server
baseurl=http://The machine where the warehouse is locatedip:5888/ #yum仓库IP 端口,pythonSpecify a different port when starting the service
enable=1 # 启用yum
gpgcheck=0 #Do not check checkgpg
2.2 Access private on the client sideyum 源
yum clean metadata dbcache
yum --enablerepo=ky_poc --disablerepo=base,updates,kubernetes,extras,epel,docker-ce-stable list
至此,一个yumThe source server is configured to use.Of course there are other official actions other than regular syncrpm 包到本地,保持本地的yumThe source is the latest state.
边栏推荐
- 力扣刷题之爬楼梯(7/30)
- execsnoop 工具
- 自动化办公案例:如何自动生成期数据?
- Linux下redis7的安装,启动与停止
- What level of software testing does it take to get a 9K job?
- Detailed explanation of STP election (step + case)
- MPPT solar charge controller data collection - through the gateway acquisition capacity battery SOC battery voltage, wi-fi
- CentOS7下mysql5.7.37的安装【完美方案】
- [1153]mysql中between的边界范围
- Live Preview | KDD2022 Doctoral Dissertation Award Champion and Runner-up Dialogue
猜你喜欢

What level of software testing does it take to get a 9K job?

Inter-vlan routing + static routing + NAT (PAT + static NAT) comprehensive experiment

经典链表OJ强训题——快慢双指针高效解法

AI在医疗影像设备全流程应用

完整复制虚拟机原理(云计算)

Real-time image acquisition based on FPGA

MPPT solar charge controller data collection - through the gateway acquisition capacity battery SOC battery voltage, wi-fi

基于opencv实现人脸检测

YOLOV5学习笔记(三)——网络模块详解

The Sad History of Image Processing Technology
随机推荐
YOLOV5学习笔记(二)——环境安装+运行+训练
First acquaintance with C language -- array
SQL注入 Less54(限制次数的SQL注入+union注入)
[1153] The boundary range of between in mysql
【shell基础】判断目录是否为空
Mathematical Ideas in AI
CentOS7下mysql5.7.37的卸载【完美方案】
The Sad History of Image Processing Technology
tcp框架需要解决的问题
Refuse to work overtime, a productivity tool set developed by programmers
Modbus on AT32 MCU
coldfusion8 background scheduled tasks take shell
STM32CUBEMX开发GD32F303(11)----ADC在DMA模式下扫描多个通道
Word/Excel fixed table size, when filling in the content, the table does not change with the cell content
全流程调度——MySQL与Sqoop
String为什么不可变?
真正的CTO,是一个懂产品的技术人
The effective square of the test (one question of the day 7/29)
10、Redis实现点赞(Set)和获取总点赞数
ShardingJDBC使用总结