|
brew 这个命令我还真是第一次知道。
----------------------------------------------
转载请注明: 转载自Yuansir-web菜鸟 | LAMP学习笔记
本文链接地址: mac os 下RabbitMq 以及 PHP amqp扩展安装记录
记录一下安装配置的过程,这里我都是直接用brew来安装,如果没有安装先安装:
1 | /usr/bin/ruby -e "$(curl -fsSL https://raw.github.com/gist/323731)" | 1.首先就是安装rabbitmq了,简单,因为rabbitmq是依赖erlang,所以安装中会下载并且安装erlang,下载编译时间可能会有点长,稍安勿躁:
2.安装rabbitmq-c,C与RabbitMQ通信需要依赖rabbitmq-c库(librabbitmq),具体请看https://github.com/alanxz/rabbitmq-c:
1 | git clone git://github.com/alanxz/rabbitmq-c.git |
3 | cmake -DCMAKE_INSTALL_PREFIX=/usr/local .. |
4 | cmake --build . --target install | 3.接下来就是安装php amqp的扩展了:
你可以源码编译安装
1 | wget http://pecl.php.net/get/amqp-1.0.0.tgz |
4 | /usr/local/php/bin/phpize |
5 | ./configure –-with-php-config=/usr/local/php/bin/php-config -–with-amqp |
当然也可以直接用PECL来装, 如果还没有安装pear的话:
1 | wget http://pear.php.net/go-pear.phar |
2 | php -d detect_unicode=0 go-pear.phar | 然后直接用pecl来安装扩展
1 | ~/pear/bin/pecl install amqp | 最后将‘extension=amqp.so’加入php.ini,重启apache,再查看下:
已经装好了! |
|
|
|
|
|
|