OpenStack Pike Minimal安装:一、环境准备

1.关闭防火墙和selinux
2.配置hosts
[root@compute ~]# cat /etc/hosts
127.0.0.1   localhost localhost.localdomain localhost4 localhost4.localdomain4
::1         localhost localhost.localdomain localhost6 localhost6.localdomain6
20.0.20.21 controller
20.0.20.22 compute
3.配置ntp
yum -y install chrony
[root@controller ~]# vim /etc/chrony.conf
allow 20.0.20.0/16
server ntp1.aliyun.com iburst 
#compute节点只需同步到controller节点
[root@controller ~]# systemctl enable chronyd.service
[root@controller ~]# systemctl start chronyd.service
4.在所有节点上安装openstack
[root@controller ~]# yum install centos-release-openstack-pike -y
[root@controller ~]# yum upgrade -y
[root@controller ~]# yum install python-openstackclient -y
5.在controller节点上安装数据库
[root@controller ~]# yum install mariadb mariadb-server python2-PyMySQL -y
[root@controller ~]# cat /etc/my.cnf.d/openstack.cnf
[mysqld]
bind-address = 20.0.20.21
default-storage-engine = innodb
innodb_file_per_table
max_connections = 4096
collation-server = utf8_general_ci
character-set-server = utf8
[root@controller ~]# systemctl enable mariadb.service
[root@controller ~]# systemctl start mariadb.service
[root@controller ~]# mysql_secure_installation
6.数据库配置,创建数据库、用户授权
mysql -u root -p

create database keystone;
grant all privileges on keystone.* to 'keystone'@'localhost' identified by 'keystone';
grant all privileges on keystone.* to 'keystone'@'%' identified by 'keystone';
grant all privileges on keystone.* to 'keystone'@'controller' identified by 'keystone';

create database glance;
grant all privileges on glance.* to 'glance'@'localhost' identified by 'glance';
grant all privileges on glance.* to 'glance'@'%' identified by 'glance';
grant all privileges on glance.* to 'glance'@'controller' identified by 'glance';

create database nova;
grant all privileges on nova.* to 'nova'@'localhost' identified by 'nova';
grant all privileges on nova.* to 'nova'@'%' identified by 'nova';
grant all privileges on nova.* to 'nova'@'controller' identified by 'nova';

create database nova_api;
grant all privileges on nova_api.* to 'nova'@'localhost' identified by 'nova';
grant all privileges on nova_api.* to 'nova'@'%' identified by 'nova';
grant all privileges on nova_api.* to 'nova'@'controller' identified by 'nova';

create database nova_cell0;
grant all privileges on nova_cell0.* to 'nova'@'localhost' identified by 'nova';
grant all privileges on nova_cell0.* to 'nova'@'%' identified by 'nova';
grant all privileges on nova_cell0.* to 'nova'@'controller' identified by 'nova';

create database neutron;
grant all privileges on neutron.* to 'neutron'@'localhost' identified by 'neutron';
grant all privileges on neutron.* to 'neutron'@'%' identified by 'neutron';
grant all privileges on neutron.* to 'neutron'@'controller' identified by 'neutron';

flush privileges;
MariaDB [(none)]> select user,host from mysql.user;
+----------+------------+
| user     | host       |
+----------+------------+
| glance   | %          |
| keystone | %          |
| neutron  | %          |
| nova     | %          |
| root     | 127.0.0.1  |
| root     | ::1        |
| glance   | controller |
| keystone | controller |
| neutron  | controller |
| nova     | controller |
| root     | controller |
| glance   | localhost  |
| keystone | localhost  |
| neutron  | localhost  |
| nova     | localhost  |
| root     | localhost  |
+----------+------------+
16 rows in set (0.00 sec)

MariaDB [(none)]> show databases;
+--------------------+
| Database           |
+--------------------+
| glance             |
| information_schema |
| keystone           |
| mysql              |
| neutron            |
| nova               |
| nova_api           |
| nova_cell0         |
| performance_schema |
+--------------------+
9 rows in set (0.00 sec)
7.在controller节点安装RabbitMQ消息队列
[root@controller ~]# yum install rabbitmq-server -y
[root@controller ~]# systemctl enable rabbitmq-server.service
[root@controller ~]# systemctl start rabbitmq-server.service
[root@controller ~]# rabbitmqctl add_user openstack openstack
Creating user "openstack" ...
[root@controller ~]# rabbitmqctl set_permissions openstack ".*" ".*" ".*" 
Setting permissions for user "openstack" in vhost "/" ...
[root@controller ~]# rabbitmq-plugins enable rabbitmq_management
[root@controller ~]# lsof -i:15672
COMMAND   PID     USER   FD   TYPE DEVICE SIZE/OFF NODE NAME
beam.smp 3162 rabbitmq   54u  IPv4 449707      0t0  TCP *:15672 (LISTEN)

#访问RabbitMQ,访问地址是http://ip:15672
#默认用户名密码都是guest,浏览器添加openstack用户到组并登陆测试
OpenStack Pike Minimal安装:一、环境准备

8.在controller节点上安装memcached
[root@controller ~]# yum install memcached python-memcached -y
[root@controller ~]# systemctl enable memcached.service
[root@controller ~]# systemctl start memcached.service

转载于:https://blog.51cto.com/lullaby/2169524

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值