zoukankan      html  css  js  c++  java
  • php7.3安装使用rabbitMq

    1.安装erlang运行环境

    wget https://www.rabbitmq.com/releases/erlang/erlang-19.0-1.el6.x86_64.rpm

    yum -y install erlang-19.0-1.el6.x86_64.rpm

    输入erl测试是否成功 输入halt().退出

    2.安装rabbitmq-server

    wget https://www.rabbitmq.com/releases/rabbitmq-server/v3.6.14/rabbitmq-server-3.6.14-1.el6.noarch.rpm

    yum -y install rabbitmq-server-3.6.14-1.el6.noarch.rpm

    service rabbitmq-server start

    service rabbitmq-server status

    service rabbitmq-server restart

    service rabbitmq-server stop

    3.安装amqp-c

    wget https://github.com/alanxz/rabbitmq-c/releases/download/v0.8.0/rabbitmq-c-0.8.0.tar.gz

    tar -zxvf rabbitmq-c-0.8.0.tar.gz

    cd rabbitmq-c-0.8.0

    ./configure --prefix=/usr/local/rabbitmq-c

    make && make install

     

    4.安装amqp拓展

    安装依赖

    yum install epel-release

    yum install autoconf gcc gcc-c++ librabbitmq librabbitmq-devel

    wget https://pecl.php.net/get/amqp-1.9.4.tgz

    tar xf amqp-1.9.4.tgz

    cd amqp-1.9.4

    /www/server/php/73/bin/phpize

    ./configure --with-php-config=/www/server/php/73/bin/php-config --with-amqp --with-librabbitmq-dir=/usr/local/rabbitmq-c

    make && make install

    修改php.ini配置增加拓展amqp.so 并重启php-fpm

     

    5.一些命令

    增加用户 rabbitmqctl add_user 'test' 'test'

    列出用户 rabbitmqctl list_users

    授权用户 rabbitmqctl  set_permissions -p / test '.*' '.*' '.*'

  • 相关阅读:
    ElasticSearch搜索
    Muddery框架
    https和http的区别
    multiprocessing模块创建进程
    进程理论基础
    单例模式
    原型模式
    建造者模式
    StrutsTypeConverter的使用
    UML用例图之泛化(generalization)、扩展(extend)和包含(include)关系--UML一波流系列讲解
  • 原文地址:https://www.cnblogs.com/godehi/p/13326052.html
Copyright © 2011-2022 走看看