官网Ocata版的安装PDF文档、容器入门基础、OpenStack高可用,这些资料感兴趣的人可以看看
链接:http://pan.baidu.com/s/1bpxo6cR 密码:7983
1、yum配置缓存
[root@vm1 ~]# vim /etc/yum.conf
1 [main]
2 cachedir=/var/cache/yum/$basearch/$releasever
3 keepcache=1
2、指定Ocata镜像源
[root@vm1 ~]# yum install -y epel-release
[root@vm1 ~]# yum list all|grep openstack
[root@vm1 ~]# yum install centos-release-openstack-ocata.noarch -y
3、参考官网O版的安装过程,写一个shell脚本,实现一键yum安装,避免手动敲入。
//删除空白行命令 [root@vm1 ~]# sed /^[[:space:]]*$/d 1.txt
[root@vm1 ~]# vim local_openstack_yum.sh
#!/bin/bash
yum installl -y createrepo yum-plugin-priorities
yum install ntp rabbitmq-server memcached python-memcached -y
yum install python-openstackclient openstack-selinux mariadb mariadb-server python2-PyMySQL -y
yum install openstack-keystone httpd mod_wsgi -y
yum -y install openstack-glance python-glanceclient -y
yum install -y openstack-nova-api openstack-nova-placement-api openstack-novaconductor
openstack-nova-console openstack-nova-novncproxy openstack-novascheduler
python-novaclient
yum install -y openstack-nova-compute sysfsutils
yum install -y openstack-neutron openstack-neutron-ml2 python-neutronclient
yum install -y ebtables openstack-neutron-openvswitch ipset
yum install -y openstack-dashboard
yum install -y openstack-cinder targetcli python-oslo-db MySQL-python lvm2 python-keystone
yum install -y openstack-swift-proxy python-swiftclient python-keystoneauth-token
python-keystonemiddleware memcached
yum install -y xfsprogs rsync
yum install -y openstack-swift-account openstack-swift-container
openstack-swift-object
yum install -y openstack-heat-api openstack-heat-api-cfn openstack-heatengine
python-heatclient
yum install -y mongodb-server mongodb
yum install -y openstack-ceilometer-api openstack-ceilometer-collector
openstack-ceilometer-notification openstack-ceilometer-central
openstack-ceilometer-alarm
python-ceilometerclient
yum install -y openstack-ceilometer-compute python-ceilometerclient pythonpecan
yum install -y openstack-trove python-troveclient
yum install -y openstack-sahara python-saharaclient
===================================================================================
[root@vm1 ~]# bash local_openstack_yum.sh
[root@vm1 ~]# cd /var/cache/yum/x86_64/7
[root@vm1 ~]# ls
4、创建目录
[root@vm1 ~]# mkdir /opt/ocata_rpm
5、将yum缓存的rpm包拷贝到
[root@vm1 ~]# find /var/cache/yum/x86_64/7/ -name *.rpm -exec cp -a {} /opt/ocata_rpm ;
6、生成本地yum源
[root@vm1 ~]# createrepo /opt/ocata_rpm
而后,拷贝/opt/ocata_rpm/到另一台无法联网的机器上去。
7、在无法联网的机器上,配置指定下载的openstack仓库位置
[root@vm2 ~]# cd /etc/yum.repos.d
[root@vm2 ~]# vim openstack_ocata.repo
[ocata]
name=ocata_rpm
baseurl=file:///opt/ocata_rpm
enabled=1
gpgcheck=0
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-ZABBIX-A14FE591
===================================================
[root@vm2 ~]# yum makecache