openstack-1-介绍和准备

一 openstack介绍

在这里插入图片描述

二 Openstack 基础环境准备

安装mysql
[root@linux-node3 ~]# yum install mariadb mariadb-server python2-PyMySQL –y

装yum源
[root@linux-node3 ~]# yum install centos-release-openstack-pike

[root@linux-node3 ~]# systemctl enable mariadb --设置开机启动
Created symlink from /etc/systemd/system/multi-user.target.wants/mariadb.service to /usr/lib/systemd/system/mariadb.service.

[root@linux-node3 ~]# vim /etc/my.cnf.d/openstack.cnf[mysqld]
bind-address = 10.0.0.17
default-storage-engine = innodb
innodb_file_per_table = on
max_connections = 4096
collation-server = utf8_general_ci
character-set-server = utf8

[root@linux-node3 ~]# systemctl start mariadb
[root@linux-node3 ~]# mysql -u root -p123123 —创建数据库
MariaDB [(none)]> create database keyston;
Query OK, 1 row affected (0.00 sec)

MariaDB [(none)]> create database nova;
Query OK, 1 row affected (0.00 sec)

MariaDB [(none)]> create database glance;
Query OK, 1 row affected (0.00 sec)

MariaDB [(none)]> create database neutron;
Query OK, 1 row affected (0.00 sec)

MariaDB [(none)]> create database cinder;
Query OK, 1 row affected (0.00 sec)

MariaDB [(none)]> create database nova_api;
Query OK, 1 row 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)]> grant all on nova.* to ‘nova’@’%’ identified by ‘nova’;
Query OK, 0 rows 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’;
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)

MariaDB [(none)]> grant all on keystone.* to ‘keystone’@‘localhost’ identified by ‘keystone’;
Query OK, 0 rows 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’;
Query OK, 0 rows 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)]> grant all on cinder.* to ‘cinder’@‘localhost’ identified by ‘cinder’;
Query OK, 0 rows affected (0.00 sec)

MariaDB [(none)]> grant all on cinder.* to ‘cinder’@’%’ identified by ‘cinder’;
Query OK, 0 rows affected (0.00 sec)

自己测试每个用户,不要偷懒

安装rabbitmq
[root@linux-node3 ~]# yum install rabbitmq-server –y
[root@linux-node3 ~]# 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-node3 ~]# systemctl start rabbitmq-server.service
[root@linux-node3 ~]# rabbitmqctl add_user openstack openstack —创建用户
Creating user “openstack” …
…done.

[root@linux-node3 ~]# rabbitmqctl set_permissions openstack “." ".” “.*” --赋3个权限
Setting permissions for user “openstack” in vhost “/” …
…done.

安装memcached
[root@linux-node3 ~]# yum install memcached python-memcached –y
[root@linux-node3 ~]# vim /etc/sysconfig/memcached
OPTIONS="-1 10.0.0.17,;;1,controller"
[root@linux-node3 ~]# 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-node3 ~]# systemctl start memcached.service

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值