照着官网来安装openstack pike之environment设置
安装openstack前的准备环境:
两个centos7系统的环境:192.168.101.10 node1,192.168.101.11 node2
控制节点node1,计算节点node2
1、统一hosts文件:
1 2 3 4 5 | [root@node1 ~] # cat /etc/hosts 127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4 ::1 localhost localhost.localdomain localhost6 localhost6.localdomain6 192.168.101.10 node1 192.168.101.11 node2 |
1 2 3 4 5 | [root@node2 ~] # cat /etc/hosts 127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4 ::1 localhost localhost.localdomain localhost6 localhost6.localdomain6 192.168.101.10 node1 192.168.101.11 node2 |
2、时间同步(控制节点操作)
1 | yum install chrony |
修改vim /etc/chrony.conf
1 | allow 192.168.101.0 /16 开启 |
最后开启服务:
1 2 | systemctl enable chronyd.service systemctl start chronyd.service |
以下是计算节点或者其他节点操作:
1 | yum install chrony |
修改vim /etc/chrony.conf
1 | allow 192.168.101.0 /16 开启 |
注释掉:
1 2 3 4 5 | #server 0.centos.pool.ntp.org iburst #server 1.centos.pool.ntp.org iburst #server 2.centos.pool.ntp.org iburst #server 3.centos.pool.ntp.org iburst server 192.168.101.10 iburst (新增控制节点) |
最后开启服务:
1 2 | systemctl enable chronyd.service systemctl start chronyd.service |
有必要的化请设置时区:timedatectl set-timezone Asia/Shanghai
官网设置:
校验结果:

3、在所有节点(这里只有控制节点和计算节点,如果有其他节点也需要操作)操作如下:
1 2 | yum install centos-release-openstack-pike yum upgrade |
If the upgrade process includes a new kernel, reboot your host to activate it.
由于更新了kernel,于是需要进行重启,以新内核启动,开启后,继续执行:
yum install python-openstackclient
yum install openstack-selinux
4、安装数据库(在控制节点上)
1 2 | # yum install mariadb mariadb-server python2-PyMySQL # vim /etc/my.cnf.d/openstack.cnf |
1 2 3 4 5 6 7 8 9 10 11 | [mysqld] bind-address = 192.168.101.10 default-storage-engine = innodb innodb_file_per_table = on max_connections = 4096 collation-server = utf8_general_ci character- set -server = utf8 # systemctl enable mariadb.service # systemctl start mariadb.service # mysql_secure_installation |
5、安装消息队列服务rabbitmq(控制节点上操作)
1 2 3 4 5 6 7 | # yum install rabbitmq-server # systemctl enable rabbitmq-server.service # systemctl start rabbitmq-server.service Add the openstack user: # rabbitmqctl add_user openstack openstack(账号和密码) Permit configuration, write, and read access for the openstack user: # rabbitmqctl set_permissions openstack ".*" ".*" ".*" |
rabbitmq服务监听在5672、25672端口
列出rabbitmq的插件:
1 | # rabbitmq-plugins list |
启动某一个插件:
1 | # rabbitmq-plugins enable rabbitmq_management |
重启rabbitmq服务:
1 | systemctl restart rabbitmq-server.service |
上面这个开启的插件是一个web管理平台,监听在15672端口:
1 | tcp 0 0 0.0.0.0:15672 0.0.0.0:* LISTEN 12581 /beam .smp |
访问这个web管理平台:
http://192.168.101.10:15672 默认账号密码:guest:guest
设置使用openstack账号登录:

设置完成,退出登录,使用openstack:openstack登录,即可成功
6、安装memcached服务(控制节点):uses Memcached to cache tokens
1 | # yum install memcached python-memcached |
修改配置文件:/etc/sysconfig/memcached
1 | OPTIONS= "-l 127.0.0.1,::1,192.168.101.10" |
开启memcached服务:
1 2 3 4 | # systemctl enable memcached.service # systemctl start memcached.service tcp 0 0 192.168.101.10:11211 0.0.0.0:* LISTEN 12982 /memcached tcp 0 0 127.0.0.1:11211 0.0.0.0:* LISTEN 12982 /memcached |
至此openstack基本前提环境安装完成
标签:
openstack
【推荐】国内首个AI IDE,深度理解中文开发场景,立即下载体验Trae
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步
· 记一次.NET内存居高不下排查解决与启示
· 探究高空视频全景AR技术的实现原理
· 理解Rust引用及其生命周期标识(上)
· 浏览器原生「磁吸」效果!Anchor Positioning 锚点定位神器解析
· 没有源码,如何修改代码逻辑?
· 分享4款.NET开源、免费、实用的商城系统
· 全程不用写代码,我用AI程序员写了一个飞机大战
· MongoDB 8.0这个新功能碉堡了,比商业数据库还牛
· 白话解读 Dapr 1.15:你的「微服务管家」又秀新绝活了
· 上周热点回顾(2.24-3.2)