搭建本地yum源,离线安装openstack

##搭建本地openstack yum源

yum install centos-release-openstack-pike
yum install https://rdoproject.org/repos/rdo-release.rpm
yum -y install reposync
reposync -p <存放目录> #我这里直接把同步下来的目录放在了/var/www/html目录,这样就不需要更改httpd的配置文件了
yum install -y createrepo.noarch
createrepo . #在同步下来的目录都需要执行
yum -y install httpd
systemctl start httpd
systemctl enable httpd
systemctl stop firewalld
systemctl disable firewalld
setenforce 0

修改配置文件 /etc/selinux/config

SELINUX=disabled

##安装单节点openstack
修改repo文件(下面192.168.126.128要换成yum服务的ip)

[base]
name=CentOS-$releasever - Base
baseurl=http://192.168.126.128/yumrepository/base/
gpgcheck=0
enabled=1

[updates]
name=CentOS-$releasever - Updates
baseurl=http://192.168.126.128/yumrepository/updates/
gpgcheck=0
enabled=1

[extras]
name=CentOS-$releasever - Extras
baseurl=http://192.168.126.128/yumrepository/extras/
gpgcheck=0
enabled=1

[centos-openstack-pike]
name=CentOS-7 - OpenStack pike
baseurl=http://192.168.126.128/yumrepository/centos-openstack-pike/
gpgcheck=0
enabled=1

[centos-qemu-ev]
name=CentOS-$releasever - QEMU EV
baseurl=http://192.168.126.128/yumrepository/centos-qemu-ev/
gpgcheck=0
enabled=1

[openstack-pike]
name=OpenStack Pike Repository
baseurl=http://192.168.126.128/yumrepository/openstack-pike/
gpgcheck=0
enabled=1

[rdo-qemu-ev]
name=RDO QEMU EV
baseurl=http://192.168.126.128/yumrepository/rdo-qemu-ev/
gpgcheck=0
enabled=1

[centos-ceph-jewel]
name=CentOs Ceph Jewel
baseurl=http://192.168.126.128/yumrepository/centos-ceph-jewel/
gpgcheck=0
enabled=1

关闭防火墙,selinux,NetworkManager

systemctl stop firewalld
systemctl stop NetworkManager.service
systemctl disable firewalld
systemctl disable NetworkManager.service
setenfor 0

修改配置文件 /etc/selinux/config

SELINUX=disabled

通过packstack安装openstack

yum -y install openstack-packstack.noarch
packstack --allinone

你可能感兴趣的:(openstack,centos,packstack,部署,安装)