How to install rabbitmq on PHP 7.x

Published: 2026-05-31
Google AdSense 广告位 (待申请通过后开启)

1. Install RabbitMQ-C

https://github.com/alanxz/rabbitmq-c/releases Install the latest version //The download process may take some time.

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/rabbitmqc

make && make install

2. Install AMQP

Official website: http://pecl.php.net/package/amqp

Download the latest version

wget -c http://pecl.php.net/get/amqp-1.11.0.tgz

tar zxf amqp-1.11.0.tgz

cd amqp-1.11.0

/usr/local/php7.4/bin/phpize

./configure --with-php-config=/usr/local/php7.4/bin/php-config --with-amqp --with-librabbitmq-dir=/usr/local/rabbitmqc

make && make install

7.4----------------------------------------------------------------------7.1

tar zxf amqp-1.11.0.tgz

cd amqp-1.11.0

/usr/local/php7.1/bin/phpize

./configure --with-php-config=/usr/local/php7.1/bin/php-config --with-amqp --with-librabbitmq-dir=/usr/local/rabbitmqc

make && make install

-----------------------------------------------------------------------------------------------------------------------------------

/usr/local/php7.4/sbin/php-fpm -c /usr/local/php7.4/etc/php.ini -y /usr/local/php/etc/php-fpm.conf

/usr/local/php7.4/sbin/php-fpm -c /usr/local/php/etc/php.ini

Explore More

Technology Guides →

How to Compile Install PHP 7.x on AlmaLinux 10

How to use PHP Binaries PHP 7.x on AlmaLinux 10

PHP opcache.max_accelerated_files Explained: Configuration, Performance, and Best Practices

PHP opcache.validate_timestamps Explained: Configuration, Code Updates, and Best Practices

Southeast Asia Insights →