阿里云
官网:https://developer.aliyun.com/mirror/centos?spm=a2c6h.13651102.0.0.3e221b11OwiJRQ
具体步骤:
# 安装wget yum install wget -y # 备份 mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.backup # 下载新的 CentOS-Base.repo 到 /etc/yum.repos.d/ wget -O /etc/yum.repos.d/CentOS-Base.repo https://mirrors.aliyun.com/repo/Centos-7.repo # 运行 yum makecache 生成缓存 yum makecache
阿里云
官网:https://developer.aliyun.com/mirror/epel?spm=a2c6h.13651102.0.0.3e221b11OwiJRQ
具体步骤:
# 备份(如有配置其他epel源) mv /etc/yum.repos.d/epel.repo /etc/yum.repos.d/epel.repo.backup mv /etc/yum.repos.d/epel-testing.repo /etc/yum.repos.d/epel-testing.repo.backup # 下载新repo 到/etc/yum.repos.d/ wget -O /etc/yum.repos.d/epel.repo http://mirrors.aliyun.com/repo/epel-7.repo # 安装sl来测试 yum install sl -y sl
# 安装vim yum install vim -y
vim /etc/selinux/config # 把7行 SELINUX=enforcing 改:SELINUX=disabled # 重启系统 reboot
yum install lrzsz -y