ICode9

精准搜索请尝试: 精确搜索
首页 > 系统相关> 文章详细

openstack 基础服务软件安装配置(queens,centos-7)

2019-03-07 14:40:34  阅读:313  来源: 互联网

标签:none centos grant identified nova openstack MariaDB 节点 queens


介绍

openstack 可以根据使用场景分配多种组合架构,此处以两个节点,控制节点和计算节点为例展示安装配置过程。注意:openstack 中每个节点服务器的主机名必须是唯一且后期不可变更的。(centos-7 配置/etc/hostname和/etc/hosts)

时间同步

两个节点都要配置时间同步服务(参照官方文档即可),在openstack 中所有节点时间必须一致,设置控制节点同步时间服务器时间,其他节点同步控制节点的时间。

基础软件包安装(默认yum 源即可)

两个节点都要执行

yum install centos-release-openstack-queens

yum upgrade                (注意:此命令不仅升级软件包还会升级系统版本和内核版本,生产环境不可使用此命令)

yum install python-openstackclient

数据库安装配置(控制节点安装)

yum install mariadb mariadb-server python2-PyMySQL

创建和编辑/etc/my.cnf.d/openstack.cnf文件

创建一个[mysqld]部分,并将bind-address 密钥设置为控制器节点的管理IP地址,以允许其他节点通过管理网络进行访问。设置其他键以启用有用选项和UTF-8字符集:

[mysqld]
bind-address = 10.0.0.11

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  #先回车,再设置密码,往后一律Y 同意即可

数据库创建并授权:     #以下操作可以在创建各个服务时候再操作,也可以提前操作。

MariaDB [(none)]> create database keystone;

MariaDB [(none)]> create database glance;

MariaDB [(none)]> create database nova;

MariaDB [(none)]> create database nova_api;

MariaDB [(none)]> create database neutron;

MariaDB [(none)]> create database cinder;

MariaDB [(none)]> grant all on keystone.* to 'keystone'@'localhost' identified by 'keystone';

MariaDB [(none)]> grant all on keystone.* to 'keystone'@'%' identified by 'keystone';

MariaDB [(none)]> grant all on glance.* to 'glance'@'localhost' identified by 'glance';

MariaDB [(none)]> grant all on glance.* to 'glance'@'%' identified by 'glance';

MariaDB [(none)]> grant all on nova.* to 'nova'@'localhost' identified by 'nova';

MariaDB [(none)]> grant all on nova.* to 'nova'@'%' identified by 'nova';

MariaDB [(none)]> grant all on nova_api.* to 'nova'@'localhost' identified by 'nova';

MariaDB [(none)]> grant all on nova_api.* to 'nova'@'%' identified by 'nova';

MariaDB [(none)]> grant all on neutron.* to 'neutron'@'localhost' identified by 'neutron';

MariaDB [(none)]> grant all on neutron.* to 'neutron'@'%' identified by 'neutron';

MariaDB [(none)]> grant all on cinder.* to 'cinder'@'localhost' identified by 'cinder';

MariaDB [(none)]> grant all on cinder.* to 'cinder'@'%' identified by 'cinder';


show databases 查看数据库是否全部创建,名字是否正确

消息队列服务安装配置

(此服务可以安装在任意节点,如果规模很大需要单独安装并作集群)

添加openstack用户:
# rabbitmqctl add_user 用户名 密码
允许用户进行配置,写入和读取访问 openstack:
# rabbitmqctl set_permissions openstack ".*" ".*" ".*"

rabbitmq-plugins list 查看可用的插件
rabbitmq-plugins enable rabbitmq_management 启用此插件,就可以web 页面管理rabbitmq 了
[root@localhost my.cnf.d]# lsof -i:15672 查看是否已经启动
COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME
beam.smp 36610 rabbitmq 55u IPv4 82209 0t0 TCP *:15672 (LISTEN)
登录web 页面 http://192.168.1.1:15672/ 注意管理员为guest 密码guest ,可以登录后更改一下密码

 

标签:none,centos,grant,identified,nova,openstack,MariaDB,节点,queens
来源: https://www.cnblogs.com/fanggege/p/10489443.html

本站声明: 1. iCode9 技术分享网(下文简称本站)提供的所有内容,仅供技术学习、探讨和分享;
2. 关于本站的所有留言、评论、转载及引用,纯属内容发起人的个人观点,与本站观点和立场无关;
3. 关于本站的所有言论和文字,纯属内容发起人的个人观点,与本站观点和立场无关;
4. 本站文章均是网友提供,不完全保证技术分享内容的完整性、准确性、时效性、风险性和版权归属;如您发现该文章侵犯了您的权益,可联系我们第一时间进行删除;
5. 本站为非盈利性的个人网站,所有内容不会用来进行牟利,也不会利用任何形式的广告来间接获益,纯粹是为了广大技术爱好者提供技术内容和技术思想的分享性交流网站。

专注分享技术,共同学习,共同进步。侵权联系[81616952@qq.com]

Copyright (C)ICode9.com, All Rights Reserved.

ICode9版权所有