centos更换为阿里云源
源地址 /etc/yum.repo.d/ 先安装wget命令
yum -y install wget
备份
cd /etc/yum.repo.d/
mkdir bak
mv * bak/
下载阿里云源
centos 5
wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-5.repo
centos6
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
整理缓存
yum clean all #清除所有缓存,可以不执行
yum makecache #生成缓存
安装eple源 安装eple之后, 才能yum安装nginx,redis等
yum install -y epel-release