当前位置:网站首页>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.
边栏推荐
猜你喜欢
Drools规则属性,高级语法
图像处理技术的心酸史
Manchester City confuses fans with smart scarf that detects emotions
ShardingJDBC usage summary
FPGA-based vending machine
SQL注入 Less46(order by后的注入+rand()布尔盲注)
f.grid_sample
CorelDRAW2022精简亚太新增功能详细介绍
Drools Rule Properties, Advanced Syntax
To write good test cases, you must first learn test design
随机推荐
验证整数输入
Huawei od dice js
Refuse to work overtime, a productivity tool set developed by programmers
经典链表OJ强训题——快慢双指针高效解法
知识蒸馏7:知识蒸馏代码详解
MPPT solar charge controller data collection - through the gateway acquisition capacity battery SOC battery voltage, wi-fi
多线程下类对象的服务承诺探讨
图像处理技术的心酸史
Discourse 自定义头部链接(Custom Header Links)
AI中的数学思想
Software testing basic interface testing - getting started with Jmeter, you should pay attention to these things
There is a problem with the multiplayer-hlap package and the solution cannot be upgraded
TCP/IP四层模型
Intranet Infiltration - Privilege Escalation
cudaMemcpy study notes
The principle of complete replication of virtual machines (cloud computing)
SQL注入 Less46(order by后的注入+rand()布尔盲注)
String为什么不可变?
系统需求多变如何设计
f.grid_sample