外网同步所有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指向这个目录即可

相关推荐
重生的黑客5 小时前
Linux 进程优先级、切换与调度:从孤儿进程到 O(1) 调度模型
linux·运维·服务器·进程优先级·nice
sg_knight5 小时前
MySQL 存储过程详解:从入门到实战
android·数据库·mysql·database·dba·关系型数据库·db
星空露珠6 小时前
28种颜色对应名称,
开发语言·数据库·算法·游戏·lua
骑上单车去旅行7 小时前
MD5校验对比脚本
linux·服务器·windows
平生幻7 小时前
Linux 常用命令
linux
踏月的造梦星球7 小时前
DM8 DSC 单机双实例部署
运维·开发语言·数据库
Database_Cool_7 小时前
企业级多模态分析计算引擎选型:首选 AnalyticDB MySQL 向量 + SQL + 实时一体化方案
数据库·sql·mysql
SelectDB7 小时前
从 Oracle、Hadoop 到 Apache Doris:哥瑞利泛半导体智能制造数据平台实践
数据库
ihuyigui7 小时前
海外签收通知短信接口
android·java·开发语言·前端·数据库·后端
海棠Flower未眠7 小时前
SpringBoot 消息死信队列(荣耀典藏版)
java·数据库·spring boot