openstack之mysql&&rebbmqserver实践(一)

2023年 7月 16日 98.2k 0

试验架构.pngopenstack_service.png

epel源

rpm -ivh http://mirrors.ustc.edu.cn/fedora/epel//6/x86_64/epel-release-6-8.noarch.rpm
源码依赖包 
yum install python-pip gcc gcc-c++ make libtool patch automake python-devel libxslt-devel MySQL-python openssl-devel libudev-devel git wget libvirt-python libvirt qemu-kvm gedit python-numdisplay python-eventlet device-mapper bridge-utils libffi-devellibffi 

yum安装源
yum install http://repos.fedorapeople.org/repos/openstack/openstack-icehouse/rdo-release-icehouse-4.noarch.rpm

Dabtabas Install

yum install mysql-server

修改参数:
[root@localhost ~]# cp /usr/share/mysql/my-medium.cnf /etc/my.cnf 
cp: overwrite `/etc/my.cnf'? y
[root@localhost ~]# vim /etc/my.cnf 

default-storage-engine = innodb
innodb_file_per_table
collation-server = utf8_general_ci
init-connect = 'SET NAMES uft8'
character-set-server = utf8

[root@localhost ~]# service mysqld start
Starting mysqld:                                           [  OK  ]
[root@localhost ~]# 

授权

mysql> create database keystone;
Query OK, 1 row affected (0.00 sec)

mysql> grant all on keystone.* to keystone@'10.0.0.0/24' identified by 'ketstone';
Query OK, 0 rows affected (0.00 sec)

mysql> create database glance;
Query OK, 1 row affected (0.00 sec)

mysql> grant all on glance.* to glance@'10.0.0.0/24' identified by 'glance';
Query OK, 0 rows affected (0.00 sec)

mysql> create database nova;
Query OK, 1 row affected (0.00 sec)

mysql> grant all on nova.* to nova@'10.0.0.0/24' identified by 'nova';
Query OK, 0 rows affected (0.00 sec)

mysql> create database neutron;
Query OK, 1 row affected (0.00 sec)

mysql> grant all on neutron.* to neutron@'10.0.0.0/24' identified by 'neutron';
Query OK, 0 rows affected (0.00 sec)

mysql> create database cinder;
Query OK, 1 row affected (0.00 sec)

mysql> grant all on cinder.* to cinder@'10.0.0.0/24' identified by 'cinder';
Query OK, 0 rows affected (0.00 sec)

mysql> show databases;
+--------------------+
| Database           |
+--------------------+
| information_schema |
| cinder             |
| glance             |
| keystone           |
| mysql              |
| neutron            |
| nova               |
| test               |
+--------------------+
8 rows in set (0.00 sec)

mysql> 

消息队列MQ

[root@localhost ~]# yum -y install rabbitmq-server
[root@localhost ~]# /etc/init.d/rabbitmq-server start
Starting rabbitmq-server: SUCCESS
rabbitmq-server.
[root@localhost ~]# 
[root@localhost ~]# ps aux |grep rabbitmq

打开一个管理插件

[root@localhost ~]# /usr/lib/rabbitmq/bin/rabbitmq-plugins list
[ ] amqp_client                       3.1.5
[ ] cowboy                            0.5.0-rmq3.1.5-git4b93c2d
[ ] eldap                             3.1.5-gite309de4
[ ] mochiweb                          2.7.0-rmq3.1.5-git680dba8
[ ] rabbitmq_amqp1_0                  3.1.5
[ ] rabbitmq_auth_backend_ldap        3.1.5
[ ] rabbitmq_auth_mechanism_ssl       3.1.5
[ ] rabbitmq_consistent_hash_exchange 3.1.5
[ ] rabbitmq_federation               3.1.5
[ ] rabbitmq_federation_management    3.1.5
[ ] rabbitmq_jsonrpc                  3.1.5
[ ] rabbitmq_jsonrpc_channel          3.1.5
[ ] rabbitmq_jsonrpc_channel_examples 3.1.5
[ ] rabbitmq_management               3.1.5
[ ] rabbitmq_management_agent         3.1.5
[ ] rabbitmq_management_visualiser    3.1.5
[ ] rabbitmq_mqtt                     3.1.5
[ ] rabbitmq_shovel                   3.1.5
[ ] rabbitmq_shovel_management        3.1.5
[ ] rabbitmq_stomp                    3.1.5
[ ] rabbitmq_tracing                  3.1.5
[ ] rabbitmq_web_dispatch             3.1.5
[ ] rabbitmq_web_stomp                3.1.5
[ ] rabbitmq_web_stomp_examples       3.1.5
[ ] rfc4627_jsonrpc                   3.1.5-git5e67120
[ ] sockjs                            0.3.4-rmq3.1.5-git3132eb9
[ ] webmachine                        1.10.3-rmq3.1.5-gite9359c7
[root@localhost ~]# 

打开一个rabbitmq_management管理插件

[root@localhost ~]# /usr/lib/rabbitmq/bin/rabbitmq-plugins enable  rabbitmq_management
The following plugins have been enabled:
  mochiweb
  webmachine
  rabbitmq_web_dispatch
  amqp_client
  rabbitmq_management_agent
  rabbitmq_management
Plugin configuration has changed. Restart RabbitMQ for changes to take effect.
[root@localhost ~]# 
[root@localhost ~]# /etc/init.d/rabbitmq-server restart

rabbitmq监控在5672端口,web界面15672,55672

[root@localhost ~]# netstat -nltp
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address               Foreign Address             State       PID/Program name            
tcp        0      0 0.0.0.0:15672               0.0.0.0:*                   LISTEN      34490/beam          
tcp        0      0 0.0.0.0:55672               0.0.0.0:*                   LISTEN      34490/beam                 
tcp        0      0 :::5672                     :::*                        LISTEN      34490/beam          
[root@localhost ~]# 

[root@localhost ~]# chkconfig mysqld on
[root@localhost ~]# chkconfig rabbitmq-server on

rabbitmq.png

相关文章

LeaferJS 1.0 重磅发布:强悍的前端 Canvas 渲染引擎
10分钟搞定支持通配符的永久有效免费HTTPS证书
300 多个 Microsoft Excel 快捷方式
一步步配置基于kubeadmin的kubevip高可用
istio全链路传递cookie和header灰度
REST Web 服务版本控制

发布评论