VPS usage tutorial: CentOS/Ubuntu/Debian dependency source configuration tutorial

888u

Last update at :2024-01-25,Edit by888u

This article only takes the configuration of Alibaba Cloud source as an example. If you need to configure other sources, you can replace the address with other sources, such as Tsinghua University: mirrors.tuna.tsinghua.edu.cn

1. CentOS 7 yum source

rm -rf /etc/yum.repos.d/*.repo #Delete the repo file, or back it up yourself curl -o /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo curl -o /etc/yum.repos.d/epel.repo http://mirrors.aliyun.com/repo/epel-7.repo yum makecache #Update cache

2. CentOS 6 yum source

rm -rf /etc/yum.repos.d/*.repo #Delete the repo file, or back it up yourself curl -o /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-6.repo curl -o /etc/yum.repos.d/epel.repo http://mirrors.aliyun.com/repo/epel-6.repo yum makecache #Update cache

3. Ubuntu 18 apt source

mv /etc/apt/sources.list{,bak} #Backup sources.list cat > /etc/apt/sources.list << EOF deb http://mirrors.aliyun.com/ubuntu/ bionic main restricted universe multiverse deb-src http://mirrors.aliyun.com/ubuntu/ bionic main restricted universe multiverse deb http://mirrors.aliyun.com/ubuntu/ bionic-security main restricted universe multiverse deb-src http://mirrors.aliyun.com/ubuntu/ bionic-security main restricted universe multiverse deb http://mirrors.aliyun.com/ubuntu/ bionic-updates main restricted universe multiverse deb-src http://mirrors.aliyun.com/ubuntu/ bionic-updates main restricted universe multiverse deb http://mirrors.aliyun.com/ubuntu/ bionic-proposed main restricted universe multiverse deb-src 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-backports main restricted universe multiverse EOF apt update

4. Ubuntu 16 apt source

mv /etc/apt/sources.list{,bak} #Backup sources.list cat > /etc/apt/sources.list << EOF deb http://mirrors.aliyun.com/ubuntu/ xenial main deb-src http://mirrors.aliyun.com/ubuntu/ xenial main deb http://mirrors.aliyun.com/ubuntu/ xenial-updates main deb-src http://mirrors.aliyun.com/ubuntu/ xenial-updates main deb http://mirrors.aliyun.com/ubuntu/ xenial universe deb-src http://mirrors.aliyun.com/ubuntu/ xenial universe deb http://mirrors.aliyun.com/ubuntu/ xenial-updates universe deb-src http://mirrors.aliyun.com/ubuntu/ xenial-updates universe deb http://mirrors.aliyun.com/ubuntu/ xenial-security main deb-src http://mirrors.aliyun.com/ubuntu/ xenial-security main deb http://mirrors.aliyun.com/ubuntu/ xenial-security universe deb-src http://mirrors.aliyun.com/ubuntu/ xenial-security universe EOF apt update

5. Debian 9 apt source

mv /etc/apt/sources.list{,bak} #Backup sources.list cat > /etc/apt/sources.list << EOF deb http://mirrors.aliyun.com/debian/ stretch main non-free contrib deb-src http://mirrors.aliyun.com/debian/ stretch main non-free contrib deb http://mirrors.aliyun.com/debian-security stretch/updates main deb-src http://mirrors.aliyun.com/debian-security stretch/updates main deb http://mirrors.aliyun.com/debian/ stretch-updates main non-free contrib deb-src http://mirrors.aliyun.com/debian/ stretch-updates main non-free contrib deb http://mirrors.aliyun.com/debian/ stretch-backports main non-free contrib deb-src http://mirrors.aliyun.com/debian/ stretch-backports main non-free contrib EOF apt update

6. Debian 8 apt source

mv /etc/apt/sources.list{,bak} #Backup sources.list cat > /etc/apt/sources.list << EOF deb http://mirrors.aliyun.com/debian/ jessie main non-free contrib deb http://mirrors.aliyun.com/debian/ jessie-proposed-updates main non-free contrib deb-src http://mirrors.aliyun.com/debian/ jessie main non-free contrib deb-src http://mirrors.aliyun.com/debian/ jessie-proposed-updates main non-free contrib EOF apt update

Recommended site search: US vps host, foreign server, Hong Kong server hosting, filing query, free asp.net space, the role of the domain name server registered by the Ministry of Industry and Information Technology website vps host, website virtual host, ip reverse check,

VPS usage tutorial: CentOS/Ubuntu/Debian dependency source configuration tutorial

All copyrights belong to 888u unless special state
取消
微信二维码
微信二维码
支付宝二维码