添加阿里云的yum源

1. 将旧的yum源移到其他位置,只使用阿里云的yum源安装软件

cd /etc/yum.repos.d

mkdir backup

mv C* backup

2. 下载阿里云的yum源到了/etc/yum.repos.d中,所以不需要切换到/etc/yum.repos.d目录下

CentOS 5

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

CentOS 6

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

CentOS 7

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

 3. 下载软件测试,安装了yum源之后,可以不用清理缓存和建立新的yum源,直接下载安装即可

yum -y install lrzsz

原文地址:https://www.cnblogs.com/yunjisuan1024/p/11652272.html