[debian]use ISO as debian apt source / 使用ISO文件作为apt源
准备文件:
debian-9.8.0-amd64-DVD-1.iso
debian-9.8.0-amd64-DVD-2.iso
debian-9.8.0-amd64-DVD-3.iso
挂载:
root@debian:~# mount -t iso9660 -o loop /debian/debian-9.8.0-amd64-DVD-1.iso /mnt/debian1
mount: /dev/loop0 is write-protected, mounting read-only
root@debian:~# mount -t iso9660 -o loop /debian/debian-9.8.0-amd64-DVD-2.iso /mnt/debian2
mount: /dev/loop1 is write-protected, mounting read-only
root@debian:~# mount -t iso9660 -o loop /debian/debian-9.8.0-amd64-DVD-3.iso /mnt/debian3
mount: /dev/loop2 is write-protected, mounting read-only
查看mount:
/dev/sda1 on /home type ext4 (rw,relatime,data=ordered)
tmpfs on /run/user/108 type tmpfs (rw,nosuid,nodev,relatime,size=405056k,mode=700,uid=108,gid=113)
tmpfs on /run/user/0 type tmpfs (rw,nosuid,nodev,relatime,size=405056k,mode=700)
/debian/debian-9.8.0-amd64-DVD-2.iso on /mnt/debian2 type iso9660 (ro,relatime)
/debian/debian-9.8.0-amd64-DVD-3.iso on /mnt/debian3 type iso9660 (ro,relatime)
/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
删除这个文件
apt-cdrom -m -d=/mnt/debian1 add apt-cdrom -m -d=/mnt/debian2 add apt-cdrom -m -d=/mnt/debian3 add
新增apt.conf
Acquire::cdrom::mount "/mnt/debian1";
Acquire::cdrom::mount "/mnt/debian2";
Acquire::cdrom::mount "/mnt/debian3";
APT::CDROM::NoMount;
目前只能安装第一张DVD中的包 如果在后两个磁盘(如lsscsi)会提示需要插入磁盘:
root@debian:~# apt install lsscsi
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following NEW packages will be installed:
lsscsi
upgraded, newly installed, to remove and not upgraded.
Need to get B/35.6 kB of archives.
After this operation, 89.1 kB of additional disk space will be used.
Media change: please insert the disc labeled
'Debian GNU/Linux 9.8.0 _Stretch_ - Official amd64 DVD Binary-2 20190216-11:59'
in the drive '/mnt/debian1/' and press [Enter]
[debian]use ISO as debian apt source / 使用ISO文件作为apt源的更多相关文章
- 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 ...
- pip apt source images
~/.pip/pip.conf [global] index-url = https://pypi.douban.com/simple download_cache = ~/.cache/pip [i ...
- 在centos中搭建基于nginx的apt源服务器,整合yum源和apt源在一台服务器
1.首先关闭防护墙或者设置规则通过且关闭selinux 2.nginx-1.14.2版本(编译安装)-自定义安装路径 3.开启nginx目录浏览 以上步骤请参考前文:https://www.cnblo ...
- linux常用命令大全2--挂载/dpkg/文件系统分析/apt/光盘/关机
挂载一个文件系统 mount /dev/hda2 /mnt/hda2 挂载一个叫做hda2的盘 - 确定目录 '/ mnt/hda2' 已经存在 umount /dev/hda2 卸载一个叫做hda2 ...
- 参考 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 ...
- mysql source命令超大文件导入方法总结
本文章来给各位朋友介绍利用mysql source命令超大文件导入方法总结,下面收集了两种解决办法,一种是把数据库分文件导出然后再导入,另一种是修改my.ini配置文件,下面我一一给各位朋友介绍. 导 ...
- RHEL7下用本地光盘或镜像iso文件做yum源
应用场境:Redhat 系统想要直接在线通过yum的条件时需要注册,一般用户都是非注册的,这个时候如果要想通过yum安装新软件,我们可以通过将安装盘或者镜像iso文件设置为yum源的方式来进行. 测试 ...
- 3.3. Mapping methods with several source parameters(具有多个源参数的映射方法)
3.3. Mapping methods with several source parameters(具有多个源参数的映射方法) MapStruct 还支持具有多个源参数的映射方法.这是比较实用的, ...
- kali linux /etc/apt/source.list
this list is very important , you can not download what you want like fictx , flash-plugin , vm-tool ...
随机推荐
- spring boot拦截器中获取request post请求中的参数
最近有一个需要从拦截器中获取post请求的参数的需求,这里记录一下处理过程中出现的问题. 首先想到的就是request.getParameter(String )方法,但是这个方法只能在get请求中取 ...
- 重写Ext中的typeOf函数
重写Ext中的typeOf函数来解决Ext JS中typeOf对字符串对象.元素节点.文本节点.空白文本节点判断并不准确的问题 重写的typeOf函数使用自己实现的TypeOf函数2中的代码 测试代码 ...
- 解决将Excel表导入到SQL Server数据库时出现Text was truncated or one or more characters had no match in the target code错误
编写python爬虫程序可以在电商.旅游等网站上爬取相关评论数据,这些数据可以用于词云制作.感情词分析.提取关键词等,也可以将爬取下来的数据以自己的方式进行展示.评论数据爬取下来后,就要考虑怎样入库, ...
- iOS----------Bad Gateway
今天项目因为元数据被拒,再次提交去编辑APP时,发现进不了我的APP界面,出现了如下情况,大概有10多分钟 ,一直进不去 ,公司网络一直不稳定,于是打开了我的VPN,然后就可以了.
- 【工作分解法】IT人,你的工作“轻松”么?
一.前言 假如读者是一个老板,下面有两位员工,工作难度一样,完成量一样,人品和责任心也一样.一位每天加班加点,废寝忘食的工作:而另外一位每天在座位上喝着咖啡,非常的轻松自如的工作.您会更器重哪一位? ...
- 经度和纬度在SQL中的数据类型
冬天太冷,等坐公司班车也很冷,就萌生了给班车做一个到站查询功能. 在某宝上买了汽车在线的GPS设备, 终生免费的服务的. 这里不得不提下这个设备的优点, 它提供API接口,还是免费的. 所以在班车上装 ...
- JSX有感
开发一个网页,我们要写视图部分HTML,也要写交互逻辑JS. 写JS时,不断翻看HTML,确保querySelector能取到期望的元素. 改HTML时,一个个排查JS文件,确保其没受影响. -- 类 ...
- 转://从一条巨慢SQL看基于Oracle的SQL优化
http://mp.weixin.qq.com/s/DkIPwbDKIjH2FMN13GkT4w 本次分享的内容是基于Oracle的SQL优化,以一条巨慢的SQL为例,从快速解读SQL执行计划.如何从 ...
- egg.js与mysql的结合使用,以及部署事项
最近使用egg.js写了一个小项目练手,主要用来封装接口以及代理接口.进入正题: egg搭建以及各项配置 可以详见官方文档:https://eggjs.org,这里简单描述一下: 1.直接使用脚手架快 ...
- 【css】一行或者多行文字垂直水平居中
1.方法一:使用css3弹性盒子(兼容IE10及以上浏览器,firefox,chrome,safari 5.1.7不支持) <!DOCTYPE html> <html> < ...