source: trunk/Monitoring/CNClient/README @ 940

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

Improve logging.

File size: 3.3 KB
Line 
1- requirements
2        - CentOS 6
3        - outgoing internet access (port 80)
4        - Forge svn repository access
5- add Unix user
6        - adduser -m -d /home/cscompute -s /sbin/nologin cscompute
7- check if EPEL repository is configured, if not, do steps below
8        - for CENTOS 6
9          (from http://www.tecmint.com/how-to-enable-epel-repository-for-rhel-centos-6-5/)
10                - wget http://download.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm
11                - rpm -ivh epel-release-6-8.noarch.rpm
12        - note
13                -
14                        - if you get error below
15                                Could not parse metalink https://mirrors.fedoraproject.org/metalink?repo=epel-6&arch=x86_64 error was
16                                No repomd file
17                        - then, manually copy files below from another machine
18                                - repomd.xml
19                                - metalink.xml
20- tools
21        - yum install gcc screen
22- this program uses rabbitmq-c library (v0.3.0)
23        - https://github.com/alanxz/rabbitmq-c
24- library installation
25        - using system package
26                - install using commands below
27                        - yum install librabbitmq0
28                        - yum install librabbitmq-dev
29                - note that it is likely that system packages versions are out of date (we need v0.3.0)
30                  in this case, use installation from source
31        - from source
32                - retrieve source
33                        - wget https://github.com/alanxz/rabbitmq-c/archive/rabbitmq-c-v0.3.0.zip -O rabbitmq-c-v0.3.0.zip
34                        - unzip rabbitmq-c-v0.3.0.zip
35                        - cd rabbitmq-c-v0.3.0
36                - compilation using autoconf (automake v1.9+, and libtool v2.2+)
37                        - autoreconf -i
38                                - if error occurs at this step, check requirement below
39                                        - we require autotools v2.63 or better to build. I think RHEL5 ships with v2.59 which lacks the AC_PROC_CC_C99 macro.
40                                                - You can do one of two things;
41                                                        - Install a newer version of autotools
42                                                        - Build using cmake (v2.6 or better).
43                        - ./configure --enable-static
44                        - make
45                        - make install
46                - compilation using cmake (CMake v2.6+)
47                        - mkdir build && cd build
48                        - cmake -DBUILD_STATIC_LIBS=True -DBUILD_SHARED_LIBS=True ..
49                        - cmake --build .
50                        - make
51                                - you got error AAA below, it's normal
52                                        make[2]: *** Pas de rÚgle pour fabriquer la cible « librabbitmq/librabbitmq.so.1.0.1 », nécessaire pour « examples/amqp_bind ». Arrêt.
53                                        make[1]: *** [examples/CMakeFiles/amqp_bind.dir/all] Erreur 2
54                                        make: *** [all] Erreur 2
55                        - make
56                          (because of the above error (AAA), you need to run make twice)
57                        - make install
58- sendAMQPMsg installation
59        - svn co svn+ssh://<login here>@forge.ipsl.jussieu.fr/ipsl/forge/projets/libigcm/svn/trunk/Monitoring/CNClient
60        - compilation (static)
61                - gcc -static -I/usr/local/include -L/usr/local/lib -Wall -o sendAMQPMsg send_AMQP_msg.c -lrabbitmq
62                        - we get warning below during compilation
63                                -
64                                  <---
65                                  /usr/local/lib/librabbitmq.a(librabbitmq_librabbitmq_la-amqp_socket.o): In function `amqp_open_socket':
66                                  rabbitmq-c-rabbitmq-c-v0.3.0/librabbitmq/amqp_socket.c:66: warning: Using 'getaddrinfo' in statically
67                                  linked applications requires at runtime the shared libraries from the glibc version used for linking
68                                  --->
69                                - it means that you may need to be sure all computing node have the same glibc version !!!!
70                                        - also means that a different binary must be use in each computing center
71- usage
72        - to send a message in the queue, do
73                - ./sendAMQPMsg localhost 5672 test
74- note
75        - to show how many messages are in the queue, do as root
76                - ./rabbitmqctl list_queues
Note: See TracBrowser for help on using the repository browser.