梓悦生活

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

Debian11更换阿里源或清华源

2024/01/10 5662点热度 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方法
CentOS 6升级glibc库至2.15版本办法 7m2.net提供免费250M/plesk面板免费全能空间 利用.htaccess拒绝spam机器人评论 Sitemix.jp稳定1.5GB容量免费php空间可绑域名注册使用方法教程 TurnkeyInternet 首月免费KVM VPS Dns.la-类似dnspod的免费智能dns解析服务
最近评论
过客 发布于 11 个月前(11月20日) SSL证书掉了
b2b系统 发布于 3 年前(12月29日) 感谢分享
Meteor 发布于 3 年前(10月20日) 哈哈,友链一直都在,后来换了主题后忘记修改显示数量了,现在恢复好了。
弋牧 发布于 3 年前(10月12日) 这里已经看不到我的友连了吗?
彩鸽 发布于 3 年前(10月04日) 写的不错
标签聚合
wordpress 域名解析 活动 Linux技巧 技巧 VPS 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