zoukankan      html  css  js  c++  java
  • ##2.基础服务(SQl,RabbitMQ)-- openstack pike

    2-基础服务(SQl,RabbitMQ)

      openstack pike 安装 目录汇总 http://www.cnblogs.com/elvi/p/7613861.html

    ##2.基础服务(MysqlSQL,RabbitMQ)
    
    #SQL root密码
    DBPass=open2017
    
    # #------------------
    #SQL数据库
    yum install mariadb mariadb-server python2-PyMySQL -y
    #cp /etc/my.cnf.d/openstack.cnf{,.bak}
    echo "#
    [mysqld]
    bind-address = 0.0.0.0
    default-storage-engine = innodb
    innodb_file_per_table
    max_connections = 4096
    collation-server = utf8_general_ci
    character-set-server = utf8
    #">/etc/my.cnf.d/openstack.cnf
    #启动数据库服务
    systemctl enable mariadb.service
    systemctl start mariadb.service
    netstat -antp|grep mysqld
    #mysql_secure_installation #初始化设置密码,自动交互
    [[ -f /usr/bin/expect ]] || { yum install expect -y; } #若没expect则安装
    /usr/bin/expect << EOF
    set timeout 30
    spawn mysql_secure_installation
    expect {
        "enter for none" { send "
    "; exp_continue}
        "Y/n" { send "Y
    " ; exp_continue}
        "password:" { send "$DBPass
    "; exp_continue}
        "new password:" { send "$DBPass
    "; exp_continue}
        "Y/n" { send "Y
    " ; exp_continue}
        eof { exit }
    }
    EOF
    #测试
    mysql -u root -p$DBPass -e "show databases;"
    [ $? = 0 ] || { echo "mariadb初始化失败";exit; }
    
    #数据库配置,创建数据库、用户授权
    #mysql -u root -p 
    mysql -u root -p$DBPass -e "
    create database keystone;
    grant all privileges on keystone.* to 'keystone'@'localhost' identified by 'keystone';
    grant all privileges on keystone.* to 'keystone'@'%' 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';
    
    create database nova;
    grant all privileges on nova.* to 'nova'@'localhost' identified by 'nova';
    grant all privileges on nova.* to 'nova'@'%' 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';
    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';
    
    create database neutron;
    grant all privileges on neutron.* to 'neutron'@'localhost' identified by 'neutron';
    grant all privileges on neutron.* to 'neutron'@'%' identified by 'neutron';
    
    flush privileges;
    select user,host from mysql.user;
    show databases;
    "
    #
    
    # create database cinder;
    # grant all privileges on cinder.* to 'cinder'@'localhost' identified by 'cinder';
    # grant all privileges on cinder.* to 'cinder'@'%' identified by 'cinder';
    
    # #------------------
    sleep 1
    
    # #------------------
    #RabbitMQ #消息队列
    yum -y install erlang socat
    yum install -y rabbitmq-server
    #启动 rabbitmq ,端口5672
    systemctl enable rabbitmq-server.service
    systemctl start rabbitmq-server.service
    rabbitmq-plugins enable rabbitmq_management  #启动web插件端口15672
    #添加用户及密码
    rabbitmqctl  add_user admin admin
    rabbitmqctl  set_user_tags admin administrator
    rabbitmqctl add_user openstack openstack 
    rabbitmqctl set_permissions openstack ".*" ".*" ".*" 
    rabbitmqctl  set_user_tags openstack administrator
    systemctl restart rabbitmq-server.service
    netstat -antp|grep '5672'
    
    # rabbitmq-plugins list  #查看支持的插件
    # lsof -i:15672
    #访问RabbitMQ,访问地址是http://ip:15672
    #默认用户名密码都是guest,浏览器添加openstack用户到组并登陆测试
  • 相关阅读:
    桌面上嵌入窗口(桌面日历)原理探索(将该窗口的Owner设置成桌面的Shell 窗口,可使用SetWindowLong更改窗口的GWL_HWNDPARENT,还要使用SetWindowPos设置Z-Order)
    QQ截图时窗口自动识别的原理(WindowFromPoint, ChildWindowFromPoint, ChildWindowFromPointEx,RealChildWindowFromPoint)
    如何给开源的DUILib支持Accessibility(论述了DUILib的六个缺点,很精彩)
    从点击Button到弹出一个MessageBox, 背后发生了什么(每个UI线程都有一个ThreadInfo结构, 里面包含4个队列和一些标志位)
    Sessions, Window Stations and Desktops(GetDesktopWindow函数得到的桌面句柄, 是Csrss.exe创建的一个窗口)
    skip list
    理解对象模型图(Reading OMDS)
    Javascript与当前项目的思考
    Stub和Mock的理解
    https学习总结
  • 原文地址:https://www.cnblogs.com/elvi/p/7614057.html
Copyright © 2011-2022 走看看