梓悦生活

  • 🍟首页
  • 🍪免费资源
  • 🍓Wordpress
  • 🍋琐碎生活
  • 🍘关于
关注周围的人或事,体验人生历程
  1. 首页
  2. 琐碎生活
  3. 正文

Debian11更换阿里源或清华源

2024/01/10 5510点热度 0人点赞 0条评论

1. 打开终端,输入以下命令以备份原来的 sources.list 文件:

 
sudo cp /etc/apt/sources.list /etc/apt/sources.list.bak 

 

2. 编辑 sources.list 文件:

 
sudo nano /etc/apt/sources.list 

 

3. 将原来的内容全部删除,然后将以下内容复制到文件中:

#国内阿里源

deb http://mirrors.aliyun.com/debian/ bullseye main non-free contrib 
deb-src http://mirrors.aliyun.com/debian/ bullseye main non-free contrib 
 
deb http://mirrors.aliyun.com/debian-security bullseye-security main non-free contrib 
deb-src http://mirrors.aliyun.com/debian-security bullseye-security main non-free contrib 
 
deb http://mirrors.aliyun.com/debian/ bullseye-updates main non-free contrib 
deb-src http://mirrors.aliyun.com/debian/ bullseye-updates main non-free contrib 
 
deb http://mirrors.aliyun.com/debian/ bullseye-backports main non-free contrib 
deb-src http://mirrors.aliyun.com/debian/ bullseye-backports main non-free contrib 

 

#国内清华源

# 默认注释了源码镜像以提高 apt update 速度,如有需要可自行取消注释
deb https://mirrors.tuna.tsinghua.edu.cn/debian/ bullseye main contrib non-free
deb-src https://mirrors.tuna.tsinghua.edu.cn/debian/ bullseye main contrib non-free

deb https://mirrors.tuna.tsinghua.edu.cn/debian/ bullseye-updates main contrib non-free
deb-src https://mirrors.tuna.tsinghua.edu.cn/debian/ bullseye-updates main contrib non-free

deb https://mirrors.tuna.tsinghua.edu.cn/debian/ bullseye-backports main contrib non-free
deb-src https://mirrors.tuna.tsinghua.edu.cn/debian/ bullseye-backports main contrib non-free

# 以下安全更新软件源包含了官方源与镜像站配置,如有需要可自行修改注释切换
deb https://mirrors.tuna.tsinghua.edu.cn/debian-security bullseye-security main contrib non-free
deb-src https://mirrors.tuna.tsinghua.edu.cn/debian-security bullseye-security main contrib non-free

4. 保存并退出编辑器,然后更新软件包列表:

sudo apt update 

 

5. 安装软件包:

 
sudo apt upgrade 

 

6. 安装完成后,您的 Debian 11 系统将使用阿里云镜像源。

7.使用IPv6代理访问Github,运行如下代码:

cat >> /etc/hosts << EOF
# https://danwin1210.de/github-ipv6-proxy.php
2a01:4f8:c010:d56::2 github.com
2a01:4f8:c010:d56::3 api.github.com
2a01:4f8:c010:d56::4 codeload.github.com
2a01:4f8:c010:d56::5 objects.githubusercontent.com
2a01:4f8:c010:d56::6 ghcr.io
2a01:4f8:c010:d56::7 pkg.github.com npm.pkg.github.com maven.pkg.github.com nuget.pkg.github.com rubygems.pkg.github.com
EOF

 

文章转载自:https://www.itxm.cn/post/ijade1a9.html

标签: Debian 阿里源
最后更新:2024/11/14

Meteor

关注周围的人或事,体验人生历程!

点赞
< 上一篇
下一篇 >

文章评论

razz evil exclaim smile redface biggrin eek confused idea lol mad twisted rolleyes wink cool arrow neutral cry mrgreen drooling persevering
取消回复

最新 热点 随机
最新 热点 随机
哪吒探针V0版本控制面板的安装和windows安装V0.20.5的agent方法 Realm转发脚本:一键安装、规则启停、定时备份、FTP/SFTP 备份、Web面板 Realm 一键转发脚本 [测评]喵云绍兴BGP-NAT云主机测评 docker容器部分命令收藏 BillionMail:一个开源的邮件服务器
docker容器部分命令收藏[测评]喵云绍兴BGP-NAT云主机测评Realm 一键转发脚本Realm转发脚本:一键安装、规则启停、定时备份、FTP/SFTP 备份、Web面板哪吒探针V0版本控制面板的安装和windows安装V0.20.5的agent方法
抓取Bing每天资讯 利用Fikker自建CDN 给网站提供自定义加速节点 WordPress友情链接页面调用方法 Centos&Kangle全套一键安装脚本 Snapphq免费ASP.NET空间申请使用-支持MS SQL和FTP可绑域名 [补货]Anynode:洛杉矶KVM/CN2线路/年付15美元起
最近评论
过客 发布于 10 个月前(11月20日) SSL证书掉了
b2b系统 发布于 3 年前(12月29日) 感谢分享
Meteor 发布于 3 年前(10月20日) 哈哈,友链一直都在,后来换了主题后忘记修改显示数量了,现在恢复好了。
弋牧 发布于 3 年前(10月12日) 这里已经看不到我的友连了吗?
彩鸽 发布于 3 年前(10月04日) 写的不错
标签聚合
域名解析 wordpress VPS 技巧 Linux技巧 Linux 虚拟主机 活动
友情链接
  • Anders Norén
  • Appurse
  • CSS参考手册
  • DeeTeam-迪提姆
  • Fatesinger
  • FreeSSL
  • gandi
  • Internetbs
  • LogoMaker
  • Meteor's Blog
  • PM唐杰
  • SSL For Free
  • WPEX-Themes
  • 优品PPT
  • 免费顶级域名
  • 博客大全
  • 印记
  • 弋牧
  • 挖站否
  • 闫宝龙博客

COPYRIGHT © 2023 梓悦生活. ALL RIGHTS RESERVED.

Theme Kratos Made By Seaton Jiang