OpenStack安装-MySQL,Rabbitmq,memcache.
基于前一篇的基本环境,现在我们开始安装MySQL.
在node1上面安装MySQL:
[root@linux-node1 ~]# yum install mariadb mariadb-server python2-PyMySQL -y
设置为开机自动启动:
[root@linux-node1 ~]# systemctl enable mariadb
Created symlink from /etc/systemd/system/multi-user.target.wants/mariadb.service to /usr/lib/systemd/system/mariadb.service.
创建并编辑openstack.cnf文件:
[root@linux-node1 ~]# cat /etc/my.cnf.d/openstack.cnf [mysqld]
bind-address = 192.168.56.11
default-storage-engine = innodb
innodb_file_per_table = on
max_connections =
collation-server = utf8_general_ci
character-set-server = utf8
[root@linux-node1 ~]#
启动数据库,因为初始没有密码,我们需要为数据库设置一个密码,现在设置密码为wandl123
[root@linux-node1 ~]# mysql
Welcome to the MariaDB monitor. Commands end with ; or \g. Your MariaDB connection id is
Server version: 10.1.-MariaDB MariaDB Server
Copyright (c) , , Oracle, MariaDB Corporation Ab and others. Type 'help;' or '\h' for help. Type '\c' to clear the current input statement. MariaDB [(none)]> use mysql;
Reading table information for completion of table and column names You can turn off this feature to get a quicker startup with -A
Database changed MariaDB [mysql]> update user set password=password("wandl123")where user="root"; Query OK, rows affected (0.00 sec)
Rows matched: Changed: Warnings: MariaDB [mysql]> flush privileges; Query OK, rows affected (0.00 sec) MariaDB [mysql]> exit Bye
为每一个openstack服务(keystone,nova,nova_api,glance,neutron)创建一个数据库并配置密码
MariaDB [(none)]> create database keystone; Query OK, row affected (0.00 sec)
MariaDB [(none)]> create database nova; Query OK, row affected (0.00 sec)
MariaDB [(none)]> create database nova_api; Query OK, row affected (0.00 sec)
MariaDB [(none)]> create database glance; Query OK, row affected (0.00 sec)
MariaDB [(none)]> create database neutron; Query OK, row affected (0.00 sec)
MariaDB [(none)]> create database cinder; Query OK, row affected (0.00 sec) MariaDB [(none)]> CREATE DATABASE nova_cell0
为新的数据库授权
MariaDB [(none)]> grant all on nova.* to 'nova'@'localhost' identified by 'nova' -> ;
Query OK, rows affected (0.00 sec)
MariaDB [(none)]> grant all on nova.* to 'nova'@'%' identified by 'nova'; Query OK, rows affected (0.00 sec)
MariaDB [(none)]> grant all on nova_api.* to 'nova'@'%' identified by 'nova'; Query OK, rows affected (0.00 sec)
MariaDB [(none)]> grant all on nova_api.* to 'nova'@'localhost' identified by 'nova'; Query OK, rows affected (0.00 sec)
MariaDB [(none)]> grant all on keystone.* to 'keystone'@'localhost' identified by 'keystone'; Query OK, rows affected (0.00 sec)
MariaDB [(none)]> grant all on keystone.* to 'keystone'@'%' identified by 'keystone'; Query OK, rows affected (0.01 sec)
MariaDB [(none)]> grant all on glance.* to 'glance'@'localhost' identified by 'glance';
Query OK, rows affected (0.00 sec)
MariaDB [(none)]> grant all on glance.* to 'glance'@'%' identified by 'glance'; Query OK, rows affected (0.00 sec)
MariaDB [(none)]> grant all on neutron.* to 'neutron'@'localhost' identified by 'neutron'; Query OK, rows affected (0.00 sec)
MariaDB [(none)]> grant all on neutron.* to 'neutron'@'%' identified by 'neutron'; Query OK, rows affected (0.00 sec)
MariaDB [(none)]> grant all on cinder.* to 'cinder'@'localhost' identified by 'cinder'; Query OK, rows affected (0.00 sec)
MariaDB [(none)]> grant all on cinder.* to 'cinder'@'%' identified by 'cinder'; Query OK, rows affected (0.00 sec)
MariaDB [(none)]> GRANT ALL PRIVILEGES ON nova_cell0.* TO 'nova'@'localhost' IDENTIFIED BY 'nova';
MariaDB [(none)]> GRANT ALL PRIVILEGES ON nova_cell0.* TO 'nova'@'%' DENTIFIED BY 'nova';
在创建并授权新的数据库后,需要自己验证一下自己配置的密码是不是可以登录自己创建的数据库,这一步在这里就省略了。
安装rabbitmq
[root@linux-node1 ~]# yum install rabbitmq-server
启动消息队列服务并将其配置为随系统启动:
[root@linux-node1 ~]# systemctl enable rabbitmq-server.service
Created symlink from /etc/systemd/system/multi-user.target.wants/rabbitmq-server.service to /usr/lib/systemd/system/rabbitmq-server.service.
[root@linux-node1 ~]# systemctl start rabbitmq-server.service
[root@linux-node1 ~]#
为rabbitmq添加openstack用户,并将密码设置为openstack
[root@linux-node1 ~]# rabbitmqctl add_user openstack openstack
Creating user "openstack" ...
给``openstack``用户配置写和读权限:
[root@linux-node1 ~]# rabbitmqctl set_permissions openstack ".*" ".*" ".*"
Setting permissions for user "openstack" in vhost "/" ...
安装memcach:
[root@linux-node1 ~]# yum install memcached python-memcached
编辑/etc/sysconfig/memcached, 将127.0.0.1替换为192.168.56.11
[root@linux-node1 ~]# cat /etc/sysconfig/memcached
PORT=""
USER="memcached"
MAXCONN=""
CACHESIZE=""
OPTIONS="-l 192.168.56.11,::1"
将memcache启动并设置为开机启动
[root@linux-node1 ~]# systemctl enable memcached.service
Created symlink from /etc/systemd/system/multi-user.target.wants/memcached.service to /usr/lib/systemd/system/memcached.service.
[root@linux-node1 ~]# systemctl start memcached.service
现在将openstack所需的控制节点服务安装上,供后面章节使用:
#keystone
[root@linux-node1 ~]# yum install -y openstack-keystone httpd mod_wsgi memcached python-memcached #Glance
[root@linux-node1 ~]# yum install -y openstack-glance #nova
[root@linux-node1 ~]# yum install -y openstack-nova-api openstack-nova-placement-api \
openstack-nova-conductor openstack-nova-console \
openstack-nova-novncproxy openstack-nova-scheduler #neutron
[root@linux-node1 ~]# yum install -y openstack-neutron openstack-neutron-ml2 \
openstack-neutron-linuxbridge ebtables
然后将计算节点的服务安装上,供后面章节使用
[root@linux-node2 ~]# yum install -y openstack-nova-compute sysfsutils [root@linux-node2 ~]# yum install -y openstack-neutron openstack-neutron-linuxbridge ebtables
这一部分先到这,后面介绍keystone的配置
OpenStack安装-MySQL,Rabbitmq,memcache.的更多相关文章
- 还在本地安装MySQL/RabbitMQ/MongoDB 吗 ? 或许你可以试试这个【附下载】
		
我们经常在Windows开发的时候,需要在本地进行调试.当然也免不了安装数据库.消息队列 等一些开发软件.等什么时候我们重新安装了这边软件.如此的繁琐. 尤其是安装RabbitMQ 消息队列的时候,居 ...
 - Docker 安装Mysql,RabbitMQ
		
安装Mysql 拉取镜像 docker pull mysql:5.7.30 运行容器 docker run -itd --name mysql5.7 -p 33006:3306 --restart=a ...
 - nginx+apache+mysql+php+memcache+squid搭建集群web环境
		
服务器的大用户量的承载方案 一.前言 二.编译安装 三. 安装MySQL.memcache 四. 安装Apache.PHP.eAccelerator.php-memcache 五. 安装Squid 六 ...
 - OpenStack之三: 安装MySQL,rabbitmq, memcached
		
官网地址:https://docs.openstack.org/install-guide/environment-sql-database-rdo.html #:安装mysql [root@mysq ...
 - CentOS7安装MySQL、Redis、RabbitMQ
		
系统版本 CentOS Linux release 7.2.1511 (Core) MySQL安装 一.下载mysql的repo源 wget http://repo.mysql.com/mysql-c ...
 - 20190418 CentOS7实用技能综合:系统安装 + WinScp客户端连接 + 防火墙端口号iptables + Nginx编译安装 + MySQL编译安装 + Redis编译安装 + MongoDB编译安装 + ActiveMQ/RocketMQ/RabbitMQ编译安装 + ...各类常用生产环境软件的编译安装
		
系统安装 + WinScp客户端连接 + 防火墙端口号iptables + Nginx编译安装 + MySQL编译安装 + Redis编译安装 + MongoDB编译安装 + ActiveMQ/Roc ...
 - docker 安装redis mysql rabbitmq
		
docker redis mysql rabbitmq 基本命令 安装redis 安装mysql 安装rabbitmq 基本命令 命令格式: docker 命令 [镜像/容器]名字 常用命令: sea ...
 - [腾讯云]简单在腾讯云 CenTOS7.0 安装Nginx,Mysql(MariaDB),Memcache,解析PHP!
		
1.安装LNMP之前要安装EPEL,以便安装源以外的软件,如Nginx,phpMyAdmin等. yum install epel-release 2.安装Nginx a) yum install n ...
 - openstack安装newton版本keyston部署(一)
		
一.部署环境: 两台centos7, 内存2G 控制计算节点: Hostname1: ip:172.22.0.218 计算节点及存储节点 Hostnam ...
 
随机推荐
- XXS level10
			
(1)进入第十关发现无突破口,尝试从url中的keyword入手,也行不通,但可以从页面源代码看到有三个参数是隐藏的 (2)查看PHP源代码 <?php ini_set("displa ...
 - solr增加中文分析器
			
我的solr版本是5.3.0 1将jar包ik-analyzer-solr5-5.x.jar放入sor的web-inf的lib里面 2 在web-inf下面新建classes目录,再新增三个配置文件: ...
 - restframework细节学习
			
一.后端发送列表.字典 1. 发送字典出现safe error,需要如下处理 def books(request): ll=[{},{}] # return HttpResponse(json.dum ...
 - I think I need a boat house
			
I think I need a boat house. Fred Mapper is considering purchasing some land in Louisiana to build h ...
 - findHomography(src_points, dst_points, CV_RANSAC)
			
Homography,即单应性,该函数用于求src_points转换为dst_poinsts的单应性矩阵: 为了理解单应性,必须先引入透视变换的概念:把空间坐标系中的三维物体或对象转变为二维图像表示的 ...
 - 关于C语言实现判断给定一个数,判断其是否是一个质数(素数)。
			
Annotation:⒈我们需要明确0,1既不是质数,又不是合数.⒉其次我们需要知道一个质数,质数定义为在大于1的自然数中,除了1和它本身以外不再有其他因数.(自然数:自然数用以计量事物的件数或表示事 ...
 - 学习笔记TF046:TensoFlow开发环境,Mac、Ubuntu/Linux、Windows,CPU版本、GPU版本
			
下载TensorFlow https://github.com/tensorflow/tensorflow/tree/v1.1.0 .Tags选择版本,下载解压. pip安装.pip,Python包管 ...
 - Tarjan求割点&桥
			
概念 1.桥:是存在于无向图中的这样的一条边,如果去掉这一条边,那么整张无向图会分为两部分,这样的一条边称为桥无向连通图中,如果删除某边后,图变成不连通,则称该边为桥. 2.割点:无向连通图中,如果删 ...
 - 【CH5104】I-country 线性dp+路径输出
			
pre:在网格中,凸多边形可以按行(row)分解成若干段连续的区间 [ l , r ] ,且左端点纵坐标的值(col)满足先减后增,右端点纵坐标先增后减. 阶段:根据这个小发现,可以将阶段设置成每一行 ...
 - 【转】C++中嵌入python程序——参数传递
			
C++中嵌入python程序——参数传递 前面两篇博客已经介绍如何在C++中嵌套使用 python,但是在实际使用中,我们需要向python传递各种各样的参数,这样的程序才具有更高的灵活性.下面简单介 ...