安裝前需安裝的插件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路徑下