sed -i -e '/mirrors.cloud.aliyuncs.com/d' -e '/mirrors.aliyuncs.com/d' /etc/yum.repos.d/CentOS-Base.repo
EPEL (Extra Packages for Enterprise Linux) 由 Fedora Special Interest Group 为企业 Linux 创建、维护和管理的一个高质量附加包集合适用于但不仅限于 Red Hat Enterprise Linux (RHEL), CentOS, Scientific Linux (SL), Oracle Linux (OL)
#1.下载导入Kail的asc表示该文件是ASCII码形式的然后进行导入到gpg管理中 $wget -q -O - https://www.kali.org/archive-key.asc | gpg --import $gpg --keyserver hkp://keys.gnupg.net --recv-key 44C6513A8E4FB3D30875F758ED444FF07D8D0BF6 # ...and verify that the displayed fingerprint matches the one below $gpg --fingerprint 7D8D0BF6 pub rsa4096 2012-03-05 [SC] [expires: 2021-02-03] 44C6 513A 8E4F B3D3 0875 F758 ED44 4FF0 7D8D 0BF6 uid [ unknown] Kali Linux Repository <devel@kali.org> sub rsa4096 2012-03-05 [E] [expires: 2021-02-03]
#2.校验下载sha256sum和sha256sum。gpg您可以按如下方式验证签名: $gpg --verify SHA256SUMS.gpg SHA256SUMS gpg: Signature made Tue 13 Feb 2018 03:33:53 AM EST gpg: using RSA key 44C6513A8E4FB3D30875F758ED444FF07D8D0BF6 gpg: Good signature from "Kali Linux Repository <devel@kali.org>" [unknown] gpg: WARNING: This key is not certified with a trusted signature! gpg: There is no indication that the signature belongs to the owner. Primary key fingerprint: 44C6 513A 8E4F B3D3 0875 F758 ED44 4FF0 7D8D 0BF6
#aliyun deb https://mirrors.aliyun.com/kali kali-rolling main non-free contrib deb-src https://mirrors.aliyun.com/kali kali-rolling main non-free contrib
#华为 deb https://mirrors.huaweicloud.com/kali kali-rolling main non-free contrib deb-src https://mirrors.huaweicloud.com/kali kali-rolling main non-free contrib
#Tencent deb http://mirrors.tencentyun.com/ubuntu/ focal main restricted universe multiverse deb http://mirrors.tencentyun.com/ubuntu/ focal-security main restricted universe multiverse deb http://mirrors.tencentyun.com/ubuntu/ focal-updates main restricted universe multiverse deb-src http://mirrors.tencentyun.com/ubuntu/ focal main restricted universe multiverse deb-src http://mirrors.tencentyun.com/ubuntu/ focal-security main restricted universe multiverse deb-src http://mirrors.tencentyun.com/ubuntu/ focal-updates main restricted universe multiverse #deb http://mirrors.tencentyun.com/ubuntu/ focal-proposed main restricted universe multiverse #deb http://mirrors.tencentyun.com/ubuntu/ focal-backports main restricted universe multiverse #deb-src http://mirrors.tencentyun.com/ubuntu/ focal-proposed main restricted universe multiverse #deb-src http://mirrors.tencentyun.com/ubuntu/ focal-backports main restricted universe multiverse
#1、备份配置文件: cp -a /etc/apt/sources.list /etc/apt/sources.list.bak
#2、修改sources.list文件,将http://ftp.debian.org替换成https://mirrors.huaweicloud.com,同时也将http://security.debian.org替换成https://mirrors.huaweicloud.com,可以参考如下命令: sed -i "s@http://ftp.debian.org@https://mirrors.huaweicloud.com@g" /etc/apt/sources.list sed -i "s@http://security.debian.org@https://mirrors.huaweicloud.com@g" /etc/apt/sources.list
#debian 7.x (wheezy) 编辑/etc/apt/sources.list文件(需要使用sudo), 在文件最前面添加以下条目(操作前请做好相应备份) cat > /etc/apt/sources.lis <<END deb http://mirrors.aliyun.com/debian/ wheezy main non-free contrib deb http://mirrors.aliyun.com/debian/ wheezy-proposed-updates main non-free contrib deb-src http://mirrors.aliyun.com/debian/ wheezy main non-free contrib deb-src http://mirrors.aliyun.com/debian/ wheezy-proposed-updates main non-free contrib END
#debian 8.x (jessie) 编辑/etc/apt/sources.list文件(需要使用sudo), 在文件最前面添加以下条目(操作前请做好相应备份) 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
#debian 9.x (stretch) 编辑/etc/apt/sources.list文件(需要使用sudo), 在文件最前面添加以下条目(操作前请做好相应备份) 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
# Debian 10x Buster deb https://mirrors.huaweicloud.com/debian/ buster main contrib non-free deb https://mirrors.huaweicloud.com/debian/ buster-updates main contrib non-free deb https://mirrors.huaweicloud.com/debian/ buster-backports main contrib non-free deb https://mirrors.huaweicloud.com/debian-security/ buster/updates main contrib non-free deb-src https://mirrors.huaweicloud.com/debian/ buster main contrib non-free deb-src https://mirrors.huaweicloud.com/debian/ buster-updates main contrib non-free deb-src https://mirrors.huaweicloud.com/debian/ buster-backports main contrib non-free
# 一条命令搞定 sed -i -e "s#archive.ubuntu.com#mirrors.aliyun.com#g" -e "s#security.ubuntu.com#mirrors.aliyun.com#g" /etc/apt/sources.list
# Ubuntu 20.04 默认源 cat > /etc/apt/sources.list <<END deb http://archive.ubuntu.com/ubuntu/ focal main restricted universe multiverse deb-src http://archive.ubuntu.com/ubuntu/ focal main restricted universe multiverse
deb http://archive.ubuntu.com/ubuntu/ focal-updates main restricted universe multiverse deb-src http://archive.ubuntu.com/ubuntu/ focal-updates main restricted universe multiverse
deb http://archive.ubuntu.com/ubuntu/ focal-security main restricted universe multiverse deb-src http://archive.ubuntu.com/ubuntu/ focal-security main restricted universe multiverse
deb http://archive.ubuntu.com/ubuntu/ focal-backports main restricted universe multiverse deb-src http://archive.ubuntu.com/ubuntu/ focal-backports main restricted universe multiverse
deb http://archive.canonical.com/ubuntu focal partner deb-src http://archive.canonical.com/ubuntu focal partner END
cat > /etc/apt/sources.list <<END # 默认注释了源码镜像以提高 apt update 速度,如有需要可自行取消注释 deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ trusty main restricted universe multiverse # deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ trusty main restricted universe multiverse
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ trusty-updates main restricted universe multiverse # deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ trusty-updates main restricted universe multiverse
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ trusty-backports main restricted universe multiverse # deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ trusty-backports main restricted universe multiverse
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ trusty-security main restricted universe multiverse # deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ trusty-security main restricted universe multiverse
# 预发布软件源,不建议启用 # deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ trusty-proposed main restricted universe multiverse # deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ trusty-proposed main restricted universe multiverse END
cat > /etc/apt/sources.list <<END 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 END
#1、备份配置文件: cp -a /etc/apk/repositories /etc/apk/repositories.bak
#2、修改repositories文件,将http://dl-cdn.alpinelinux.org/替换成https://mirrors.huaweicloud.com/,可以参考如下命令: sed -i "s@http://dl-cdn.alpinelinux.org/@https://mirrors.huaweicloud.com/@g" /etc/apk/repositories
#1.备份/etc/pacman.d/mirrorlist cp -a /etc/pacman.d/mirrorlist /etc/pacman.d/mirrorlist.bak
#2.先注释掉里面的所有行,然后在文件的最顶端添加 Server = http://mirrors.aliyun.com/archlinux/$repo/os/$arch Server = https://mirrors.huaweicloud.com/archlinux/$repo/os/$arch
方式1.请访问本博主的B站【WeiyiGeek】首页关注UP主, 将自动随机获取解锁验证码。
Method 2.Please visit 【My Twitter】. There is an article verification code in the homepage.
方式3.扫一扫下方二维码,关注本站官方公众号
回复:验证码
将获取解锁(有效期7天)本站所有技术文章哟!