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

ubuntu系统同步apt源到本地

[复制链接]

1

主题

0

回帖

12

积分

管理员

积分
12
QQ
发表于 2024-8-28 11:12:58 | 显示全部楼层 |阅读模式
ubuntu系统同步apt源到本地
6 v  g* D' N  [3 B. Q$ I3 L6 b9 s% I
! }% s9 |1 E2 G5 N; v' [& a" k+ m/ ~8 n. W8 `  g8 K
  A( ~2 r2 L+ i8 C
root@localhost:~# apt install -y apt-mirror ) X7 j5 L: ?: h
Reading package lists... Done( r+ ~& k0 w- m
Building dependency tree... Done- H$ @& r+ {2 A0 z; K
Reading state information... Done
2 I- h9 U* J* S6 M( b7 CThe following NEW packages will be installed:
4 O& Q! K: r0 d: f2 M. x# t/ u/ Q  apt-mirror
, X# G5 p0 C, ^$ u) j1 G2 D9 f& k0 upgraded, 1 newly installed, 0 to remove and 53 not upgraded.
! y" b  j/ T7 \. ~Need to get 14.5 kB of archives.  H3 [6 r: ~  a
After this operation, 68.6 kB of additional disk space will be used.2 E' _3 u2 s/ T
Get:1 http://mirrors.tuna.tsinghua.edu.cn/ubuntu lunar/universe amd64 apt-mirror all 0.5.4-2 [14.5 kB]
6 Z$ _1 j# q. c' ZFetched 14.5 kB in 0s (49.2 kB/s)     
( R$ f2 I: y( ]4 e* |2 m  r6 A8 zSelecting previously unselected package apt-mirror.
0 ^' b3 j7 L# ]( P5 g( L(Reading database ... 82861 files and directories currently installed.)
/ s6 n7 n2 W* ^/ dPreparing to unpack .../apt-mirror_0.5.4-2_all.deb ...
7 U  h5 v( n# Q3 r6 jUnpacking apt-mirror (0.5.4-2) ...
# x/ }; u$ p# C7 SSetting up apt-mirror (0.5.4-2) ...
) [: g4 ^7 H  H$ P+ @) E: f! @Processing triggers for man-db (2.11.2-1) ...  L1 p- Z. E/ g( s
Scanning processes...                                                                                                                                                                                                  4 Y; W) J  L5 P* B  V! O( t- [- e
Scanning processor microcode...                                                                                                                                                                                       
# K' G! X+ F$ O; m2 W' |0 O, jScanning linux images...                                                                                                                                                                                               
1 [1 ?) i7 R9 w$ \5 m* T- e: `5 k$ c' k
Running kernel seems to be up-to-date.
1 |( T" i* w, F( G2 b1 r& M* r& x  S
Failed to check for processor microcode upgrades.
: }7 _( @% C2 N8 s0 a% X& ]) L2 V+ u0 K2 j
No services need to be restarted.
& }+ b/ n0 [% Z$ M8 T; m+ C( O7 z% ^$ @/ `. l8 b4 k* |0 G
No containers need to be restarted.  Z6 H- V0 @" b2 `7 t3 I( ~: e' A' Q/ w

" @, D( u5 z* mNo user sessions are running outdated binaries.1 M1 y) k8 {2 J: n; h

9 P" O4 d1 T/ @No VM guests are running outdated hypervisor (qemu) binaries on this host.5 i' D; c; X, h2 ~: l3 k
0 [4 t  G' Q7 F% }) s. @: a

1 `" c, D; a( R" {( h- w配置文件:6 ~+ u% U! Y" Z  X
) c$ y4 k( j3 M. l
############# config ##################& ~  p0 X5 u. D. Y( w
#
, v$ x  k0 y- J5 ^3 O3 eset base_path    /var/www/html/
2 w0 z, W$ r; c9 M' S2 j7 ~#: S( }( P' j5 D6 ?$ T: R% A
# set mirror_path  $base_path/mirror! ?; z# E9 o9 O& D# n8 `
# set skel_path    $base_path/skel8 f/ W. L! m  C0 u  b' D
# set var_path     $base_path/var
" p. e- C% y' N8 N0 U4 {5 D# set cleanscript $var_path/clean.sh
4 Z7 o  r1 u4 P2 @2 N. i0 H+ Q7 c# set defaultarch  <running host architecture>
. T0 M# f( @4 O/ I! i3 N; N# set postmirror_script $var_path/postmirror.sh
$ R# B, J8 A0 E& |# set run_postmirror 0
+ Y% Y4 k7 J) x0 h  z. k8 zset nthreads     20* o1 I0 C/ u# f" @
set _tilde 0' g5 u  a9 i# q7 r8 H* j
## [* J' a* c% B
############# end config ##############
, }- \; ~: x5 N$ `  g5 [2 P3 z5 C+ k
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu-ports/ bionic main restricted universe multiverse
1 t, F3 v% a( h; m" _, \  q0 ~9 h+ C# v5 f" g# D; u

+ w0 N' j1 @" O$ ]- @0 A" P1 S( kdeb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu-ports/ bionic main restricted universe multiverse' h2 E3 |, R. `' s" w" T
#deb-src http://archive.ubuntu.com/ubuntu kinetic-proposed main restricted universe multiverse- S3 x6 `+ G0 k! x; w1 T
#deb-src http://archive.ubuntu.com/ubuntu kinetic-backports main restricted universe multiverse; g& f( `! n; b2 U; A

* ]) @# a, Y9 [clean https://mirrors.tuna.tsinghua.edu.cn/ubuntu-ports/6 f* r& |9 V  r5 v3 E

# M  C2 \+ s( R6 l4 A1 L# R

/ O4 A% B; ?+ a; s. j' P执行
* m: F3 R- o% K8 p, ?' X apt-mirror ) |) \8 \) r4 I" A, D% [" H; g" @
& M8 `9 P$ y5 i: f  s3 m' i( V/ }

, ?) _) @$ W% f. }5 ]. K
' s5 i4 h3 }3 i' F" g/ O7 Y+ c! C! `, i" A' ?9 G! [8 c
; R0 h) I, ]+ e; T: G) X7 g# X1 X3 G( b
" j$ u, ~3 N& L* r% d; d5 X/ s2 r
- I+ n, C) N8 y" ~: {; V+ h
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-6-12 01:49 , Processed in 0.016263 second(s), 22 queries .

Powered by Discuz! X5.0

© 2001-2026 Discuz! Team.

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