• 一键配置openstack-cata版的在线yum源


    下面脚本可以直接复制来配置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
  • 相关阅读:
    【工具】sublime使用技巧
    怎样存钱利息最大及怎样买房付款最省钱问题
    存钱问题
    玛丽莲问题
    用线程做一个火车票购票系统(可以根据需要选择线程个数)
    系统编程拷贝文件或者目录(可以做出一个动态库哦)
    mysql优化-数据库设计基本原则
    项目 数据可视化1
    读书笔记2-三体
    python数据学习3 布林带
  • 原文地址:https://www.cnblogs.com/guarding/p/12321702.html
Copyright © 2020-2023  润新知