centos7 配置使用阿里的yum源-使用curl
创建备份目录
mkdir -p /etc/yum.repos.d/bak把老的配置移到备份目录
mv /etc/yum.repos.d/*.repo /etc/yum.repos.d/bak/清楚yum缓存
yum clean all下载yum源配置
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下载软件包到本地
mkdir /tmp/ansible
yum install ansible –downloadonly –downloaddir=/tmp/ansible/
centos6 配置使用阿里的yum源
创建备份目录
mkdir -p /etc/yum.repos.d/bak把老的配置移到备份目录
mv /etc/yum.repos.d/*.repo /etc/yum.repos.d/bak/清楚yum缓存
yum clean all下载yum源配置
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下载软件包到本地
mkdir /tmp/ansible
yum install ansible –downloadonly –downloaddir=/tmp/ansible/