梓悦生活

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

Debian11更换阿里源或清华源

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

最新 热点 随机
最新 热点 随机
Realm 一键转发脚本 [测评]喵云绍兴BGP-NAT云主机测评 docker容器部分命令收藏 BillionMail:一个开源的邮件服务器 哆啦A梦免费转发面板 [教程]AWS免费EC2注册/使用/添加IPV6/SSH连接/删除实例
docker容器部分命令收藏哆啦A梦免费转发面板BillionMail:一个开源的邮件服务器[测评]喵云绍兴BGP-NAT云主机测评Realm 一键转发脚本
Wkhost免费提供美国1G无线流量可绑米空间 [补货]搬瓦工:洛杉矶CN2 GIA限量/年付46.9美元 Debian 系统配置 IPv6 网络 安装宝塔面板5.9.1,并手动修改到专业版 德国hostingsociety提供的无限容量+流量可绑米免费php空间 Inavit免费PHP和Asp.net空间数据库MSSQL 2008和MysqL空间250MB
最近评论
过客 发布于 8 个月前(11月20日) SSL证书掉了
b2b系统 发布于 3 年前(12月29日) 感谢分享
Meteor 发布于 3 年前(10月20日) 哈哈,友链一直都在,后来换了主题后忘记修改显示数量了,现在恢复好了。
弋牧 发布于 3 年前(10月12日) 这里已经看不到我的友连了吗?
彩鸽 发布于 3 年前(10月04日) 写的不错
标签聚合
wordpress Linux技巧 宝塔 虚拟主机 VPS 域名解析 技巧 活动
友情链接
  • 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