source: trunk/Monitoring/CNClient/README @ 866

Last change on this file since 866 was 866, checked in by jripsl, 11 years ago

Add demo scenarios.

File size: 2.4 KB
Line 
1- this program uses rabbitmq-c library (v0.3.0)
2        - https://github.com/alanxz/rabbitmq-c
3- library installation
4        - using system package
5                - install using commands below
6                        - aptitude install librabbitmq0
7                        - aptitude install librabbitmq-dev
8                - note that it is likely that system packages versions are out of date (we need v0.3.0)
9                  so better use installation from source
10        - from source
11                - retrieve source
12                        - wget https://github.com/alanxz/rabbitmq-c/archive/rabbitmq-c-v0.3.0.zip -O rabbitmq-c-v0.3.0.zip
13                        - unzip rabbitmq-c-v0.3.0.zip
14                        - cd rabbitmq-c-v0.3.0
15                - compilation using autoconf (automake v1.9+, and libtool v2.2+)
16                        - autoreconf -i
17                                - if error occurs at this step, check requirement below
18                                        - we require autotools v2.63 or better to build. I think RHEL5 ships with v2.59 which lacks the AC_PROC_CC_C99 macro.
19                                                - You can do one of two things;
20                                                        - Install a newer version of autotools
21                                                        - Build using cmake (v2.6 or better).
22                        - ./configure --enable-static
23                        - make
24                        - make install
25                - compilation using cmake (CMake v2.6+)
26                        - mkdir build && cd build
27                        - cmake -DBUILD_STATIC_LIBS=True -DBUILD_SHARED_LIBS=True ..
28                        - cmake --build .
29                        - make
30                                - you got error AAA below, it's normal
31                                        make[2]: *** Pas de rÚgle pour fabriquer la cible « librabbitmq/librabbitmq.so.1.0.1 », nécessaire pour « examples/amqp_bind ». Arrêt.
32                                        make[1]: *** [examples/CMakeFiles/amqp_bind.dir/all] Erreur 2
33                                        make: *** [all] Erreur 2
34                        - make
35                          (because of the above error (AAA), you need to run make twice)
36                        - make install
37- compilation (static)
38        - gcc -static -I/usr/local/include -L/usr/local/lib -Wall -o sendAMQPMsg send_AMQP_msg.c -lrabbitmq
39                - we get warning below during compilation
40                        -
41                          <---
42                          /usr/local/lib/librabbitmq.a(librabbitmq_librabbitmq_la-amqp_socket.o): In function `amqp_open_socket':
43                          rabbitmq-c-rabbitmq-c-v0.3.0/librabbitmq/amqp_socket.c:66: warning: Using 'getaddrinfo' in statically
44                          linked applications requires at runtime the shared libraries from the glibc version used for linking
45                          --->
46                        - it means that you may need to be sure all computing node have the same glibc version !!!!
47                                - also means that a different binary must be use in each computing center
48- usage
49        - to send a message in the queue, do
50                - ./sendAMQPMsg localhost 5672 test
51- note
52        - to show how many messages are in the queue, do as root
53                - ./rabbitmqctl list_queues
Note: See TracBrowser for help on using the repository browser.