【教程】RakSmart-Linux系统vps更换源

前段时间双十一,买了RskSmart这家的的美西VPS,今天想起来,想装下宝塔的免费版WAF看看,奈何一直报错

【教程】RakSmart-Linux系统vps更换源

查看了DNS,没问题,那就直接换源喽,系统我用的Debian 10

1.备份源列表文件:首先,打开终端并以管理员身份运行以下命令,备份当前的源列表文件:

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

2.编辑源列表文件:使用文本编辑器(如nano或vim或vi)打开源列表文件:

sudo nano /etc/apt/sources.list

3.替换为国内源:将文件中的内容替换为适合您所在地区的国内源。以下是一些常用的国内源示例:

# Debian 10 buster
 
# 中科大源
 
deb http://mirrors.ustc.edu.cn/debian buster main contrib non-free
deb http://mirrors.ustc.edu.cn/debian buster-updates main contrib non-free
deb http://mirrors.ustc.edu.cn/debian buster-backports main contrib non-free
deb http://mirrors.ustc.edu.cn/debian-security/ buster/updates main contrib non-free
 
deb-src http://mirrors.ustc.edu.cn/debian buster main contrib non-free
deb-src http://mirrors.ustc.edu.cn/debian buster-updates main contrib non-free
deb-src http://mirrors.ustc.edu.cn/debian buster-backports main contrib non-free
deb-src http://mirrors.ustc.edu.cn/debian-security/ buster/updates main contrib non-free
 
# 官方源
 
deb http://deb.debian.org/debian buster main contrib non-free
deb http://deb.debian.org/debian buster-updates main contrib non-free
deb http://deb.debian.org/debian-security/ buster/updates main contrib non-free
 
deb-src http://deb.debian.org/debian buster main contrib non-free
deb-src http://deb.debian.org/debian buster-updates main contrib non-free
deb-src http://deb.debian.org/debian-security/ buster/updates main contrib non-free
 
# 网易源
 
deb http://mirrors.163.com/debian/ buster main non-free contrib
deb http://mirrors.163.com/debian/ buster-updates main non-free contrib
deb http://mirrors.163.com/debian/ buster-backports main non-free contrib
deb http://mirrors.163.com/debian-security/ buster/updates main non-free contrib
 
deb-src http://mirrors.163.com/debian/ buster main non-free contrib
deb-src http://mirrors.163.com/debian/ buster-updates main non-free contrib
deb-src http://mirrors.163.com/debian/ buster-backports main non-free contrib
deb-src http://mirrors.163.com/debian-security/ buster/updates main non-free contrib
 
# 阿里云
 
deb http://mirrors.aliyun.com/debian/ buster main non-free contrib
deb http://mirrors.aliyun.com/debian/ buster-updates main non-free contrib
deb http://mirrors.aliyun.com/debian/ buster-backports main non-free contrib
deb http://mirrors.aliyun.com/debian-security buster/updates main
 
deb-src http://mirrors.aliyun.com/debian/ buster main non-free contrib
deb-src http://mirrors.aliyun.com/debian/ buster-updates main non-free contrib
deb-src http://mirrors.aliyun.com/debian/ buster-backports main non-free contrib
deb-src http://mirrors.aliyun.com/debian-security buster/updates main

4.保存并关闭文件。然后,运行以下命令更新软件包缓存:

sudo apt update

现在,您的Debian系统已经更换为国内源。使用国内源可以加快软件包的下载速度,并提供更稳定的连接。请注意,根据您所在地区和具体需求,选择适合您的合适源。

原创文章,作者:陌涛,如若转载,请注明出处:https://imotao.com/7818.html

(0)
陌涛的头像陌涛
上一篇 2023年11月23日 上午11:54
下一篇 2023年11月23日 下午6:45

相关推荐

发表回复

您的电子邮箱地址不会被公开。 必填项已用*标注

此站点使用Akismet来减少垃圾评论。了解我们如何处理您的评论数据