zoukankan      html  css  js  c++  java
  • openstack基础环境

    主机环境:

    centos7.5

    ip:192.168.2.11

    修改主机名,修改后主机名不得再更改

    yum install chrony -y (控制节点和计算节点都要装)
    编辑 vi /etc/chrony.conf 文件,按照你环境的要求,对下面的键进行添加,修改或者删除:
    #allow 192.168.0.0/16 #删除
    server NTP_SERVER iburst #增加

    设置开机自启动并启动chronyd

    systemctl start chronyd
    systemctl enable chronyd

    设置时区为亚洲上海
    timedatectl set-timezone Asia/Shanghai
    chronyc sources

    安装openstack源
    yum install -y centos-release-openstack-pike

    安装mariadb和python2-PyMySQL

    yum install -y mariadb mariadb-server python2-PyMySQL

    vim /etc/my.cnf.d/openstack.cnf
    [mysqld]
    bind-address = 192.168.2.11
    default-storage-engine = innodb
    innodb_file_per_table = on
    max_connections = 4096
    collation-server = utf8_general_ci
    character-set-server = utf8

    设置开机自启动并启动mysql

    systemctl enable mariadb
    systemctl start mariadb

    数据库初始化:mysql_secure_installation(密码123123)

    创建数据库并授权
    MariaDB [(none)]> create database keystone;
    Query OK, 1 row affected (0.01 sec)

    MariaDB [(none)]> create database nova;
    Query OK, 1 row affected (0.01 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.01 sec)

    MariaDB [(none)]> grant all on nova.* to 'nova'@'%' identified by 'nova';
    Query OK, 0 rows affected (0.01 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.01 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'@'localhost' identified by 'glance';
    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 neutron.* to 'neutron'@'localhost' identified by 'neutron';
    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 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)

    测试:
    mysql -ucinder -pcinder
    show databases;

    ##memcache安装(控制节点)
    yum install -y memcached python-memcached
    memcache更改如下vi /etc/sysconfig/memcached
    OPTIONS="-l 127.0.0.1,::1 改为 OPTIONS="-l 192.168.2.11,::1
    systemctl start memcached
    systemctl enable memcached

    ##RabbitMQ (控制节点)
    yum install -y rabbitmq-server
    systemctl enable rabbitmq-server
    systemctl start rabbitmq-server
    lsof -i:5672
    rabbitmqctl add_user openstack openstack
    rabbitmqctl set_permissions openstack ".*" ".*" ".*"
    rabbitmq-plugins list
    rabbitmq-plugins enable rabbitmq_management
    systemctl restart rabbitmq-server
    #登录rabbitmq WEB管理界面
    http://192.168.2.11:15672
    帐号:guest 密码:guest

  • 相关阅读:
    .NET开发不可不知、不可不用的辅助类(一)
    .NET开发不可不知、不可不用的辅助类(三)(报表导出终结版)
    如何获取类或属性的自定义特性(Attribute)
    如何使用C#进行Visio二次开发
    列表查询组件代码, 简化拼接条件SQL语句的麻烦
    强大的模板引擎开源软件NVelocity
    自己编写的操作实体类的分页控件, 实现页码层与数据库的具体的信息隔离
    代码生成工具随笔(1) 关于代码生成器
    老歌新唱使用VB6开发的ActiveX实现.NET程序的混淆加密
    VB6中如何使用C#开发的WebService进行开发
  • 原文地址:https://www.cnblogs.com/liuhui-xzz/p/9891305.html
Copyright © 2011-2022 走看看