debian 9 更換源 使用國內源 配置方法


配置前請先參考:

https://wiki.debian.org/SourcesList
https://www.debian.org/mirror/list
https://mirrors.tuna.tsinghua.edu.cn/help/debian/
http://mirrors.ustc.edu.cn/help/debian.html

官方鏡像地址:

ftp.cn.debian.org   #中科大
ftp2.cn.debian.org  #清華
nano /etc/apt/sources.list

deb http://ftp.cn.debian.org/debian stretch main
deb http://ftp.cn.debian.org/debian-security stretch/updates main
deb http://ftp.cn.debian.org/debian stretch-updates main

使用https地址,可以有效避免國內運營商的緩存劫持
以清華大學地址為例:

apt install apt-transport-https
nano /etc/apt/sources.list

deb https://mirrors.tuna.tsinghua.edu.cn/debian stretch main contrib non-free
deb https://mirrors.tuna.tsinghua.edu.cn/debian stretch-updates main contrib non-free
deb https://mirrors.tuna.tsinghua.edu.cn/debian-security stretch/updates main contrib non-free
#backports請按需使用
#deb https://mirrors.tuna.tsinghua.edu.cn/debian stretch-backports main contrib non-free 
#buster請按需使用
#deb https://mirrors.tuna.tsinghua.edu.cn/debian buster main

https://backports.debian.org

使用backports安裝應用:

apt -t stretch-backports install ...

https://wiki.debian.org/DebianBuster

buster是debian 10的版本代號,配置buster源可以安裝某些應用的最新版本,例如nano


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM