How to install rabbitmq on PHP 7.x
- 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
- 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
› How to Compile Install PHP 7.x on AlmaLinux 10
› How to use PHP Binaries PHP 7.x on AlmaLinux 10
› PHP-FPM pm.max_children Explained: Configuration, Performance, and Best Practices
› PHP-FPM pm.max_requests Explained: Configuration, Memory Management, and Best Practices