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

相关推荐
m0_748554812 小时前
golang如何实现用户订阅偏好管理_golang用户订阅偏好管理实现总结
jvm·数据库·python
有谁看见我的剑了?2 小时前
linux 添加硬盘后系统识别不到硬盘处理
linux·运维·服务器
早日退休!!!3 小时前
《数据结构选型指南》笔记
数据结构·数据库·oracle
xcLeigh3 小时前
KES数据库性能优化实战
数据库·sql·性能优化·sql优化·数据性能
阿正呀3 小时前
Redis怎样实现本地缓存的高效失效通知
jvm·数据库·python
yoyo_zzm3 小时前
Laravel9.x新特性全解析
数据库·mysql·nginx
2501_901200533 小时前
mysql如何设置InnoDB引擎参数_优化innodb_buffer_pool
jvm·数据库·python
yc_12243 小时前
用 Visual Studio 远程调试 Linux:从零到流畅的完整指南
linux·ide·visual studio
计算机安禾4 小时前
【Linux从入门到精通】第31篇:防火墙漫谈——iptables与firewalld防护指南
linux·运维·php
下一页盛夏花开4 小时前
ubuntu 20中安装QT以后出现红色空心断点
linux·运维·ubuntu