2-openstack基础环境准备
发表于:2025-11-11 作者:千家信息网编辑
千家信息网最后更新 2025年11月11日,说明: linux-node1 控制节点linux-node2 计算节点2.1.两台centos7服务器主机名: [root@linux-node1 ~]# hostname linux-node1
千家信息网最后更新 2025年11月11日2-openstack基础环境准备
说明: linux-node1 控制节点
linux-node2 计算节点
2.1.两台centos7服务器
主机名: [root@linux-node1 ~]# hostname linux-node1 [root@linux-node2 ~]# hostname linux-node2
IP: linux-node1 192.168.56.11/24 linux-node2 192.168.56.12/24
host解析cat /etc/hosts127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4::1 localhost localhost.localdomain localhost6 localhost6.localdomain6192.168.56.11 linux-node1 linux-node1.oldboyedu.com 192.168.56.12 linux-node2 linux-node2.oldboyedu.com
2.2 selinux 和防火墙关闭
[root@linux-node2 ~]# getenforce Disabled[root@linux-node1 ~]# getenforce Disabled#可以用sedsed -i '/SELINUX/s/enforcing/disabled/' /etc/selinux/config防火墙:systemctl stop firewalldsystemctl disable firewalld
2.3 配置时间同步(两台都做)
yum -y install chronygrep"allow" /etc/chrony.conf #打开allow192.168/16systemctl enable chronyd.service #设置开机自启systemctl start chronyd.service #启动timedatectl set-timezone Asia/Shanghai #同步时区
2.4 在linux-node1 上安装数据库
yum install -y mariadb mariadb-serverMySQl-python #安装数据库\cp /usr/share/mysql/my-medium.cnf /etc/my.cnf #拷贝配置文件在vi /etc/my.cnf 添加如下几行[mysqld]default-storage-engine = innodb #默认的存储引擎innodb_file_per_table #使用独享的表空间collation-server = utf8_general_ci #设置校对规则init-connect = 'SET NAMES utf8' #设置链接的字符集character-set-server = utf8 #设置默认的字符集systemctl enable mariadb.service #开机启动数据库systemctl start mariadb.service #立马启动数据库
2.5 初始化数据库

2.6 为各个组件创建数据库并收授权
2.6.1 keystone
MariaDB[(none)]> create database keystone;Query OK,1 row affected (0.01 sec)MariaDB[(none)]> grant all on keystone.* to 'keystone'@'localhost' identified by'keystonne';Query OK,0 rows affected (0.00 sec)MariaDB[(none)]> grant all on keystone.* to 'keystone'@'%' identified by'keystone';Query OK, 0 rows affected (0.00 sec)
2.6.2 glance
MariaDB[(none)]> create database glance;Query OK,1 row affected (0.00 sec)MariaDB[(none)]> grant all on glance.* to 'glance'@'%' identified by 'glance';Query OK,0 rows affected (0.00 sec)MariaDB[(none)]> grant all on glance.* to 'glance'@'localhost' identified by'glance';
2.6.3 nova和nova_api
MariaDB[(none)]> create database nova;Query OK,1 row affected (0.00 sec)MariaDB[(none)]> grant all on nova.* to 'nova'@'%' identified by 'nova';Query OK,0 rows affected (0.00 sec)MariaDB[(none)]> grant all on nova.* to 'nova'@'localhost' identified by 'nova';Query OK,0 rows affected (0.00 sec)MariaDB[(none)]> create database nova_api;Query OK,1 row affected (0.00 sec)MariaDB[(none)]> grant all on nova_api.* to 'nova'@'localhost' identified by'nova';Query OK,0 rows affected (0.00 sec)MariaDB[(none)]> grant all on nova_api.* to 'nova'@'%' identified by 'nova';
2.6.4 neutron
MariaDB[(none)]> create database neutron;Query OK,1 row affected (0.00 sec)MariaDB[(none)]> grant all on neutron.* to 'neutron'@'%' identified by 'neutron';Query OK,0 rows affected (0.00 sec)MariaDB[(none)]> grant all on neutron.* to 'neutron'@'localhost' identified by'neutron';;Query OK,0 rows affected (0.00 sec)MariaDB[(none)]> flush privileges;Query OK, 0 rows affected (0.00 sec)
2.6.5 检验数据库
MariaDB[(none)]> show databases;+--------------------+|Database |+--------------------+|information_schema ||glance ||keystone ||mysql ||neutron ||nova || nova_api ||performance_schema |+--------------------+8 rows inset (0.00 sec) MariaDB[(none)]>
2.7 安装消息队列(rabbitmq)
2.7.1 基本安装
yuminstall rabbitmq-server -ysystemctl enable rabbitmq-server.servicesystemctl start rabbitmq-server.service[root@linux-node1~]# rabbitmqctl add_user openstack openstack #创建消息队列认证用户Creatinguser "openstack" ......done.[root@linux-node1~]##创建的用户得授权才能使用[root@linux-node1~]# rabbitmqctl set_permissions openstack ".*" ".*"".*" #授权用户才能使用Settingpermissions for user "openstack" in vhost "/" ......done.
2.7.2 web界面安装
查看组件[root@linux-node1~]# rabbitmq-plugins list[ ]amqp_client 3.3.5[ ]cowboy 0.5.0-rmq3.3.5-git4b93c2d[ ]eldap 3.3.5-gite309de4[ ]mochiweb 2.7.0-rmq3.3.5-git680dba8[ ]rabbitmq_amqp1_0 3.3.5[ ]rabbitmq_auth_backend_ldap 3.3.5[ ]rabbitmq_auth_mechanism_ssl 3.3.5[ ]rabbitmq_consistent_hash_exchange 3.3.5[ ]rabbitmq_federation 3.3.5[ ]rabbitmq_federation_management 3.3.5[ ]rabbitmq_management 3.3.5[ ]rabbitmq_management_agent 3.3.5[ ]rabbitmq_management_visualiser 3.3.5[ ]rabbitmq_mqtt 3.3.5[ ]rabbitmq_shovel 3.3.5[ ]rabbitmq_shovel_management 3.3.5[ ]rabbitmq_stomp 3.3.5[ ]rabbitmq_test 3.3.5[ ]rabbitmq_tracing 3.3.5[ ]rabbitmq_web_dispatch 3.3.5[ ]rabbitmq_web_stomp 3.3.5[ ]rabbitmq_web_stomp_examples 3.3.5[ ]sockjs 0.3.4-rmq3.3.5-git3132eb9[ ]webmachine 1.10.3-rmq3.3.5-gite9359c7加载组件 rabbitmq-plugins enable rabbitmq_management systemctlrestart rabbitmq-server.service #重启消息队列说明 rabbitmq监听的是5672 rabbitmq的管理界面监听的是15672
2.7.3 访问测试
默认是用户guest 密码是guest

让openstack用户拥有admistrator的权限进行登录
数据
数据库
用户
消息
组件
队列
字符
字符集
界面
节点
防火墙
同步
监听
配置
防火
主机
密码
引擎
拷贝
文件
数据库的安全要保护哪些东西
数据库安全各自的含义是什么
生产安全数据库录入
数据库的安全性及管理
数据库安全策略包含哪些
海淀数据库安全审计系统
建立农村房屋安全信息数据库
易用的数据库客户端支持安全管理
连接数据库失败ssl安全错误
数据库的锁怎样保障安全
数据库安全配置规范
网络安全 国旗下讲话
如何查看数据库有哪些表
小学生开展网络安全知识答题
肇庆长城宽带服务器故障
和卡卡西有关的服务器
csgo是随机分配服务器吗
福建外贸进口软件服务器
软件开发,深圳
小森生活服务器已达上限怎么解决
网络技术开发伦理
怎么把数据下拉自动列数据库
杭州蔓雁网络技术有限公司怎么样
pd是什么数据库
青岛一诺网络技术有限公司
大专计算机网络技术安全
catia软件开发难吗
浙江软件开发上市公司
怎么算软件开发所需工时
长宁区智能软件开发系统
dota已断开与服务器连接不上
数据库时间转换
怎么上传文件到服务器
建造服务器有用吗
货车帮网络安全审查表态
黄埔股票软件开发
上海机械软件开发销售厂
无线服务器手机打印软件
泰州营销网络技术市场价格
南京什么软件开发