准备文件:

debian-9.8.0-amd64-DVD-1.iso

debian-9.8.0-amd64-DVD-2.iso

debian-9.8.0-amd64-DVD-3.iso

  挂载:

  1. root@debian:~# mount -t iso9660 -o loop /debian/debian-9.8.0-amd64-DVD-1.iso /mnt/debian1
  2. mount: /dev/loop0 is write-protected, mounting read-only
  3. root@debian:~# mount -t iso9660 -o loop /debian/debian-9.8.0-amd64-DVD-2.iso /mnt/debian2
  4. mount: /dev/loop1 is write-protected, mounting read-only
  5. root@debian:~# mount -t iso9660 -o loop /debian/debian-9.8.0-amd64-DVD-3.iso /mnt/debian3
  6. mount: /dev/loop2 is write-protected, mounting read-only

  查看mount:

  1. /dev/sda1 on /home type ext4 (rw,relatime,data=ordered)
  2. tmpfs on /run/user/108 type tmpfs (rw,nosuid,nodev,relatime,size=405056k,mode=700,uid=108,gid=113)
  3. tmpfs on /run/user/0 type tmpfs (rw,nosuid,nodev,relatime,size=405056k,mode=700)
  4. /debian/debian-9.8.0-amd64-DVD-2.iso on /mnt/debian2 type iso9660 (ro,relatime)
  5. /debian/debian-9.8.0-amd64-DVD-3.iso on /mnt/debian3 type iso9660 (ro,relatime)
  6. /debian/debian-9.8.0-amd64-DVD-1.iso on /mnt/debian1 type iso9660 (ro,relatime)

  修改/etc/fstab:

[defaults 可以改为 user,loop]

  添加apt源:

#vim /etc/apt/sources.list

删除这个文件

  1. apt-cdrom -m -d=/mnt/debian1 add
  2.  
  3. apt-cdrom -m -d=/mnt/debian2 add
  4.  
  5. apt-cdrom -m -d=/mnt/debian3 add

  新增apt.conf

  1. Acquire::cdrom::mount "/mnt/debian1";
  2. Acquire::cdrom::mount "/mnt/debian2";
  3. Acquire::cdrom::mount "/mnt/debian3";
  4. APT::CDROM::NoMount;

目前只能安装第一张DVD中的包 如果在后两个磁盘(如lsscsi)会提示需要插入磁盘:

  1. root@debian:~# apt install lsscsi
  2. Reading package lists... Done
  3. Building dependency tree
  4. Reading state information... Done
  5. The following NEW packages will be installed:
  6. lsscsi
  7. upgraded, newly installed, to remove and not upgraded.
  8. Need to get B/35.6 kB of archives.
  9. After this operation, 89.1 kB of additional disk space will be used.
  10. Media change: please insert the disc labeled
  11. 'Debian GNU/Linux 9.8.0 _Stretch_ - Official amd64 DVD Binary-2 20190216-11:59'
  12. in the drive '/mnt/debian1/' and press [Enter]

[debian]use ISO as debian apt source / 使用ISO文件作为apt源的更多相关文章

  1. Debian 8 升级到 9 Debian 9 How to upgrade Debian 8 Jessie to Debian 9 Stretch

    How to upgrade Debian 8 Jessie to Debian 9 Stretch Contents 1. Objective 2. What's New 3. Preparatio ...

  2. pip apt source images

    ~/.pip/pip.conf [global] index-url = https://pypi.douban.com/simple download_cache = ~/.cache/pip [i ...

  3. 在centos中搭建基于nginx的apt源服务器,整合yum源和apt源在一台服务器

    1.首先关闭防护墙或者设置规则通过且关闭selinux 2.nginx-1.14.2版本(编译安装)-自定义安装路径 3.开启nginx目录浏览 以上步骤请参考前文:https://www.cnblo ...

  4. linux常用命令大全2--挂载/dpkg/文件系统分析/apt/光盘/关机

    挂载一个文件系统 mount /dev/hda2 /mnt/hda2 挂载一个叫做hda2的盘 - 确定目录 '/ mnt/hda2' 已经存在 umount /dev/hda2 卸载一个叫做hda2 ...

  5. 参考 https://raspberrypi.stackexchange.com/questions/3617/how-to-install-unrar-nonfree > 1.卸载unrar-free。 $ sudo apt-get remove unrar-free \ 2.通过编辑确保您拥有源存储库/etc/apt/sources.list。 $ cat /etc/apt/sources.

    from my CSDN: https://blog.csdn.net/su_cicada/article/details/86939944 参考 https://raspberrypi.stacke ...

  6. mysql source命令超大文件导入方法总结

    本文章来给各位朋友介绍利用mysql source命令超大文件导入方法总结,下面收集了两种解决办法,一种是把数据库分文件导出然后再导入,另一种是修改my.ini配置文件,下面我一一给各位朋友介绍. 导 ...

  7. RHEL7下用本地光盘或镜像iso文件做yum源

    应用场境:Redhat 系统想要直接在线通过yum的条件时需要注册,一般用户都是非注册的,这个时候如果要想通过yum安装新软件,我们可以通过将安装盘或者镜像iso文件设置为yum源的方式来进行. 测试 ...

  8. 3.3. Mapping methods with several source parameters(具有多个源参数的映射方法)

    3.3. Mapping methods with several source parameters(具有多个源参数的映射方法) MapStruct 还支持具有多个源参数的映射方法.这是比较实用的, ...

  9. kali linux /etc/apt/source.list

    this list is very important , you can not download what you want like fictx , flash-plugin , vm-tool ...

随机推荐

  1. Spring Boot 2.X 如何添加拦截器?

    最近使用SpringBoot2.X搭建了一个项目,大部分接口都需要做登录校验,所以打算使用注解+拦截器来实现,在此记录下实现过程. 一.实现原理 1. 自定义一个注解@NeedLogin,如果接口需要 ...

  2. DataTable克隆行

    DataRow Adr = ds.Tables[].NewRow(); Adr.ItemArray = (].Rows[].ItemArray.Clone(); ds.Tables[].Rows.Ad ...

  3. Java基础小知识笔记

    1. Integer转进制的一个类2. toBinaryString,toOctalString,toHexString.(转为二进制,八进制,十六进制的方法)3. 如果·数据的大小没有超过byte/ ...

  4. Jetty 开发指南: 嵌入式开发之HelloWorld

    Jetty 嵌入式之 HelloWorld 本节提供一个教程,演示如何快速开发针对Jetty API的嵌入式代码. 1. 下载 Jar 包 Jetty被分解为许多jar和依赖项,通过选择最小的jar集 ...

  5. Where Can I Download Full Installers for WebLogic Server

    Where can I download full installers for the different versions of WebLogic Server (WLS)? Full insta ...

  6. mapfile中关于栅格数据的processing项说明

    mapfile是MapServer中地图的配置文件,规定了地图的源数据.投影.样式等一系列信息.用MapServer发布影像地图,需要用以下processing项设置地图的风格样式. BANDS=re ...

  7. Android为TV端助力 Linux命令查看包名类名

    先运行apk 再输入logcat | grep START 查看当前启动apk的包名和类名 adb shell "pm list packages -f | grep com.yulong. ...

  8. SQL SERVER 排查脚本

    随着数据量和并发量的增大,数据库有时会遇到CPU,内存,IO  性能问题:整理了一下有关排查数据相关的SQL脚本,以便排查问题之用: 1,哪些SQL 消耗CPU /* 查看哪些SQL语句消耗CPU,找 ...

  9. Carthage入门篇-安装和使用

    在iOS开发过程中,用到最多的三方库管理工具也许是Cocoapods.Cocoapods会自动为你创建一个workspace,然后自动将你要用到的三方库集成到Project中,而整个过程,你只需要对P ...

  10. BERT模型在多类别文本分类时的precision, recall, f1值的计算

    BERT预训练模型在诸多NLP任务中都取得最优的结果.在处理文本分类问题时,即可以直接用BERT模型作为文本分类的模型,也可以将BERT模型的最后层输出的结果作为word embedding导入到我们 ...