易陆发现互联网技术论坛

 找回密码
 开始注册
查看: 1|回复: 0
收起左侧

ubuntu系统同步apt源到本地

[复制链接]
发表于 2024-8-28 11:12:58 | 显示全部楼层 |阅读模式

马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。

您需要 登录 才可以下载或查看,没有账号?开始注册

x
ubuntu系统同步apt源到本地
0 }4 P! s; F( I& {. Y7 ~9 S+ j; U: h+ E+ k5 m- l

9 \8 c) t& @3 D
6 L6 T/ [$ u, k% ~. proot@localhost:~# apt install -y apt-mirror
+ w; z+ A3 Y5 p6 h9 M" e3 EReading package lists... Done+ K8 G- Y: X. Z* Y
Building dependency tree... Done! R0 `! V" C' L" X3 N6 a; P6 A
Reading state information... Done
; B7 ]2 b* X1 KThe following NEW packages will be installed:9 Y" @& q9 a# k" N- A+ c* _- y
  apt-mirror
" ]  u$ \& m0 C$ r5 B' P' u0 upgraded, 1 newly installed, 0 to remove and 53 not upgraded.
% ~- T  A  v7 L8 ^; }Need to get 14.5 kB of archives.- E, l* y/ B' c) j+ g. m
After this operation, 68.6 kB of additional disk space will be used.- p+ ~* t0 K% X
Get:1 http://mirrors.tuna.tsinghua.edu.cn/ubuntu lunar/universe amd64 apt-mirror all 0.5.4-2 [14.5 kB]. n$ F, T' b  g% Y
Fetched 14.5 kB in 0s (49.2 kB/s)     $ O0 L: F3 _# K+ h, V
Selecting previously unselected package apt-mirror.5 m- q% {; o/ k6 h: n
(Reading database ... 82861 files and directories currently installed.)/ T4 G& i" q* ~3 R3 x8 Z$ `* K) N" J2 T% P
Preparing to unpack .../apt-mirror_0.5.4-2_all.deb ...4 {- u( C9 _0 y
Unpacking apt-mirror (0.5.4-2) ...
& ^& n: Y7 D' U' {9 ESetting up apt-mirror (0.5.4-2) ...
" l. X8 Q  L, v% \3 EProcessing triggers for man-db (2.11.2-1) ...8 s; [$ t3 I& N- h
Scanning processes...                                                                                                                                                                                                  
4 t9 q$ w' z3 y! LScanning processor microcode...                                                                                                                                                                                        2 N" \! q& [7 |6 r; }- d; x
Scanning linux images...                                                                                                                                                                                               
: @1 n( ?( c2 Q; ]9 a+ i
2 {) B1 w# N4 f! D0 X, t$ O7 K9 `Running kernel seems to be up-to-date.
. j' \" V5 f$ ]2 C$ A6 i9 g, w1 Y; J3 W4 D" ~- h+ P, [
Failed to check for processor microcode upgrades.# T. j: z# a5 M3 U* x

. U+ f, M/ r6 {  k, T& }No services need to be restarted.
8 ~- S; O, |& Z" r! s$ R+ P; [
6 a# Z4 C3 b% r- H1 N/ t* r- h. @No containers need to be restarted.# M7 R3 f8 D2 |& P; T( }& g
$ U- x7 z3 t" C
No user sessions are running outdated binaries.
9 L/ p6 i  ~# x4 L: P6 q) R+ w  O3 r+ V2 k/ n$ c% i# v7 m8 R4 ~/ K  o( _
No VM guests are running outdated hypervisor (qemu) binaries on this host.3 T! H* j5 x# x# r/ X$ N

2 [  ^& N* q9 \' }4 ^2 L! D9 g5 Z/ _$ M4 m! q! U
配置文件:  T5 z8 G; }; J# o+ U# ?4 C
( v  S0 h# Y$ c4 z$ B
############# config ##################
1 {  ]6 D; k. Y! y#
3 S6 E8 |' ?5 d3 j, S8 n5 Nset base_path    /var/www/html/
1 e* O7 H: ~4 h! \, R$ R#" X; b. Z% s$ k. k5 N, l0 x9 _
# set mirror_path  $base_path/mirror$ d1 _. c" C9 a( l5 }. }3 p( t2 L
# set skel_path    $base_path/skel0 `; }; P* O6 `: l. E8 s8 \
# set var_path     $base_path/var
3 \* J+ S; s4 L) i; O5 X! r# set cleanscript $var_path/clean.sh
# f6 h. q2 N2 Z" k, D4 X# set defaultarch  <running host architecture>
: o6 f! V( t: s: g4 ~8 n# R( A  p# set postmirror_script $var_path/postmirror.sh
, N% q( z# P% \# set run_postmirror 0; S) v7 W- z6 z1 W! J3 \
set nthreads     209 h8 @! s7 u, s; C
set _tilde 0; ^/ u& N0 a( m5 O$ E
#
+ i+ `+ D4 c8 a! B8 D############# end config ##############
9 V% C! k: Q+ x
/ L* y. [0 {; h9 _: a2 W* kdeb https://mirrors.tuna.tsinghua.edu.cn/ubuntu-ports/ bionic main restricted universe multiverse& T9 D. Y4 k, U3 _. [. H4 |- M

- d7 T# O5 k7 m$ k
" D) z. a* W) `. \3 i7 y8 s
deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu-ports/ bionic main restricted universe multiverse  h3 w* T, m" x+ {8 y# g4 x
#deb-src http://archive.ubuntu.com/ubuntu kinetic-proposed main restricted universe multiverse
  J5 m' h& i0 x) q2 G9 o5 P#deb-src http://archive.ubuntu.com/ubuntu kinetic-backports main restricted universe multiverse
/ D6 r7 L  m% Z
* i4 I: b  i; H9 j! D5 @9 ]3 _clean https://mirrors.tuna.tsinghua.edu.cn/ubuntu-ports/" M0 N' v" s: m. c; ?8 ]
  X  [' K2 X8 h- A& S
: l! |# U; W0 f% y0 p2 a
执行$ s) N- h3 w  M
apt-mirror
: e8 b( E6 i& u  v
* c& r$ p+ e$ l) x8 l0 \+ H) U$ K

! A8 ~7 n- r" E$ J. E7 |; V# B* S8 R: w3 M/ @1 e+ H

3 i% R6 S9 _* p5 B) V/ Q
" Z: G8 E  m) F( ^- V6 w$ o& n& j+ k$ u

/ L9 J! L( w( @1 |& }' C' T9 m
您需要登录后才可以回帖 登录 | 开始注册

本版积分规则

关闭

站长推荐上一条 /4 下一条

北京云银创陇科技有限公司以云计算运维,代码开发

QQ|返回首页|Archiver|小黑屋|易陆发现技术论坛 ( 蜀ICP备2026014127号-1 )点击这里给我发消息

GMT+8, 2026-4-8 21:27 , Processed in 0.041224 second(s), 22 queries .

Powered by Discuz! X3.4 Licensed

© 2012-2025 Discuz! Team.

快速回复 返回顶部 返回列表