#!/bin/bash
mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo_backup_`date +%F-%H-%M-%S`
wget http://centos.yum.sandai.net/.help/CentOS-Base7.repo -O /etc/yum.repos.d/CentOS-Base.repo -o /dev/null
rpm -ivh http://centos.yum.sandai.net/epel/epel-release-latest-7.noarch.rpm >/dev/null
mv /etc/yum.repos.d/epel.repo /etc/yum.repos.d/epel.repo_backup_`date +%F-%H-%M-%S`
wget http://centos.yum.sandai.net/.help/epel7.repo -O /etc/yum.repos.d/epel.repo -o /dev/null
wget http://centos.yum.sandai.net/epel/RPM-GPG-KEY-EPEL-7 -O /etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-7 -o /dev/null
yum clean all
yum makecache
