[root@localhost home]# docker cp /home/amqp-1.10.2 php:/home
[root@localhost home]# docker cp /home/rabbitmq-c-0.8.0 php:/home
pecl install amqp
cd rabbitmq-c-0.8.0/
root@10ee2ec5b8bc:/home/rabbitmq-c-0.8.0# ./configure --prefix=/usr/local/rabbitmq-c
root@10ee2ec5b8bc:/home/rabbitmq-c-0.8.0# make && make install
root@10ee2ec5b8bc:/usr/local# ls
bin etc games include lib man php rabbitmq-c sbin share src var
root@10ee2ec5b8bc:/home/amqp-1.10.2# /usr/local/bin/phpize
./configure --with-php-config=/usr/local/bin/php-config --with-amqp --with-librabbitmq-dir=/usr/local/rabbitmq-c
make && make install
make install 可能報錯如下
cp /home/rabbitmq-c-0.8.0/librabbitmq/amqp_ssl_socket.h /home/amqp-1.10.2/
安裝正常
docker-php-ext-enable amqp
root@10ee2ec5b8bc:/home/amqp-1.10.2# php -m
[PHP Modules]
amqp
Core
ctype
curl
date
dom
fileinfo
...
本作品採用《CC 協議》,轉載必須註明作者和本文連結