环境:centos7
IP地址: 192.168.199.100
1、修改主机名,然后修改/etc/hosts文件解析
[root@test ~]# hostnamectl set-hostname test.fxkj.cn
[root@test ~]# vim /etc/hosts
127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4 ::1 localhost localhost.localdomain localhost6 localhost6.localdomain6 192.168.199.100 test.fxkj.cn test
2、关闭selinux
[root@test ~]# vim /etc/selinux/config
改为: SELINUX=disabled
3、关闭防火墙
[root@test ~]# firewall-cmd –set-default-zone=trusted
Warning: ZONE_ALREADY_SET: trusted
success
4、关闭NetworkManager
[root@test ~]# systemctl stop NetworkManager
[root@test ~]# systemctl disable NetworkManager
5、配置阿里云的镜像
[root@test ~]# yum install -y centos-release-openstack-pike
由于RDO的源一般下载速度比较慢,容易由于安装超时导致失败,可以替换成阿里的源
[root@test ~]# vim /etc/yum.repos.d/CentOS-OpenStack-pike.repo
name=CentOS-7 - OpenStack pike baseurl=http://mirrors.aliyun.com/centos/7/cloud/$basearch/openstack-pike/ gpgcheck=1 enabled=1 gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-SIG-Cloud
[root@test ~]# yum clean all
[root@test ~]# yum makecache
[root@test ~]# yum update –y
更新一下软件,系统
[root@test ~]# reboot
重启
6、安装packstack
[root@ftest ~]# yum -y install openstack-packstack
【以应答文件的方式安装 !!!!!】
先创建一个应答文件出来,根据自己的需求来修改
[root@test ~]# packstack –gen-answer-file=test.text
Packstack changed given value to required value /root/.ssh/id_rsa.pub
(test.text 是自定义命名的应答文件,会在root 用户家目录下自动生成)
[root@test ~]#ls
anaconda-ks.cfg test.text
[root@test~]#vim test.text
修改对应的参数
CONFIG_DEBUG_MODE=n # Server on which to install OpenStack services specific to the # controller role (for example, API servers or dashboard). CONFIG_CONTROLLER_HOST=192.168.199.100 # List the servers on which to install the Compute service. CONFIG_COMPUTE_HOSTS=192.168.199.100 # List of servers on which to install the network service such as # Compute networking (nova network) or OpenStack Networking (neutron). CONFIG_NETWORK_HOSTS=192.168.199.100
CONFIG_PROVISION_DEMO=n
CONFIG_NEUTRON_ML2_TYPE_DRIVERS=flat,vxlan
CONFIG_NEUTRON_ML2_FLAT_NETWORKS=datacentre
CONFIG_NEUTRON_OVS_BRIDGE_MAPPINGS=datacentre:br-ex
使用sed修改所有的密码都为redhat
[root@test ~]# sed -i.bak -r ‘s/(.+_PW)=[0-9a-z]+/\1=redhat/g’ test.text
【然后使用应答文件进行安装】
[root@test ~]# packstack –answer-file=test.text
然后等待半个小时或者更长的时间如果没有出现红色字体据说明安装成功了
黄色是警告提示 红色是错误。
输入本机的ip就可以登陆进去了
如下图所示:
Date:2018/12/30 23:20
by-运维小弟
暂无评论内容