4.OpenStack-Ocata 安装OpenStack包

由于不同的发布日程,发行版发布 OpenStack 的包作为发行版的一部分,或使用其他方式。请在所有节点上执行这些程序

这里所描述的OpenStack包设置需要在所有节点进行:控制节点、计算节点和其他节点。

更换YUM源

备份原有的源:

cd /etc/yum.repos.d/
mkdir bak
mv *.repo bak/

新建编辑CentOS-Base.repo文件并更改yum源:

提前查看版本,我的是centos/7.6.1810/的

vim /etc/yum.repos.d/CentOS-Base.repo
[CentOS-Base]
name=CentOS-Base
baseurl=https://mirror.tuna.tsinghua.edu.cn/centos-vault/7.6.1810/os/x86_64/
enabled=1
gpgcheck=0

[CentOS-Updates]
name=CentOS-Updates
baseurl=https://mirror.tuna.tsinghua.edu.cn/centos-vault/7.6.1810/updates/x86_64/
enabled=1
gpgcheck=0

[CentOS-Extras]
name=CentOS-Extras
baseurl=https://mirror.tuna.tsinghua.edu.cn/centos-vault/7.6.1810/extras/x86_64/
enabled=1
gpgcheck=0

将yum进行缓存

yum makecache
yum repolist

图片[1]-4.OpenStack-Ocata 安装OpenStack包-剧毒之触博客

启用OpenStack库

yum install -y centos-release-openstack-ocata

图片[2]-4.OpenStack-Ocata 安装OpenStack包-剧毒之触博客

cd /etc/yum.repos.d/
[root@compute1 yum.repos.d]# ls
bak  CentOS-Base.repo  CentOS-Ceph-Jewel.repo  CentOS-OpenStack-ocata.repo  CentOS-QEMU-EV.repo  CentOS-Storage-common.repo

进入/etc/yum.repos.d发现多出几个repo文件,进行修改

  1. CentOS-Ceph-Jewel.repo

    vim CentOS-Ceph-Jewel.repo
    # CentOS-Ceph-Jewel.repo
    #
    # Please see http://wiki.centos.org/SpecialInterestGroup/Storage for more
    # information
    
    [centos-ceph-jewel]
    name=CentOS-$releasever - Ceph Jewel
    #baseurl=http://mirror.centos.org/centos/$releasever/storage/$basearch/ceph-jewel/
    baseurl=https://mirror.tuna.tsinghua.edu.cn/centos-vault/7.6.1810/storage/x86_64/ceph-jewel/
    gpgcheck=1
    enabled=1
    gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-SIG-Storage
    
    [centos-ceph-jewel-test]
    name=CentOS-$releasever - Ceph Jewel Testing
    baseurl=http://buildlogs.centos.org/centos/$releasever/storage/$basearch/ceph-jewel/
    gpgcheck=0
    enabled=0
    gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-SIG-Storage
    
    [centos-ceph-jewel-debuginfo]
    name=CentOS-$releasever - Ceph Jewel DebugInfo
    baseurl=http://debuginfo.centos.org/centos/$releasever/storage/$basearch/ceph-jewel/
    gpgcheck=0
    enabled=0
    gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-SIG-Storage
    
    [centos-ceph-jewel-source]
    name=CentOS-$releasever - Ceph Jewel Source
    baseurl=http://vault.centos.org/centos/$releasever/storage/Source/ceph-jewel/
    gpgcheck=0
    enabled=0
    gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-SIG-Storage
  2. CentOS-QEMU-EV.repo

    vim CentOS-QEMU-EV.repo
    # CentOS-QEMU-EV.repo
    #
    # Please see http://wiki.centos.org/SpecialInterestGroup/Virtualization for more
    # information
    
    [centos-qemu-ev]
    name=CentOS-$releasever - QEMU EV
    #mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=virt-kvm-common
    #baseurl=http://mirror.centos.org/$contentdir/$releasever/virt/$basearch/kvm-common/
    baseurl=https://mirror.tuna.tsinghua.edu.cn/centos-vault/7.6.1810/virt/x86_64/kvm-common/
    gpgcheck=1
    enabled=1
    gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-SIG-Virtualization
    
    [centos-qemu-ev-test]
    name=CentOS-$releasever - QEMU EV Testing
    baseurl=http://buildlogs.centos.org/centos/$releasever/virt/$basearch/kvm-common/
    gpgcheck=0
    enabled=0
  3. CentOS-OpenStack-ocata.repo

    vim CentOS-OpenStack-ocata.repo
    # CentOS-OpenStack-ocata.repo
    #
    # Please see http://wiki.centos.org/SpecialInterestGroup/Cloud for more
    # information
    
    [centos-openstack-ocata]
    name=CentOS-7 - OpenStack ocata
    #baseurl=http://mirror.centos.org/centos/7/cloud/$basearch/openstack-ocata/
    baseurl=https://mirror.tuna.tsinghua.edu.cn/centos-vault/7.6.1810/cloud/x86_64/openstack-ocata/
    gpgcheck=1
    enabled=1
    gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-SIG-Cloud
    exclude=sip,PyQt4
    
    [centos-openstack-ocata-test]
    name=CentOS-7 - OpenStack ocata Testing
    baseurl=http://buildlogs.centos.org/centos/7/cloud/$basearch/openstack-ocata/
    gpgcheck=0
    enabled=0
    exclude=sip,PyQt4
    
    [centos-openstack-ocata-debuginfo]
    name=CentOS-7 - OpenStack ocata - Debug
    baseurl=http://debuginfo.centos.org/centos/7/cloud/$basearch/
    gpgcheck=1
    enabled=0
    gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-SIG-Cloud
    exclude=sip,PyQt4
    
    [centos-openstack-ocata-source]
    name=CentOS-7 - OpenStack ocata - Source
    baseurl=http://vault.centos.org/centos/7/cloud/Source/openstack-ocata/
    gpgcheck=1
    enabled=0
    gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-SIG-Cloud
    exclude=sip,PyQt4
    
    [rdo-trunk-ocata-tested]
    name=OpenStack ocata Trunk Tested
    baseurl=https://trunk.rdoproject.org/centos7-ocata/current-passed-ci/
    gpgcheck=0
    enabled=0

更新缓存

yum makecache

查看yum源是否更换完成

yum repolist
[root@compute1 yum.repos.d]# yum repolist
已加载插件:fastestmirror
Loading mirror speeds from cached hostfile
源标识                                          源名称                                               状态
CentOS-Base                                     CentOS-Base                                           10,019
CentOS-Extras                                   CentOS-Extras                                            435
CentOS-Updates                                  CentOS-Updates                                         2,500
centos-ceph-jewel                               CentOS-7 - Ceph Jewel                                    101
centos-openstack-ocata                          CentOS-7 - OpenStack ocata                           2,019+2
centos-qemu-ev                                  CentOS-7 - QEMU EV                                        79
repolist: 15,153

安装 OpenStack 客户端和安装 openstack-selinux包实现对OpenStack服务的安全策略进行自动管理

yum install -y python-openstackclient openstack-selinux
© 版权声明
THE END
喜欢就支持一下吧
点赞14 分享
评论 抢沙发

请登录后发表评论