梓悦生活

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

Debian11更换阿里源或清华源

2024/01/10 2882点热度 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
取消回复

最新 热点 随机
最新 热点 随机
[教程]AWS免费EC2注册/使用/添加IPV6/SSH连接/删除实例 使用VestaCP搭建邮局(含DKIM,DMARC教程) [教程]利用宝塔面板邮局管理器搭建Roundcube Webmail自建邮局 [测评]喵云互联绍兴电信NAT套餐1测评 iperf3 网络性能测试 [收藏]13 个免费 PPT 模板网站汇总
[测评]喵云互联绍兴电信NAT套餐1测评[教程]利用宝塔面板邮局管理器搭建Roundcube Webmail自建邮局iperf3 网络性能测试使用VestaCP搭建邮局(含DKIM,DMARC教程)[教程]AWS免费EC2注册/使用/添加IPV6/SSH连接/删除实例
Flarum 轻量级论坛程序 alojamientogratis提供的1G/1G/PHP/Mysql/可绑米免费空间 Linux网络优化 香港两大超市集团停售蒙牛伊利奶制品 Debian源更新报错解决方法 2G/10G/PHP/MYSQL/DA/绑米/host1free免费
最近评论
b2b系统 发布于 1 年前(12月29日) 感谢分享
Meteor 发布于 2 年前(10月20日) 哈哈,友链一直都在,后来换了主题后忘记修改显示数量了,现在恢复好了。
弋牧 发布于 2 年前(10月12日) 这里已经看不到我的友连了吗?
彩鸽 发布于 2 年前(10月04日) 写的不错
B2B海外商城系统 发布于 2 年前(09月21日) 感谢分享
标签聚合
VPS 域名解析 技巧 活动 wordpress 虚拟主机 宝塔 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