UOS利用系统安装光盘做本地apt源安装软件包

普通用户可能没有权限执行mount命令,因此建议使用root用户或具有sudo权限的用户执行如下操作。

1.可以使用系统安装光盘,或者系统ISO镜像制作本地apt源。

若使用系统安装光盘。将光盘插入服务器光驱,然后执行如下命令挂载光盘到/media/cdrom目录:

# mount /dev/cdrom /media/cdrom

若使用系统ISO镜像。将系统ISO镜像上传至服务器(如/home/kingbase),然后执行如下命令挂载ISO镜像到/media/cdrom目录:

# mount -t iso9660 -o loop /home/kingbase/uniontechos-server-20-enterprise-1021-amd64.iso /media/cdrom

2.修改UOS系统/etc/apt/sources.list文件,添加本地apt源指向/media/cdrom目录:

# cat /etc/apt/sources.list
# Generated by deepin-installer
#deb https://enterprise-packages.chinauos.com/server-enterprise fou/sp2 main contrib non-free    #此行是默认启用的,无法连接互联网的环境需要注释。
#deb-src https://enterprise-packages.chinauos.com/server-enterprise fou/sp2 main contrib non-free    #此行默认是关闭的。
deb file:///media/cdrom stable main    #此行是新增的,其中“stable”将指向/media/cdrom/dists/stable/Release文件,该文件中的Components行记录了所有可用的仓库,ISO文件和安装光盘默认只包含了main。
#deb https://packages.chinauos.cn/uos eagle main non-free    #此行是UOS官方提供的在线的apt源,其仓库版本为eagle,可用的仓库为main和non-free,通过浏览器访问该链接可知其中还包含了其他仓库。

3.更新apt源索引。

由于光盘中没有提供仓库签名文件,在使用apt update命令更新索引时系统会认为该仓库不安全,默认将禁用该apt源,如下所示:

# apt-get update
Get:1 file:/media stable InRelease
Ign:1 file:/media stable InRelease
Get:2 file:/media stable Release [1,581 B]
Get:2 file:/media stable Release [1,581 B]
Get:3 file:/media stable Release.gpg
Ign:3 file:/media stable Release.gpg
Reading package lists... Done
E: The repository 'file:/media stable Release' is not signed.    #提示该apt源未正确签名
N: Updating from such a repository can't be done securely, and is therefore disabled by default.    #不能安全的更新索引,默认将禁用该apt源。
N: See apt-secure(8) manpage for repository creation and user configuration details.

因此,我们需要使用“–allow-insecure-repositories”参数来更新索引信息:

# apt update --allow-insecure-repositories
Get:1 file:/media stable InRelease
Ign:1 file:/media stable InRelease
Get:2 file:/media stable Release [1,581 B]
Get:2 file:/media stable Release [1,581 B]
Get:3 file:/media stable Release.gpg
Ign:3 file:/media stable Release.gpg
Get:4 file:/media stable/main amd64 Packages [673 kB]
Get:5 file:/media stable/main i386 Packages [183 kB]
Reading package lists... Done
Building dependency tree
Reading state information... Done
All packages are up to date.
W: The repository 'file:/media stable Release' is not signed.
N: Data from such a repository can't be authenticated and is therefore potentially dangerous to use.
N: See apt-secure(8) manpage for repository creation and user configuration details.

4.验证索引是否更新成功:

# which arping
# apt list iputils-arping
Listing... Done
iputils-arping/unknown 3:20180629-2+deb10u1 amd64

5.安装iputils-arping软件包:

“apt install -y”命令中-y参数默认会拒绝未认证的软件包,因此需要使用“–allow-unauthenticated”参数来安装,如下所示:

# apt install -y iputils-arping
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following NEW packages will be installed:iputils-arping
0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
Need to get 0 B/20.2 kB of archives.
After this operation, 52.2 kB of additional disk space will be used.
WARNING: The following packages cannot be authenticated!iputils-arping
E: There were unauthenticated packages and -y was used without --allow-unauthenticated    # -y参数拒绝从未认证的仓库安装软件包。

执行“apt install -y --allow-unauthenticated”命令安装iputils-arping软件包:

# apt install -y --allow-unauthenticated iputils-arping
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following NEW packages will be installed:iputils-arping
0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
Need to get 0 B/20.2 kB of archives.
After this operation, 52.2 kB of additional disk space will be used.
WARNING: The following packages cannot be authenticated!iputils-arping
Authentication warning overridden.
Get:1 file:/media/cdrom stable/main amd64 iputils-arping amd64 3:20180629-2+deb10u1 [20.2 kB]
Selecting previously unselected package iputils-arping.
(Reading database ... 70345 files and directories currently installed.)
Preparing to unpack .../iputils-arping_20180629-2+deb10u1_amd64.deb ...
Unpacking iputils-arping (3:20180629-2+deb10u1) ...
Setting up iputils-arping (3:20180629-2+deb10u1) ...
Processing triggers for man-db (2.8.5-2) ...

6.检查结果:

# arping -V
arping utility, iputils-s20180629

UOS利用系统安装光盘做本地apt源安装软件包相关推荐

  1. Uos统信系统 本地APT源配置

    Uos 本地APT源配置 提示:有任何问题可以私信我,下班看到第一时间回复 apt本地源 Uos 本地APT源配置 一.将光盘挂载到/mnt下面 二.配置本地源 编辑文件 更新源 三.测试 linux ...

  2. 将ubuntu光盘作为安装源_[转载]Ubuntu 以光盘做为软件源

    Ubuntu 10.04以光盘做为软件源 可以去官方下载种子和DVD光盘. 用DVD光盘作为源,安装软件 sudo mount ubuntu-10.04-dvd-amd64.iso /media/ap ...

  3. 一款利用普通手持对讲机做测向信号源的控制电路及程序

    一款利用普通手持对讲机做测向信号源的控制电路及程序 /********************************************************************* 程序名 ...

  4. Linux 使用本地yum源及软件包管理

    Linux 使用本地yum源及软件包管理 2016-12-18 10:09 by 宋跃杰, 5 阅读, 0 评论, 收藏, 编辑 [root@node130 rh]# pwd /opt/rh [roo ...

  5. ubuntu16.04系统制作本地apt源

    一.背景及概述 1.背景 1)最近在做的一个项目,linux环境是ubuntu16.04,需要把多个开源包打在一起形成一个安装包供其他人使用,这就面临一个问题,开源包依赖很多的linux依赖库,同时不 ...

  6. Linux7使用光盘作为本地repo源

    [1]上传centos7光盘镜像到指定目录下(这里定为/usr/local/src) [2]挂载镜像文件 mkdir /media/cdrom # 新建光盘目录: mount -t iso9660 - ...

  7. RHEL6.1配置光盘为本地yum源

    linux虽稳定,但也让其失去了一些东西,其中给初学Linux者最强烈的感受应该是其图形界面的管理不及windows的强大. 特别是在安装软件的时候时常会遇到依赖性问题.我们可以通过配置yum来帮我们 ...

  8. linux文件拷到光盘,制作本地yum源(以redhat5.8通过复制光盘文件到本地)

    为什么要制作本地yum源 1.RPM安装方式很多情况下不能有效解决复杂的包依赖关系. 2.而刚安装完成系统的YUM一般是通过联网使用. 3.如果是未注册的redhat5.0以上系统,则不能联网使用yu ...

  9. linux本地yum源与软件包管理,【Linux系统中的】本地yum源的搭建与使用yum源进行软件的下载...

    前言: 当我们在使用Linux系统时,有时需要一些辅助工具帮助我们实现某项功能, 例如画图.wps.等功能,而这些功能并不是系统自带的,需要我们下载相关的 软件,那如何去下载这些软件那,这里我们不得不 ...

最新文章

  1. 面向开发者的2018年AI趋势分析
  2. shardingjdbc全局表_Sharding-JDBC动态分表实现
  3. mac安装和卸载mysql_小白自学MySQL笔记(一):Mac环境的安装和启动
  4. 华为鸿蒙二代支持的手机,关于华为鸿蒙,国产厂商中只有2家表示支持
  5. linux screen 命令是 ssh 的有效补充
  6. 【七】jquery之属性attr、 removeAttr、prop[全选全不选及反选]
  7. 小括号教学设计导入_丁文丽《含有小括号的混合运算》教学设计
  8. import MySQLdb UserWarning
  9. GitHub 的替代品(国内版)
  10. python编程是啥-小学生都开始学的Python编程到底是什么?
  11. 市场经济中,大家都象防贼一样保留证据,以用于欠薪仲裁
  12. VCF vs Maf | 变异注释及整理为Maf格式
  13. 流量卡之家:5G手机价格没那么“邪性” 门槛降低一半
  14. 用CIL写程序:定义一个叫“慕容小匹夫”的类
  15. JS 下载文件方法分享(解决图片文件无法直接下载和 IE兼容问题)
  16. 文件管理-----操作系统
  17. 借助URLOS快速安装WordPress
  18. Masked Language Modeling用于光谱分类模型
  19. win10 ghost 安装
  20. Python邮箱提醒

热门文章

  1. 《剑侠情缘V5.0》网络单机版烽火诸侯私服搭建
  2. 天下霸图进度汇报20200329
  3. 运维企业实战Shell脚本合集+万能工具箱
  4. 武汉大学2007年数学分析试题解答
  5. Ultra Edit使用技巧
  6. 资源获取:自定义SuperSet CSS模板
  7. 缓冲(Buffer)
  8. 剃掉多余的_剔掉多余的阅读理解与答案
  9. Camtasia Studio2023喀秋莎免费实用的屏幕录像工具
  10. 简书android,简书 - 一个基于内容分享的社区 - Android 应用 - 【最美应用】