美文网首页
php安装amqp扩展

php安装amqp扩展

作者: weylau | 来源:发表于2018-10-31 16:05 被阅读28次

    1.安装rabbitmq-c

    下载地址:https://github.com/alanxz/rabbitmq-c/releases

    wget -c https://github.com/alanxz/rabbitmq-c/releases/download/v0.8.0/rabbitmq-c-0.8.0.tar.gz
    
    tar zxf rabbitmq-c-0.8.0.tar.gz
    
    cd rabbitmq-c-0.8.0
    
    ./configure --prefix=/usr/local/rabbitmq-c-0.8.0
    
    make && make install
    

    2安装amqp

    官网下载地址:http://pecl.php.net/package/amqp

    wget -c http://pecl.php.net/get/amqp-1.9.3.tgz
    
    tar zxf amqp-1.9.3.tgz
    
    cd amqp-1.9.3
    
    /usr/local/php/bin/phpize
    
    ./configure --with-php-config=/usr/local/php/bin/php-config --with-amqp --with-librabbitmq-dir=/usr/local/rabbitmq-c-0.8.0
    
    make && make install
    

    3.修改php.ini

    extension = amqp.so 
    

    相关文章

      网友评论

          本文标题:php安装amqp扩展

          本文链接:https://www.haomeiwen.com/subject/ttvatqtx.html