当前位置:网站首页>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.
边栏推荐
猜你喜欢

FPGA-based vending machine

mmdetection trains a model related command
![The comprehensive result of the case statement, do you know it?[Verilog Advanced Tutorial]](/img/8a/28427aa773e46740eda9e95f6669f2.png)
The comprehensive result of the case statement, do you know it?[Verilog Advanced Tutorial]

CMOS和TTL的区别?

JS 函数 this上下文 运行时点语法 圆括号 数组 IIFE 定时器 延时器 self.备份上下文 call apply

Layer 2 broadcast storm (cause + judgment + solution)

mycat的主从关系 垂直分库 水平分表 以及mycat分片联表查询的配置详解(mysql5.7系列)

静态路由解析(最长掩码匹配原则+主备路由)

图像处理技术的心酸史

SQL注入 Less46(order by后的注入+rand()布尔盲注)
随机推荐
SQL注入 Less47(报错注入) 和Less49(时间盲注)
验证整数输入
静态路由解析(最长掩码匹配原则+主备路由)
全流程调度——MySQL与Sqoop
The final exam first year course
Unity界面总体介绍
MPPT太阳能充放电控制器数据采集-通过网关采集电池电压容量电量SOC,wifi传输
Software testing basic interface testing - getting started with Jmeter, you should pay attention to these things
LeetCode Daily Question 2022/7/25-2022/7/31
[1154]如何将字符串转换为datetime
Static route analysis (the longest mask matching principle + active and standby routes)
7、私信列表
MPPT solar charge controller data collection - through the gateway acquisition capacity battery SOC battery voltage, wi-fi
Basic learning about Redis related content
Huawei od dice js
Drools basic introduction, introductory case, basic syntax
Difference between CMOS and TTL?
The Sad History of Image Processing Technology
tcp框架需要解决的问题
try-catch中含return