当前位置:首页 > VPS教程 > 正文内容

手动更换linux软件源

23vps2年前 (2022-06-13)VPS教程443

Centos换源命令

查看Centos系统版本

阿里云限量代金券 | 此广告位出租25元/月
cat /etc/system-release

备份Centos系统源

mv /etc/yum.repos.d/CentOS-Base.repo  /etc/yum.repos.d/CentOS-Base.repo.backup

Centos7-阿里云源

wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo

Centos7-网易源

wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.163.com/.help/CentOS7-Base-163.repo

Centos运行以下命令生成缓存

yum clean all
yum makecache


Debian和Ubuntu换源命令

查看Debian和Ubuntu系统版本

cat /etc/issue
lsb_release -a

备份Debian或Ubuntu系统源

mv /etc/apt/sources.list /etc/apt/sources.list.backup

Debian-阿里云源

cat > /etc/apt/sources.list<<-EOF
deb https://mirrors.aliyun.com/debian/ bullseye main non-free contrib
deb-src https://mirrors.aliyun.com/debian/ bullseye main non-free contrib
deb https://mirrors.aliyun.com/debian-security/ bullseye-security main
deb-src https://mirrors.aliyun.com/debian-security/ bullseye-security main
deb https://mirrors.aliyun.com/debian/ bullseye-updates main non-free contrib
deb-src https://mirrors.aliyun.com/debian/ bullseye-updates main non-free contrib
deb https://mirrors.aliyun.com/debian/ bullseye-backports main non-free contrib
deb-src https://mirrors.aliyun.com/debian/ bullseye-backports main non-free contrib
EOF

Ubuntu-阿里云源

Ubuntu_18.04

cat > /etc/apt/sources.list<<-EOF
deb http://mirrors.aliyun.com/ubuntu/ bionic main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ bionic-security main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ bionic-updates main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ bionic-proposed main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ bionic-backports main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ bionic main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ bionic-security main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ bionic-updates main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ bionic-proposed main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ bionic-backports main restricted universe multiverse
EOF

Debian或Ubuntu运行以下命令生成缓存

apt-get update && apt-get upgrade -y


本网站由提供服务

扫描二维码推送至手机访问。

版权声明:本文由主机测评网发布,如需转载请注明出处。

本文链接:https://23vps.com/post/22.html

分享给朋友:

“手动更换linux软件源” 的相关文章

linux vps回程路由检测脚本

linux vps回程路由检测脚本

不知道自己的vps回程网络怎么看可以用这个脚本:curl https://raw.githubusercontent.com/zhucaidan/mtr_trace/main/mtr_trace.sh|bash项目地址:https://github.com/zhucaidan/mtr_tr...

linux vps端口转发一键脚本

linux vps端口转发一键脚本

什么是端口转发?为什么要转发?准确来讲叫流量转发,因为流量是基于端口的,所以一般称为端口转发。比如电信到伯力很差,我买了个上海联通鸡做转发,那么就是电信->联通:1200->伯力:4900,那么我访问联通的1200端口,等于访问伯力的4900端口转发还可以用于公网frp,反代网站等用途用...

微软开发的手机远程桌面工具:RD Client

简介Microsoft Remote Desktop是微软官方发布的RDP远程桌面控制工具,方便在手机上控制电脑或服务器。有了这款神器,就可以在手机上控制windows vps服务器了!RD Client安卓客户端下载地址:https://m.pc6.com/mipd/103772.html或者可以...

苹果手机ssh工具

苹果手机ssh工具

苹果手机上的ssh工具:Terminal & SSH可以去App Store搜索下载...

测试linux vps国内三网速度

测试linux vps国内三网速度

一键测试你的vps小鸡到国内三网运行商的速度,支持三网测速及电信 联通 移动单独测试速度。项目地址:https://github.com/coolaj/sh脚本地址:bash <(curl -Lso- https://raw.githubusercontent.c...

linux vps连接工具putty

linux vps连接工具putty

putty 简介简单的说 putty 是一个开源程序,用来连接服务器。最早的时候,仅仅在window系统上可以使用,后来在其他的系统上也可以运行,比如 类unix, mac 。putty 不仅仅是一个软件而是一个软件集(文章最后会列出这个软件集),其中最常用的是 putty ,用来连接 linxu...