一)安装配置数据库
1.1.安装包
# yum install mariadb mariadb-server python2-PyMySQL -y
1.2.配置数据库
# vim /etc/my.cnf.d/openstack.cnf [mysqld] bind-address = 10.0.0.101 # 监听的IP地址(也可以写0.0.0.0) default-storage-engine = innodb # 默认存储引擎[innodb] innodb_file_per_table # 使用独享表空间 max_connections = 4096 # 最大连接数是4096 (默认是1024) collation-server = utf8_general_ci # 数据库默认校对规则 character-set-server = utf8 # 默认字符集
1.3.设置开机启动数据库,启动数据库
systemctl enable mariadb.service
systemctl start mariadb.service
1.4/为了保证数据库服务的安全性,运行``mysql_secure_installation``脚本。特别需要说明的是,为数据库的root用户设置一个适当的密码。
mysql_secure_installation
1.5.创建认证服务的数据库并进行授权
mysql -uroot -predhat create database keystone; # 创建keystone数据库 grant all on keystone.* to 'keystone'@'localhost' identified by 'redhat'; grant all on keystone.* to 'keystone'@'%' identified by 'redhat';
1.6.创建镜像数据库并进行授权
create database glance; # 创建glance数据库 grant all on glance.* to 'glance'@'localhost' identified by 'redhat'; grant all on glance.* to 'glance'@'%' identified by 'redhat';
1.7.创建nova数据库并进行授权
create database nova; # 创建nova数据库 grant all on nova.* to 'nova'@'localhost' identified by 'redhat'; grant all on nova.* to 'nova'@'%' identified by 'redhat';
1.8.创建nova-api数据库
create database nova_api; grant all on nova_api.* to 'nova'@'localhost' identified by 'redhat'; grant all on nova_api.* to 'nova'@'%' identified by 'redhat';
1.9.创建网络资源管理数据库
create database neutron; grant all on neutron.* to 'neutron'@'localhost' identified by 'redhat'; grant all on neutron.* to 'neutron'@'%' identified by 'redhat';
二.消息队列安装
2.1 软件包的安装
yum install rabbitmq-server -y
2.2 启动消息队列服务并将其配置为开机自启动
systemctl enable rabbitmq-server.service
systemctl start rabbitmq-server.service
2.3 添加openstack用户,并设置密码
rabbitmqctl add_user openstack redhat
2.4 给openstack用户读写权限
rabbitmqctl set_permissions openstack ".*" ".*" ".*"
.*分别代表配置、写入、读取
2.5 开启rabbitmq WEB页面插件
rabbitmq-plugins enable rabbitmq_management
访问http://10.0.0.101:15672/,默认账号密码:guest/guest