搭建阿里云仓库http方式外网环境

国外云仓库比较慢,可以使用阿里云仓库代替

[root@localhost ~]# cd /etc/yum.repos.d/
[root@localhost yum.repos.d]# mkdir blak
[root@localhost yum.repos.d]# mv *.repo blak/
[root@localhost yum.repos.d]# ls
bak

image-20230809170400228

[root@localhost yum.repos.d]# vim aliyun.repo
新建仓库

image-20230809170955523

 

一些源

[ali]
name=aliyun
#baseurl=https://mirrors.aliyun.com/centos/7/os/x86_64/                 //开启哪个都可以正常使用,这边主要解释变量的作用
baseurl=https://mirrors.aliyun.com/centos/$releasever/os/$basearch/   //变量参见主配置文件2.1小节
gpgcheck=0

[epel]                                                               //epel源仓库
name=epel
baseurl=https://mirrors.aliyun.com/centos/7/extras/x86_64/
gpgcheck=0

[update]                                                             //更新包仓库
name=update
baseurl=https://mirrors.aliyun.com/centos/7/updates/x86_64/
gpgcheck=0