PHP安装amqp操作记录
环境
PHP版本:7或5均可
系统环境:Centos7.6
rabbitmq-c安装
下载地址: https://github.com/alanxz/rabbitmq-c/archive/v0.10.0.tar.gz tar xf v0.10.0.tar.gz cd rabbitmq-c-0.10.0/ && mkdir build 在build目录下执行: cmake -DCMAKE_INSTALL_PREFIX=/usr/local/librabbitmq .. cmake --build . make -j2 && make -j2 install 拷贝rabbitmq-c的lib64去lib cp -r /usr/local/librabbitmq/lib64 /usr/local/librabbitmq/lib
amqp安装
下载地址:wget https://github.com/php-amqp/php-amqp/archive/v1.10.2.tar.gz tar xf v1.10.2.tar.gz cd php-amqp-1.10.2/ && /apps/php72/bin/phpize ./configure --with-php-config=/apps/php72/bin/php-config --with-amqp --with-librabbitmq-dir=/usr/local/librabbitmq make -j2 && make -j2 install
执行到这,amqp的安装就完成了。