当前位置:网站首页>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.
边栏推荐
- 开题报告之论文框架
- SQL注入 Less54(限制次数的SQL注入+union注入)
- 直播预告 | KDD2022博士论文奖冠亚军对话
- MPPT太阳能充放电控制器数据采集-通过网关采集电池电压容量电量SOC,wifi传输
- Teach you how to configure Jenkins automated email notifications
- YOLOV5学习笔记(二)——环境安装+运行+训练
- 15、网站统计数据
- FPGA-based vending machine
- STM32CUBEMX develops GD32F303 (11) ---- ADC scans multiple channels in DMA mode
- Mathematical Ideas in AI
猜你喜欢
6、显示评论和回复
Intel's software and hardware optimization empowers Neusoft to accelerate the arrival of the era of smart medical care
静态路由解析(最长掩码匹配原则+主备路由)
软件积累 -- 截图软件ScreenToGif
What level of software testing does it take to get a 9K job?
19. Support Vector Machines - Intuitive Understanding of Optimization Objectives and Large Spacing
Detailed explanation of STP election (step + case)
MPPT solar charge controller data collection - through the gateway acquisition capacity battery SOC battery voltage, wi-fi
Pythagorean tuple od js
Static routing + PAT + static NAT (explanation + experiment)
随机推荐
Layer 2 broadcast storm (cause + judgment + solution)
Introduction to flask series 】 【 flask - using SQLAlchemy
Inter-vlan routing + static routing + NAT (PAT + static NAT) comprehensive experiment
f.grid_sample
Brute Force/Adjacency Matrix Breadth First Directed Weighted Graph Undirected Weighted Graph
【C语言基础】解决C语言error: expected ‘;‘, ‘,‘ or ‘)‘ before ‘&‘ token
软件积累 -- 截图软件ScreenToGif
跨专业考研难度大?“上岸”成功率低?这份实用攻略请收下!
[1154] How to convert string to datetime
LeetCode 1161 最大层内元素和[BFS 二叉树] HERODING的LeetCode之路
Basic introduction to ShardingJDBC
多线程下类对象的服务承诺探讨
mycat的主从关系 垂直分库 水平分表 以及mycat分片联表查询的配置详解(mysql5.7系列)
LeetCode 1161 The largest element in the layer and the LeetCode road of [BFS binary tree] HERODING
General introduction to the Unity interface
The comprehensive result of the case statement, do you know it?[Verilog Advanced Tutorial]
Drools规则属性,高级语法
AtCoder Beginner Contest 261 部分题解
Verify the integer input
Intel's software and hardware optimization empowers Neusoft to accelerate the arrival of the era of smart medical care