外网同步所有ubuntu源到内网使用

同步外网清华源的ubuntu源到内网使用

1.内网源使用只需要dist目录和pool目录

18.04 = bionic、20.04 = focal、22.04 = jammy、24.04 = noble

#同步ubuntu18.04的dists目录

rsync -avz --delete --bwlimit=10000 --include="dists/bionic/**" --exclude="pool/**" --exclude="*.iso" --exclude="dists/*/main/debian-installer" rsync://mirrors.tuna.tsinghua.edu.cn/ubuntu/ /data/ubuntu-repos/

#同步ubuntu20.04的dists目录

rsync -avz --delete --bwlimit=10000 --include="dists/focal/**" --exclude="pool/**" --exclude="*.iso" --exclude="dists/*/main/debian-installer" rsync://mirrors.tuna.tsinghua.edu.cn/ubuntu/ /data/ubuntu-repos/

#同步ubuntu22.04的dists目录

rsync -avz --delete --bwlimit=10000 --include="dists/jammy/**" --exclude="pool/**" --exclude="*.iso" --exclude="dists/*/main/debian-installer" rsync://mirrors.tuna.tsinghua.edu.cn/ubuntu/ /data/ubuntu-repos/

#同步ubuntu24.04的dists目录

rsync -avz --delete --bwlimit=10000 --include="dists/noble/**" --exclude="pool/**" --exclude="*.iso" --exclude="dists/*/main/debian-installer" rsync://mirrors.tuna.tsinghua.edu.cn/ubuntu/ /data/ubuntu-repos/

#同步pool目录,pool目录是所有ubuntn的包,不到4T, 无法只同步指定版本的

rsync -avz --delete --bwlimit=5000 --include="pool/main/**" --include="pool/restricted/**" --include="pool/universe/**" --include="pool/multiverse/**" --exclude="dists/**" --exclude="pool/*/debug" --exclude="*.iso" rsync://mirrors.tuna.tsinghua.edu.cn/ubuntu/ /data/ubuntu-repos/

2.最后把ubuntu-repos目录同步到内网环境,在通过nginx指向这个目录即可

相关推荐
陌上丨10 小时前
Redis的Key和Value的设计原则有哪些?
数据库·redis·缓存
AI_567811 小时前
AWS EC2新手入门:6步带你从零启动实例
大数据·数据库·人工智能·机器学习·aws
ccecw11 小时前
Mysql ONLY_FULL_GROUP_BY模式详解、group by非查询字段报错
数据库·mysql
wdfk_prog11 小时前
[Linux]学习笔记系列 -- [drivers][input]input
linux·笔记·学习
JH307311 小时前
达梦数据库与MySQL的核心差异解析:从特性到实践
数据库·mysql
数据知道11 小时前
PostgreSQL 核心原理:如何利用多核 CPU 加速大数据量扫描(并行查询)
数据库·postgresql
盟接之桥11 小时前
盟接之桥说制造:引流品 × 利润品,全球电商平台高效产品组合策略(供讨论)
大数据·linux·服务器·网络·人工智能·制造
忆~遂愿12 小时前
ops-cv 算子库深度解析:面向视觉任务的硬件优化与数据布局(NCHW/NHWC)策略
java·大数据·linux·人工智能
湘-枫叶情缘12 小时前
1990:种下那棵不落叶的树-第6集 圆明园的对话
linux·系统架构
麦聪聊数据12 小时前
Web 原生架构如何重塑企业级数据库协作流?
数据库·sql·低代码·架构