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

相关推荐
zxrhhm11 分钟前
SQLServer限制特定数据库的CPU使用率,确保关键业务系统有足够的资源
数据库·sqlserver
亚空间仓鼠18 分钟前
OpenEuler系统常用服务(五)
linux·运维·服务器·网络
刘~浪地球35 分钟前
Redis 从入门到精通(十三):哨兵与集群
数据库·redis·缓存
dyyshb1 小时前
PostgreSQL 终极兜底方案
数据库·postgresql
minji...1 小时前
Linux 线程同步与互斥(二) 线程同步,条件变量,pthread_cond_init/wait/signal/broadcast
linux·运维·开发语言·jvm·数据结构·c++
虚伪的空想家1 小时前
k8s集群configmap和secrets备份脚本
linux·容器·kubernetes
他们叫我技术总监1 小时前
零依赖!FineReport11 快速对接 TDengine 数据库:从驱动部署到报表实现
大数据·数据库·ai·tdengine
TDengine (老段)1 小时前
TDengine IDMP 可视化 —— 定时报告
大数据·数据库·人工智能·物联网·时序数据库·tdengine·涛思数据
曹牧1 小时前
Oracle:
数据库·oracle
kobel281 小时前
Linux x86快速部署openGauss3.1.1指南
数据库