安装依赖yum -y install ncurses-devel unixODBC unixODBC-devel
erlang安装wget http://erlang.org/download/otp_src_18.1.tar.gz
tar -zxf otp_src_18.1.tar.gz
cd otp_src_18.1
./configure --prefix=/usr/local/erlang
make && make install
#添加环境变量
vim /etc/profile
export PATH="$PATH:/usr/local/erlang/bin"
source /etc/profile
安装rabbitmq依赖文件,安装rabbitmqyum install xmlto
安装rabbitmq服务端wget http://www.rabbitmq.com/releases/rabbitmq-server/v3.5.7/rabbitmq-server-3.5.7.tar.gz
tar zxf rabbitmq-server-3.5.7.tar.gz
cd rabbitmq-server-3.5.7/
make TARGET_DIR=/usr/local/rabbitmq SBIN_DIR=/usr/local/rabbitmq/sbin
make install
启动关闭/usr/local/rabbitmq/sbin/rabbitmq-server start & #启动
/usr/local/rabbitmq/sbin/rabbitmqctl status #查看状态
/usr/local/rabbitmq/sbin/rabbitmqctl stop #关闭
启用管理插件mkdir /etc/rabbitmq
/usr/local/rabbitmq/sbin/rabbitmq-plugins list #查看插件列表
/usr/local/rabbitmq/sbin/rabbitmq-plugins enable rabbitmq_management #启用插件
/usr/local/rabbitmq/sbin/rabbitmq-plugins disable rabbitmq_management #禁用插件
RabbitMQ PHP扩展安装yum install libtool autoconf
安装rabbitmq-cwget https://github.com/alanxz/rabbitmq-c/releases/download/v0.5.0/rabbitmq-c-0.5.0.tar.gz
tar -zxf v0.5.0
cd rabbitmq-c-0.5.0/
autoreconf -i
./configure --prefix=/usr/local/rabbitmq-c
make && make install
安装PHP扩展 amqpwget http://pecl.php.net/get/amqp-1.6.1.tgz
tar zxf amqp-1.6.1.tgz
cd amqp-1.6.1
/usr/local/php/bin/phpize
./configure --with-php-config=/usr/local/php/bin/php-config --with-amqp --with-librabbitmq-dir=/usr/local/rabbitmq-c
make && make install
编辑php.ini文件,增加amqp扩展支持然后重启php-fpm,phpinfo()查看下是否支持amqp扩展
打赏
微信扫一扫,打赏作者吧~