找回密码
 注册
查看: 3|回复: 0

ubuntu系统同步apt源到本地

[复制链接]

1

主题

0

回帖

12

积分

管理员

积分
12
QQ
发表于 2024-8-28 11:12:58 | 显示全部楼层 |阅读模式
ubuntu系统同步apt源到本地+ K) G! m* p) `4 S: v8 x6 M$ N" A
( K. q+ }: K0 K( b2 ^' K3 E

+ _) n) `2 o7 H: X6 t3 p6 p4 X5 H
root@localhost:~# apt install -y apt-mirror
6 V/ X( O3 D& J+ j. K: A, \" a6 O0 r% i$ @Reading package lists... Done" }8 W& S% q: J" V* Z4 C( q  O
Building dependency tree... Done
9 @" C$ v5 x$ ]3 Q* I2 b' {Reading state information... Done* A& Q/ a- g9 {
The following NEW packages will be installed:
& Q. ~; q$ ^! L! ?2 j* t8 L  apt-mirror: e2 G4 |" j! `  K3 u: X; |+ T
0 upgraded, 1 newly installed, 0 to remove and 53 not upgraded.
. E' y) [6 V7 H& d0 fNeed to get 14.5 kB of archives.: a% |0 ^1 ?* ^" Z* G* A& g
After this operation, 68.6 kB of additional disk space will be used.6 U: T5 j) Q0 o5 _
Get:1 http://mirrors.tuna.tsinghua.edu.cn/ubuntu lunar/universe amd64 apt-mirror all 0.5.4-2 [14.5 kB]
: J( x6 ?. w9 M6 uFetched 14.5 kB in 0s (49.2 kB/s)     
/ u4 x6 ^" U7 ?' w3 K3 qSelecting previously unselected package apt-mirror.' |- F2 g9 ^% E+ \$ ^8 j8 l
(Reading database ... 82861 files and directories currently installed.)
& Q# ]( X9 e' ~Preparing to unpack .../apt-mirror_0.5.4-2_all.deb ..., h4 `: O+ U9 E: _! j* V
Unpacking apt-mirror (0.5.4-2) ...
  ^$ c1 q5 Y' g; d& @% cSetting up apt-mirror (0.5.4-2) ...
5 }, [4 f1 K! Q: `9 u% fProcessing triggers for man-db (2.11.2-1) ..." \. D( N6 e2 m  q0 }0 u1 |
Scanning processes...                                                                                                                                                                                                  ( a; c2 }  g, |% Z
Scanning processor microcode...                                                                                                                                                                                        * K3 f% a) A3 q) }) M. Q2 H3 e& A
Scanning linux images...                                                                                                                                                                                               3 X- p* H* [. p6 s& P8 K& e

% h7 X4 `. n  |# {9 C$ ]Running kernel seems to be up-to-date.
. D1 o8 m" _( z5 }& t' l
" Z" U- c6 S; i! _9 N! f# r. y8 {Failed to check for processor microcode upgrades.$ r% W4 ^- O; O! H' v

4 R) B% i( V6 P, R$ h- P7 ANo services need to be restarted.( q/ R6 Z1 B  K2 q; I8 c( o
# L  Z0 d: Y* g5 A
No containers need to be restarted.
( |7 }) c/ ]0 D' o
5 u* S% H$ z1 XNo user sessions are running outdated binaries.3 ^6 b1 |- h- M# l1 m- l9 Z, t( ]

8 M. @7 g2 `7 `+ n0 ANo VM guests are running outdated hypervisor (qemu) binaries on this host.
$ w' v: n, p! P1 p. t3 a
. u0 X' K% k, j/ v1 v0 H+ }/ F
  B: J% k5 l. E( [6 s配置文件:% a, h, w# _; i" |
! e4 U# a' ]; f+ G( P* ~, U& b
############# config ##################8 V4 W5 m" F  @% h
#: }7 u% R  w: u4 \: w: }
set base_path    /var/www/html/
6 M+ a3 p8 \2 o8 M) T+ [1 g8 L#
) q/ V: Y7 ?0 B' B, S# set mirror_path  $base_path/mirror
( V3 D" w0 w: U: N3 s/ m# set skel_path    $base_path/skel! `& X' M; x* u& C
# set var_path     $base_path/var$ T: |/ L' u, `" L7 K/ J
# set cleanscript $var_path/clean.sh
2 c9 W3 g& y$ g6 J# set defaultarch  <running host architecture>
) E$ z4 s4 K6 |3 A# m/ D4 ^# set postmirror_script $var_path/postmirror.sh0 z9 e. T9 g7 ~& q# t
# set run_postmirror 0
* |- S, k+ K( M: Z1 f9 z7 _set nthreads     20$ G( W9 B8 Y3 }( o: Q- C* b
set _tilde 0, ?: x/ {( |: |# o1 L6 V( O
#1 b% ?4 l! _6 @! s
############# end config ##############
" d! d- g2 a9 P
6 a' P5 x  i  L( S4 adeb https://mirrors.tuna.tsinghua.edu.cn/ubuntu-ports/ bionic main restricted universe multiverse; x6 m1 `) e% r% @1 O
+ g7 s9 G  w) ?4 O# [" p

5 C2 G& I$ O" o# pdeb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu-ports/ bionic main restricted universe multiverse
7 s" B) |' H( C& G7 R: n6 u4 [& \# l#deb-src http://archive.ubuntu.com/ubuntu kinetic-proposed main restricted universe multiverse
% n& g* Y( r6 h' ~* |#deb-src http://archive.ubuntu.com/ubuntu kinetic-backports main restricted universe multiverse
+ T1 S7 ]; v% z& z: X! h6 g( f4 w3 Z  ]8 b. c
clean https://mirrors.tuna.tsinghua.edu.cn/ubuntu-ports/7 Q1 V# b8 r& v0 Y0 w6 U1 u  p

' H0 B& ?! P8 t; f8 L6 P% V

% P9 v5 _+ Y' Q/ b2 z6 g执行7 F) H7 i/ |: x
apt-mirror
2 `3 _8 Q! g8 v
; P4 N0 Z5 I, A  ?1 j1 X! _8 M
1 K; ~+ X8 r& W! g. w+ i
/ S0 G3 J- y3 `. ~2 k) `. m  \
( y5 k. |/ p4 j/ A- h# g
/ c* i/ u6 `$ `; {
* h& D( F# c. l/ _. }! I& {& Y" r, z

9 e, P% o. Y. U; [: z6 q
您需要登录后才可以回帖 登录 | 注册

本版积分规则

返回首页|Archiver|手机版|小黑屋|易陆发现技术论坛 ( 蜀ICP备2026014127号-1 )

GMT+8, 2026-6-12 00:44 , Processed in 0.016189 second(s), 22 queries .

Powered by Discuz! X5.0

© 2001-2026 Discuz! Team.

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