易陆发现互联网技术论坛

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

ubuntu系统同步apt源到本地

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

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

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

x
ubuntu系统同步apt源到本地# F% ?+ ^) j7 m6 r/ J

. o' b( O; B" s. |3 I( a; w  g# X. k/ U3 y/ B6 }$ {8 Z
0 X7 z: N$ y1 O
root@localhost:~# apt install -y apt-mirror
- e6 s: G* m4 ^$ v3 O& |1 h1 \* E4 uReading package lists... Done
6 W: [% h  u. BBuilding dependency tree... Done) r( \. V, D! Z* J' d+ B
Reading state information... Done2 S+ ?/ [7 m& r
The following NEW packages will be installed:7 j7 C* J, ?. z2 i& }% L
  apt-mirror" \3 b  W4 e& c9 L' v
0 upgraded, 1 newly installed, 0 to remove and 53 not upgraded.
  `+ {) R& r0 |% [6 A+ h8 [, cNeed to get 14.5 kB of archives.
8 r8 n, @8 b/ o1 I9 q) oAfter this operation, 68.6 kB of additional disk space will be used.8 {# I4 Q4 t3 t5 E5 @4 |( _
Get:1 http://mirrors.tuna.tsinghua.edu.cn/ubuntu lunar/universe amd64 apt-mirror all 0.5.4-2 [14.5 kB]
7 o* V  j7 j* SFetched 14.5 kB in 0s (49.2 kB/s)     % ^3 W* T1 |! p9 b9 R( q
Selecting previously unselected package apt-mirror.# s0 h) i9 Q% _# x
(Reading database ... 82861 files and directories currently installed.)
- _: E4 [5 ?4 z7 oPreparing to unpack .../apt-mirror_0.5.4-2_all.deb ...+ v2 h9 L* h5 F5 d% i# b" e0 {" A
Unpacking apt-mirror (0.5.4-2) ...% G$ G% l' U/ y; o) n& Z6 ]2 K$ b
Setting up apt-mirror (0.5.4-2) .... A' R, P( \+ f& h- h" }* o
Processing triggers for man-db (2.11.2-1) ...( l# F$ c" A2 i0 z( n  A
Scanning processes...                                                                                                                                                                                                  
9 N& K: K* ~0 ]1 c; X. y3 sScanning processor microcode...                                                                                                                                                                                        . t7 D/ c) d3 v: `' K5 Y
Scanning linux images...                                                                                                                                                                                               2 G7 g" j! ^* m' _, @3 m
' R  y  l. o0 d6 T7 M) a% [
Running kernel seems to be up-to-date.- X! V9 k" i5 ]% K* T. Y0 N% R
8 q5 d/ c. w+ w$ M, \2 o/ @
Failed to check for processor microcode upgrades., P. b; T1 i: C: b
, F. L( K  J, `( A! {3 X! |4 g$ M1 V
No services need to be restarted.
0 @0 ~7 }, g8 }0 ~! w( Q8 p, g; o! E; z, ?& D
No containers need to be restarted.
& p1 X" u6 Q& u( L  P
) \- N+ I2 e" S, H4 [No user sessions are running outdated binaries.
, c- ^) V2 A! K1 T4 f5 E  h8 V2 U) L2 e  C# g3 U. X2 N
No VM guests are running outdated hypervisor (qemu) binaries on this host.! n: }: Q9 O6 z7 Y# Q- d

, Q! t" }, |$ x9 S* x: U; N" m9 i; w
配置文件:/ I! U) R- ]$ ]( K$ {" g9 U/ p# P
: F4 Q0 |9 c( \5 A/ t
############# config ##################
3 n, Z$ }, R& _0 ^# z1 D8 G#& o  s; T* E/ m& ]2 l8 n
set base_path    /var/www/html/
+ h7 F+ y0 @4 U( z/ `#
3 j- d: l+ n# O6 L3 O' F# set mirror_path  $base_path/mirror
3 [  d+ B* Y+ n+ [- x3 j: ^# set skel_path    $base_path/skel' w- j+ U3 T& ?
# set var_path     $base_path/var) H( g0 L( X+ f) H+ P/ R5 N8 I' N
# set cleanscript $var_path/clean.sh
6 \# W2 g0 ^  i/ B# set defaultarch  <running host architecture>' o0 R# B$ q/ p8 g; b
# set postmirror_script $var_path/postmirror.sh( X: I0 M6 T  V0 b. d* {
# set run_postmirror 0
3 d7 y1 N% T* l! `! r/ ~. O5 kset nthreads     20; S% Y: k' A6 z. {' N' A, b* j' x
set _tilde 0
* T) ?3 U6 r& O. G% L  v#" C' d+ H" Y4 J$ H
############# end config ##############
. b) E- r+ i: F1 |' j* P& }! N! b7 E; U  @
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu-ports/ bionic main restricted universe multiverse0 ^" E9 k# V3 J4 h- r8 i
. k. B9 u0 w; i( l8 M9 q5 U* s

# T: ^1 ?/ m5 V& `7 S) N: R7 odeb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu-ports/ bionic main restricted universe multiverse
$ v% [5 @5 n3 y1 v#deb-src http://archive.ubuntu.com/ubuntu kinetic-proposed main restricted universe multiverse
) k: z7 W6 f0 T! m0 \#deb-src http://archive.ubuntu.com/ubuntu kinetic-backports main restricted universe multiverse% M5 }: `8 z4 I. F/ ^
* V/ R3 r0 S# X; J; P$ i4 q
clean https://mirrors.tuna.tsinghua.edu.cn/ubuntu-ports/3 k- E+ u! _' q2 {% G( j

5 q) a  b$ _8 I8 V
; W# {' o2 C9 m* g* w, p5 t
执行
' {" o( J1 c0 K" q4 L& C7 o apt-mirror
* o0 U- J; q/ u, s4 s
9 d' f+ F2 B. _  E# q

9 m, ^; F& r  ^' u* @% J9 M! D, m/ U& {) T0 m1 p" ^
1 @' o7 R. n, D' l/ Q$ J" I
9 r8 l" Y5 G8 }& z) q$ M# h+ i

6 j9 t( A( B; I! G2 j' d2 H, |  v4 q5 h! \2 H& a
您需要登录后才可以回帖 登录 | 开始注册

本版积分规则

关闭

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

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

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

GMT+8, 2026-4-9 01:11 , Processed in 0.048116 second(s), 22 queries .

Powered by Discuz! X3.4 Licensed

© 2012-2025 Discuz! Team.

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