linux
环境无法联网,却又需要下载安装相关软件,这就面临一个问题,开源包依赖很多的
linux
依赖库,
同时不能保证外部使用环境一定联网,稳妥的办法就是把所有依赖包都打到安装包中,此时便需要搭建
apt
本地源。
一、将光盘挂载到
/mnt
下面
root@Server04:~# mount /dev/sr0 /mnt/
mount: /mnt: WARNING: device write-protected, mounted read-only.
二、配置本地源
编辑文件
root@Server04:~# vim /etc/apt/sources.list
deb [trusted=yes] file:///mnt fou main
更新源
![](https://i-blog.csdnimg.cn/blog_migrate/1e4fcdf1266caba140cd23d75e1820d4.png)
三、测试
随便安装一个软件试试
root@Server04:~# apt-get install chrony -y