apt-mirror 制作麒麟桌面版内网源

  • apt-mirror 制作麒麟桌面版内网源已关闭评论
  • 146 次浏览
  • A+
所属分类:linux技术
摘要

1、修改source.list安装源2、更新软件源信息apt-mirrot是deb同步工具,使用apt-mirror可直接同步相关软件源上的deb至本地。


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 

apt-mirror 制作麒麟桌面版内网源

2、更新软件源信息

sudo apt update 

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

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

安装apt-mirror软件源同步工具
sudo apt install -y apt-mirror
apt-mirror 制作麒麟桌面版内网源

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

“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 

apt-mirror 制作麒麟桌面版内网源

四、同步软件源

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

sudo apt-mirror 

apt-mirror 制作麒麟桌面版内网源

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

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

五、web访问源

1.安装apache2

sudo apt install apache2 systemclt restart apache2 systemclt enable apache2 

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 

六、使用软件源

编辑 /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 multiver