yum源备份并安装扩展仓库

yum源相关

默认的YUM源
1.备份默认的YUM源
mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.backup
2.下载阿里云YUM源
curl -o /etc/yum.repos.d/CentOS-Base.repo https://mirrors.aliyun.com/repo/Centos-7.repo
3.使用yum repolist 查看当前的源
4.安装扩展的仓库
安装wget命令
yum -y install wget
安装扩展的仓库
wget -O /etc/yum.repos.d/epel.repo http://mirrors.aliyun.com/repo/epel-7.repo

yum -y install cowsay sl

5.安装扩展命令的tab补全插件 前提安装了扩展的yum仓库
[root@oldboyedu ~]# yum -y install bash-completion-extras.noarch
需要重新登录下操作系统 可自动补全

原文地址:https://www.cnblogs.com/yangte/p/13961170.html