当前位置:   article > 正文

【apt-mirror 制作麒麟桌面版内网源】_内网搭建麒麟源

内网搭建麒麟源

一、修改apt软件安装源

1、修改source.list安装源

vi /etc/apt/sources.list
添加:
deb http://archive.kylinos.cn/kylin/KYLIN-ALL 10.1 main universe multiverse restricted
deb http://archive2.kylinos.cn/deb/kylin/production/PART-V10-SP1/custom/partner/V10-SP1 default all
  • 1
  • 2
  • 3
  • 4

在这里插入图片描述

2、更新软件源信息

sudo apt update
  • 1

二、安装同步源工具“apt-mirror”

apt-mirrot是deb同步工具,使用apt-mirror可直接同步相关软件源上的deb至本地。

安装apt-mirror软件源同步工具

sudo apt install -y apt-mirror
  • 1

在这里插入图片描述

三、修改需要同步的源地址和配置

“mirror.list”是apt-mirror的配置文件,该文件修改同步路径,软件包架构等,想用哪一个源文件就取消相对应的注册,本次下载V10 SP1版本

sudo vi /etc/apt/mirror.list
修改需要配置文件
# 以下注释的内容都是默认配置,如果需要自定义,取消注释修改即可
set base_path    /data/apt-souce/
#镜像文件下载地址
set mirror_path  $base_path/mirror
#软件包存放路径(默认即可)
set skel_path    $base_path/skel
#临时索引下载文件目录,也就是存放软件仓库的dists目录下的文件(默认即可)
set var_path     $base_path/var
#配置日志(默认即可)
set defaultarch arm64
# 需要下载架构包,这里是下载arm64
set nthreads 20
set _tilde 0
#下载线程数

#V10版本:
#deb http://archive.kylinos.cn/kylin/KYLIN-ALL 10.0 main restricted universe multiverse

#V10 SP1版本:
#deb http://archive.kylinos.cn/kylin/KYLIN-ALL 10.1 main restricted universe multiverse
#clean http://archive.kylinos.cn/kylin/KYLIN-ALL
	
#V10 SP1版本: kylin-desktop-V10-SP1-arm64
deb https://archive2.kylinos.cn/deb/kylin/production/KY-V10-SP1-arm64/custom/kylin-desktop/V10-SP1-arm64 10.1 all main restricted universe multiverse
clean https://archive2.kylinos.cn/deb/kylin/production/KY-V10-SP1-arm64/custom/kylin-desktop/V10-SP1-arm64
	
#V10版本: kylin-desktop-V10-arm64
#deb https://archive2.kylinos.cn/deb/kylin/production/KY-V10-arm64/custom/kylin-desktop/V10-arm64 10.0 all main restricted universe multiverse
#clean https://archive2.kylinos.cn/deb/kylin/production/KY-V10-arm64/custom/kylin-desktop/V10-arm64
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
  • 17
  • 18
  • 19
  • 20
  • 21
  • 22
  • 23
  • 24
  • 25
  • 26
  • 27
  • 28
  • 29
  • 30
  • 31

在这里插入图片描述

四、同步软件源

直接在终端上执行apt-mirror即可下载相对应的软件包,重点注意软件的包大小,大部分的软件包大小在70G-150G之间,因此下载前先准备好存储空间

sudo apt-mirror
  • 1

在这里插入图片描述

下载中途断开只需要删除apt-mirror.lock文件即可

sudo rm /data/apt-souce/var/apt-mirror.lock
  • 1

五、web访问源

1.安装apache2

sudo apt install apache2
systemclt restart apache2
systemclt enable apache2
  • 1
  • 2
  • 3

2.修改访问路径

sudo ln -s /data/apt-soucearchive2.kylinos.cn/deb/kylin/production/KY-V10-SP1-arm64/custom/kylin-desktop/V10-SP1-arm64 /var/www/html/kylin-desktop-v10-sp1-arm64
  • 1

六、使用软件源

编辑 /etc/apt/source.list,加入以下内容

sudo vi /etc/apt/source.list
#ip和port是自己本机的,其中端口默认为80
deb [arch=arm64] http://[ip]:[port]/kylin-desktop-v10-sp1-arm64 10.1 all main restricted universe multiverse
  • 1
  • 2
  • 3
声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/你好赵伟/article/detail/216909
推荐阅读
相关标签
  

闽ICP备14008679号