下面脚本可以直接复制来配置openstack-ocata版的yum源:
echo "nameserver 8.8.8.8 nameserver 119.29.29.29 nameserver 114.114.114.114" > /etc/resolv.conf cd /etc/yum.repos.d/ tar -zcf yum.repo.tar.gz * rm -rf /etc/yum.repos.d/CentOS-* wget -O /etc/yum.repos.d/CentOS-epel.repo http://mirrors.aliyun.com/repo/epel-7.repo wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo sed -i '$a /dev/cdrom /mnt/ iso9660 defaults 0 0' /etc/fstab mount -a tee /etc/yum.repos.d/CentOS-7.repo <<-'EOF' [centos] name=centos7 baseurl=file:///mnt/ enable=1 gpgcheck=0 EOF yum -y install centos-release-ceph-jewel centos-release-qemu-ev wget -O /opt/centos-release-openstack-ocata-1-2.el7.noarch.rpm https://mirrors.aliyun.com/centos-vault/altarch/7.6.1810/extras/ppc64le/Packages/centos-release-openstack-ocata-1-2.el7.noarch.rpm?spm=a2c6h.13651111.0.0.25962f70kIQliu&file=centos-release-openstack-ocata-1-2.el7.noarch.rpm wget -O /opt/rdo-release-ocata-3.noarch.rpm https://repos.fedorapeople.org/repos/openstack/EOL/openstack-ocata/rdo-release-ocata-3.noarch.rpm rpm -ivh /opt/centos-release-openstack-ocata-1-2.el7.noarch.rpm rpm -ivh /opt/rdo-release-ocata-3.noarch.rpm echo " [openstack-ocata] name=ocata baseurl=https://buildlogs.cdn.centos.org/centos/7/cloud/x86_64/openstack-ocata/ enable=1 gpgcheck=0 " >> /etc/yum.repos.d/CentOS-7.repo yum clean all yum repolist yum makecache
ls