-
安装依赖
yum -y install yum-utils createrepo -
创建本地存储目录
mkdir /data/mirror -
同步extras、updates、base、epel仓库到/data/mirror目录
reposync -n --repoid=extras --repoid=updates --repoid=base --repoid=epel -p /data/mirror -
创建仓库索引
createrepo -po /data/mirror/base/ /data/mirror/base/ createrepo -po /data/mirror/extras/ /data/mirror/extras/ createrepo -po /data/mirror/updates/ /data/mirror/updates/ createrepo -po /data/mirror/epel/ /data/mirror/epel/ -
更新仓库索引
createrepo --update /data/mirror/base/ createrepo --update /data/mirror/extras/ createrepo --update /data/mirror/updates/ createrepo --update /data/mirror/epel/ -
nginx配置
server { listen 8090; server_name 192.168.200.102; location / { root /data/mirror/; autoindex on; index index.html index.htm; } } -
客户端local.repo
[local_base] name=Centos7.9 local base baseurl=http://192.168.200.102:8090/base enable=1 gpgcheck=0 [local_extras] name=Centos7.9 local extras baseurl=http://192.168.200.102:8090/extras enable=1 gpgcheck=0 [local_updates] name=Centos7.9 local updates baseurl=http://192.168.200.102:8090/updates enable=1 gpgcheck=0 [local_epel] name=Centos7.9 local epel baseurl=http://192.168.200.102:8090/epel enable=1 gpgcheck=0
centos7 nginx搭建本地yum仓库
L白眸2023-12-23 12:36
相关推荐
lcreek6 小时前
Linux信号机制详解:阻塞信号集与未决信号集shandianchengzi7 小时前
【记录】Tailscale|部署 Tailscale 到 linux 主机或 Docker 上John Song7 小时前
Linux机器怎么查看进程内存占用情况sichuanwuyi7 小时前
Wydevops工具的价值分析持戒波罗蜜8 小时前
ubuntu20解决intel wifi 驱动问题不做无法实现的梦~8 小时前
使用ros2来跑通mid360的驱动包点云SLAM8 小时前
C++内存泄漏检测之Windows 专用工具(CRT Debug、Dr.Memory)和Linux 专业工具(ASan 、heaptrack)肉肉心很软9 小时前
使用onlyoffice实现文件预览编辑 + Docker一键部署流程LuiChun9 小时前
Docker Compose 容器服务查询与文件查看操作指南(Windows Docker Desktop 版)【一】${王小剑}9 小时前
在离线ubuntu上布置深度学习环境