debian9.4配置iso作为更新源
作者:互联网
debian9.4配置iso作为更新源
本机信息
root@fort:~# uname -a
Linux fort 4.9.0-6-amd64 #1 SMP Debian 4.9.82-1+deb9u3 (2018-03-02) x86_64 GNU/Linux
root@fort:~# cat /etc/os-release
PRETTY_NAME="Debian GNU/Linux 9 (stretch)"
NAME="Debian GNU/Linux"
VERSION_ID="9"
VERSION="9 (stretch)"
ID=debian
HOME_URL="https://www.debian.org/"
SUPPORT_URL="https://www.debian.org/support"
BUG_REPORT_URL="https://bugs.debian.org/"
配置
先上传iso文件上去,然后挂载。
mount ./debian-9.4.0-amd64-DVD-1.iso /media/cdrom
注释掉原来配置内容。
vi /etc/apt/sources.list (将原有内容注释,前加#)
以下是我注释掉之后的内容:
root@fort:~# cat /etc/apt/sources.list
#
# deb cdrom:[Debian GNU/Linux 9.4.0 _Stretch_ - Official amd64 DVD Binary-1 20180310-11:21]/ stretch contrib main
#deb cdrom:[Debian GNU/Linux 9.4.0 _Stretch_ - Official amd64 DVD Binary-1 20180310-11:21]/ stretch contrib main
#deb http://security.debian.org/debian-security stretch/updates main contrib
#deb-src http://security.debian.org/debian-security stretch/updates main contrib
# stretch-updates, previously known as 'volatile'
# A network mirror was not selected during install. The following entries
# are provided as examples, but you should amend them as appropriate
# for your mirror of choice.
#
# deb http://deb.debian.org/debian/ stretch-updates main contrib
# deb-src http://deb.debian.org/debian/ stretch-updates main contrib
命令更新本地源
apt-cdrom -m -d /media/cdrom/ add
检查挂载情况
root@fort:~# df -TH
Filesystem Type Size Used Avail Use% Mounted on
udev devtmpfs 4.2G 0 4.2G 0% /dev
tmpfs tmpfs 838M 18M 821M 3% /run
/dev/vda1 ext4 101G 8.1G 88G 9% /
tmpfs tmpfs 4.2G 0 4.2G 0% /dev/shm
tmpfs tmpfs 5.3M 0 5.3M 0% /run/lock
tmpfs tmpfs 4.2G 0 4.2G 0% /sys/fs/cgroup
tmpfs tmpfs 838M 0 838M 0% /run/user/0
**/dev/loop0 iso9660 4.0G 4.0G 0 100% /media/cdrom0**
安装或更新你需要的软件
root@fort:~# apt-get install vim
标签:main,stretch,更新,iso,org,deb,tmpfs,debian,debian9.4 来源: https://blog.csdn.net/u014701663/article/details/120227031