rabbitmq PHP7 management software and installation of rabbitmq

rabbitmq-server management software installation

 

 1.mac download rabbitmq-server

brew install rabbitmq

  

2. Start the service rabbitmq-server

rabbitmq-server # to open service

 

3. Turn on Remote Access

rabbitmq-plugins enable rabbitmq_management 

 

4. Access Link Remote Management

http: // localhost: 15672 / # initial default account and password are guest

 

5. Create user and administrative privileges to users

# Create a user 
rabbitmqctl add_user Demo pwd 

# conferred super administrator privileges 
rabbimqctl set_user_tags demo administrator

  

6. The installation of php extension amqp

  First, download and install rabbitmq-c Version Select Version 0.8.0

wget https://github.com/alanxz/rabbitmq-c/releases/download/v0.8.0/rabbitmq-c-0.8.0.tar.gz
tar zxvf rabbitmq-c-0.8.0.tar.gz
cd rabbitmq-c-0.8.0.tar.gz
./configure --prefix=/usr/local/rabbitmq-c-0.8.0
make && make install

  

  Then download amqp; select the version 1.9.0 version of

wget https://pecl.php.net/get/amqp-1.9.0.tgz

tar zxf amqp-1.9.0.tgz

cd amqp-1.9.0
  
/usr/local/php/bin/phpize
./configure --with-php-config=/usr/local/php/bin/php-config --with-amqp --with-librabbitmq-dir=/usr/local/rabbitmq-c-0.8.0 # 这儿一定要对应rabbitmq-c的安装地址
make && make install

  

If the error here, said the case is lost amqp_ssl_socket.h loss occurs, go to the next rabbitmq-c file the following librabbitmq file copy; re-compile and install!

 

7. After the installation is complete, change the php configuration file

we /usr/local/php/etc/php.ini 
extension = amqp.so

  

8. restart php-fpm

sudo php-fpm # start 

sudo killall php-fpm # close

  

9. summary

These are the mac install rabbitmq the whole process; eat a lot of versions of the deficit;

rabbitmq-c-0.8.0 and version rabbitmq-c-0.9.0 and compile and install two different ways; if it is with the new version; you need to use other compilers way! 

Finally, worship your le! If you have questions, please Comments, although I do not necessarily reply. But gotta try, right!








Guess you like

Origin www.cnblogs.com/rianley/p/11726353.html