rabbbitmq-c的安装

安装前需安装的插件node

1)yum insatll gccgit

2)yum install poptgithub

3)yum install openssl测试

4)yum install xmltoui

5)yum install doxygenlua

6)yum install cmake插件

 

==============rest

安装rabbbitmq-ccode

wget https://codeload.github.com/alanxz/rabbitmq-c/tar.gz/v0.8.0server

tar zxvf rabbitmq-c-0.8.0.tar.gz

cd rabbitmq-c-0.8.0

makedir build and cd build

cmake ..

cmake --build   .

 

===================

yum install autoconf

yum install automake

yum install libtool

yum install pkg-config

 

======================

cd rabbitmq-c-0.8.0

autoreconf -i

./configure

make

make install

 

====================

测试是否能通讯的方法:

 

 ./examples/amqp_listen localhost 5672 amq.direct test

 

./examples/amqp_sendstring localhost 5672 amq.direct test "hello world"

 

=================需开启rabbitmq服务

 

============

下载安装rabbitmq-server

1)安装erlang语言环境

wget http://erlang.org/download/otp_src_18.3.tar.gz

tar -zxvf otp_src_18.3.tar.gz

cd otp_src_18.3

./configure

make && make install

2)配置erlang

vi /etc/profile

source /etc/profile

 

3)测试erlang

erl

 

halt()   退出

==============================================================================================================================

下载安装并启动rabbitmq-server 

 

1) wget http://www.rabbitmq.com/releases/rabbitmq-server/v3.6.1/rabbitmq-server-3.6.1-1.noarch.rpm

    rpm -ivh --nodeps rabbitmq-server-3.6.1-1.noarch.rpm 

   cd /usr/lib/rabbitmq

    ls

    cd bin

    ls

    ./rabbitmq-server

 

 

==========================================

而后进入rabbitmq-c的下载目录下找到examples

cd /root/tools/rabbitmq-c-0.8.0

 

在一个终端下输入命令:

./examples/amqp_listen localhost 5672 amq.direct test

在另外一个终端下输入另外一个命令:

./examples/amqp_sendstring localhost 5672 amq.direct test "hello world"

注:将amqp.lua amqp-util.lua 放到/usr/local/openresty-1.9.7.2/luajit/share/luajit-2.1.0-beta1路径下

相关文章
相关标签/搜索