zoukankan      html  css  js  c++  java
  • 2.openstack之mitaka搭建控制节点数据库和消息队列

    一:部署mariadb数据库

    控制节点(192.168.11.103):

    yum install mariadb mariadb-server python2-PyMySQL -y
    
    编辑:
    /etc/my.cnf.d/openstack.cnf
    
    [mysqld]
    bind-address = 控制节点管理网络ip(192.168.11.103)
    default-storage-engine = innodb
    innodb_file_per_table
    max_connections = 4096
    collation-server = utf8_general_ci
    character-set-server = utf8
    
    #启服务:
    systemctl enable mariadb.service
    systemctl start mariadb.service
    

    #初始化数据库

    #mysql_secure_installation
    
    
    
    NOTE: RUNNING ALL PARTS OF THIS SCRIPT IS RECOMMENDED FOR ALL MariaDB
          SERVERS IN PRODUCTION USE!  PLEASE READ EACH STEP CAREFULLY!
    
    In order to log into MariaDB to secure it, we'll need the current
    password for the root user.  If you've just installed MariaDB, and
    you haven't set the root password yet, the password will be blank,
    so you should just press enter here.
    
    Enter current password for root (enter for none): 
    OK, successfully used password, moving on...
    
    Setting the root password ensures that nobody can log into the MariaDB
    root user without the proper authorisation.
    
    Set root password? [Y/n] n
     ... skipping.
    
    By default, a MariaDB installation has an anonymous user, allowing anyone
    to log into MariaDB without having to have a user account created for
    them.  This is intended only for testing, and to make the installation
    go a bit smoother.  You should remove them before moving into a
    production environment.
    
    Remove anonymous users? [Y/n] n
     ... skipping.
    
    Normally, root should only be allowed to connect from 'localhost'.  This
    ensures that someone cannot guess at the root password from the network.
    
    Disallow root login remotely? [Y/n] n
     ... skipping.
    
    By default, MariaDB comes with a database named 'test' that anyone can
    access.  This is also intended only for testing, and should be removed
    before moving into a production environment.
    
    Remove test database and access to it? [Y/n] y
     - Dropping test database...
     ... Success!
     - Removing privileges on test database...
     ... Success!
    
    Reloading the privilege tables will ensure that all changes made so far
    will take effect immediately.
    
    Reload privilege tables now? [Y/n] y
     ... Success!
    
    Cleaning up...
    
    All done!  If you've completed all of the above steps, your MariaDB
    installation should now be secure.
    
    Thanks for using MariaDB!
    
    [root@localhost ~]# 
    [root@localhost ~]# mysql
    Welcome to the MariaDB monitor.  Commands end with ; or g.
    Your MariaDB connection id is 6
    Server version: 10.1.12-MariaDB MariaDB Server
    
    Copyright (c) 2000, 2016, Oracle, MariaDB Corporation Ab and others.
    
    Type 'help;' or 'h' for help. Type 'c' to clear the current input statement.
    
    MariaDB [(none)]> 
    MariaDB [(none)]> exit
    Bye
    

    二:为Telemetry 服务部署MongoDB

    控制节点(192.168.11.103):
    yum install mongodb-server mongodb -y
    
    编辑:/etc/mongod.conf
    bind_ip = 控制节点管理网络ip(192.168.11.103)
    smallfiles = true
    
    启动服务:
    systemctl enable mongod.service
    systemctl start mongod.service
    

    三:部署消息队列rabbitmq

    (验证方式:http://192.168.11.103:15672/ 用户:guest 密码:guest)

    控制节点:
    yum install rabbitmq-server -y
    
    启动服务:
    systemctl enable rabbitmq-server.service
    systemctl start rabbitmq-server.service
    
    新建rabbitmq用户密码:
    rabbitmqctl add_user openstack(用户名) liuyao(密码)
    
    为新建的用户openstack设定权限:
    rabbitmqctl set_permissions openstack ".*" ".*" ".*"
    
    六:部署memcached缓存(为keystone服务缓存tokens)
    控制节点:
    yum install memcached python-memcached -y
    
    启动服务:
    systemctl enable memcached.service
    systemctl start memcached.service
  • 相关阅读:
    lucene学习-创建索引
    ExtJs学习-搭建开发环境
    Struts2上传文件(1)
    使用USBWriter做U盘启动盘后U盘在盘中不显示的解决办法(轉載)
    家里旧电脑装了centos7實踐思路
    win7/win10下装centos7双系统(转载)
    美区google play礼品卡,如何正确充值到美区google play余额,并能购买游戏道具
    excel 2016 打开UTF-8编码CSV文件乱码的问题UTF-8编码CSV文件乱码的问题
    python3 writerow CSV文件多一个空行
    python3 UnicodeEncodeError: 'gbk' codec can't encode character 'xa0' in position 4400: illegal multibyte sequence
  • 原文地址:https://www.cnblogs.com/liu-yao/p/5940552.html
Copyright © 2011-2022 走看看