2.Yum仓库优化
1.[初始yum源备份]-[yum更换为国内源]-[添加epel扩展源]
#!/bin/bash mkdir /etc/yum.repos.d/backup/ mv /etc/yum.repos.d/*.repo /etc/yum.repos.d/backup/ if [ `uname -r |awk -F. '{ print $1 }'` -eq 2 ];then curl -o /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-6.repo curl -o /etc/yum.repos.d/epel.repo http://mirrors.aliyun.com/repo/epel-6.repo yum makecache fi if [ `uname -r |awk -F. '{ print $1 }'` -eq 3 ];then curl -o /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo curl -o /etc/yum.repos.d/epel.repo http://mirrors.aliyun.com/repo/epel-7.repo yum makecache fi
other...