PHP extension AMQP, installation error resolution

Source: Internet
Author: User
Tags rabbitmq
This article introduces the content of the PHP extension AMQP, installation error resolution, has a certain reference value, now share to everyone, the need for friends can refer to


There are 2 error-prone places, one is the wrong version of Rabbitmq-c, and the other is lib64 to find the right path when Ln.

Reference URL:

https://segmentfault.com/a/1190000012348103
https://blog.csdn.net/qq_35772366/article/details/78932367


#root账号yum install gcc glibc-devel make ncurses-devel openssl-devel xmlto# non-root account wget HTTP://ERLANG.ORG/DOWNLOAD/OTP_ Src_18.3.tar.gztar xvf otp_src_18.3.tar.gz# configuration '--prefix ' the specified installation directory./configure--prefix=/usr/local/erlang--with-ssl- Enable-threads-enable-smmp-support-enable-kernel-poll--enable-hipe--without-javac# Install make && make install# Configure the ERLANG environment variable vim/etc/profile# Add the following code at the end of the file ' Erlang_home ' equals the directory specified in the previous step '--prefix ' erlang_home=/usr/local/erlangpath=$ Erlang_home/bin: $PATHexport erlang_homeexport path# make the environment variable effective source/etc/profile# The input command verifies whether the installation succeeds erl# the following output indicates successful installation # #wget http://www.rabbitmq.com/releases/rabbitmq-server/v3.6.1/rabbitmq-server-generic-unix-3.6.1.tar.xz# RabbitMQ3.6 version without make, do install decompression can be extracted with # RABBITMQ, the official package is the XZ compression package, so you need to use the XZ command xz-d Rabbitmq-server-generic-unix-3.6.1.tar.xz#xz extract the. Tar package, then unzip the TAR-XVF with the tar command rabbitmq-server-generic-unix-3.6.1.tar# Mobile directory see a person likes cp-rf./rabbitmq_server-3.6.1/usr/local/cd/usr/local/#修改文件夹名mv rabbitmq_server-3.6.1 rabbitmq-3.6.1# Open the Admin page plugin CD./RABBITMQ-3.6.1/SBIn/./rabbitmq-plugins enable rabbitmq_management# Start command, the command CTRL + C will shut down the service #./rabbitmq-server# start in the background rabbit#./ rabbitmq-server-detached# Shutdown Service #./rabbitmqctl stop# shutdown Service (kill) find PID for RABBITMQ service [not recommended] #ps-ef|grep rabbitmq#kill-9 ****# Add Admin Account # Enter RABBITMQ install directory cd/usr/local/rabbitmq-3.6.1/sbin# Add user #rabbitmqctl Add_user Username password./rabbitmqctl Add_user rabbitadmin 123456# Assigning user tags #rabbitmqctl set_user_tags user tag#[administrator]: Administrator tab./RABBITMQCTL Set_user_ Tags rabbitadmin administrator#http://192.168.70.128:15672/### #PHP Version 5.5.7### #安装rabbitmq-cwget https:// Github.com/alanxz/rabbitmq-c/releases/download/v0.5.2/rabbitmq-c-0.5.2.tar.gz https://github.com/alanxz/ Rabbitmq-c/archive/v0.5.2.tar.gz also needs to install another communication extension rabbitmq-c before installing AMQP. Go to GitHub and download the latest version (currently 0.8.0) and unzip the source package. TAR-ZXVF rabbitmq-c-0.5.2.tar.gz-c. RABBITMQ-C-0.5.2CD Rabbitmq-c-0.5.2/mkdir Build && CD build # This step is to create a build subdirectory in the root directory of RABBITMQ-C # This step is to let cmake according to: /cmakelist.txt, the CMakeList.txt created makefile file in the root directory of RABBITMQ-C # Makefile file will be created into the build directory# yum Install cmake# cmake--versioncmake-dcmake_install_prefix=/usr/local/rabbitmq-c. # This step is the real build rabbitmq-c library, note, do not miss out the point '. '  CMake--build. --target Installcd/usr/local/rabbitmq-c & ln-s lib64 lib installation amqp download the latest AMQP expansion pack from the PECL official library wget http://pecl.php.net/get/ AMQP-1.4.0.TGZTAR-ZXVF AMQP-1.4.0.TGZCD amqp-1.4.0/alidata/server/php/bin/phpize./configure--with-php-config=/ Alidata/server/php/bin/php-config--WITH-AMQP--with-librabbitmq-dir=/usr/local/rabbitmq-cmake && make Install Configure AMQP Extensions Vi/alidata/server/php/etc/php.ini add extension=amqp.so# restart Phpphp-fpm-vkillall php-fpm &&/ ALIDATA/SERVER/PHP/SBIN/PHP-FPM &

Related recommendations:

Introduction to the Automatic management tool phpize for PHP extensions

CentOS7 PHP Installation AMQP extensions

PHP installation AMQP extension has an LIBRABBITMQ error

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.