4
0

INSTALL 8.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239
  1. ----------------------------------------------
  2. The Corosync Cluster Engine Installation Guide
  3. ----------------------------------------------
  4. Please read LICENSE for a description of the licensing of this software.
  5. All cryptographic software in this package is subject to the following legal
  6. notice:
  7. This package includes publicly available encryption source code which,
  8. together with object code resulting from the compiling of publicly
  9. available source code, may be exported from the United States under License
  10. Exception TSU prsuant to 15 C.F.R Section 740.13(e).
  11. ---------------------------------
  12. * Platforms Built and Tested On *
  13. ---------------------------------
  14. Corosync has been tested on:
  15. Linux: Fedora 11, Fedora 12 (rawhide), Debian Lenny, Debian Unstable,
  16. Ubuntu Hardy, Red Hat Enterprise Linux 5
  17. Solaris: version 10 CSW
  18. BSD: FreeBSD and OpenBSD
  19. MacOSX: Darwin latest update
  20. It should build and run properly on the tested platforms as well as possibly
  21. others with minimal effort. Corosync requires a coherent mmap() system call
  22. and will not operate on platforms which don't support coherent mmap().
  23. Corosync has been tested with recent gcc compilers and Intel's C compiler.
  24. SunStudio compilers fail to build with various internal compiler errors.
  25. ----------------------------
  26. * Building from subversion *
  27. ----------------------------
  28. When building and installing from subversion, automake 2.61 or later is
  29. required. Prior versions will result in build failures.
  30. Step 1: check out a read only copy of the repository
  31. svn checkout http://svn.fedoraprojects.org/svn/corosync
  32. Find the version you want to build. Usually this will be the "trunk" version
  33. located in the trunk directory. If you want to build a specific released
  34. version check in the tags directory.
  35. Step 2: Generate the makefiles
  36. balance:~/corosync/trunk% ./autogen.sh
  37. Step 3: Run the configure script
  38. balance:~/corosync/trunk% ./configure
  39. Step 4: Install the binaries
  40. balance:~/corosync/trunk% su
  41. balance:~/corosync/trunk# make install
  42. -------------------------
  43. * Building from tarball *
  44. -------------------------
  45. The tarball is distributed with pregenerated makefiles. There is no need
  46. to run the autogen.sh script in this case.
  47. Step 1: Run the configure script
  48. balance:~/corosync/trunk% ./configure
  49. Step 2: Install the binaries
  50. balance:~/corosync/trunk% su
  51. balance:~/corosync/trunk# make install
  52. -------------------------------
  53. * A notice about dependencies *
  54. -------------------------------
  55. We have strived very hard to avoid dependencies as much as possible, and in
  56. fact corosync can be compiled without any dependencies.
  57. Optional dependencies are support for NSS and support for Infiniband RDMA.
  58. NSS encryption performs more poorly then the default encryption, but may be
  59. a good choice if your organization has policies regarding encryption technology
  60. requiring the use of a common cryptographic library such as Netscape Security Services.
  61. To enable nss during building:
  62. balance:~/corosync/trunk% ./configure --enable-nss
  63. To disable nss during buildling:
  64. balance:~/corosync/trunk% ./configure --disable-nss
  65. The nss packages required to build corosync with nss support can usually be
  66. found by installing the "nss-devel" and "nspr-devel" packages for your
  67. distribution. Note nss is enabled by default, so if you don't want nss support
  68. or don't want to install nss devel packages, make sure to set the appropriate
  69. configure option as described above.
  70. -----------------------------------------
  71. * Building with Infiniband RDMA support *
  72. -----------------------------------------
  73. Infiniband RDMA build support is disabled by default. To enable rdma during
  74. building:
  75. balance:~/corosync/trunk% ./configure --enable-rdma
  76. Infiniband rdma support requires the libibverbs and librdmacm packages (and
  77. their -devel counterparts). Corosync requires the use of pkgconfig in these
  78. packages. The Corosync maintainers have sent patches for this feature upstream
  79. to the Infiniband maintainers.
  80. If your version of these packages don't have pkgconfig support, you will see an
  81. error during configure such as:
  82. checking for ibverbs... configure: error: Package requirements (ibverbs) were not met:
  83. No package 'ibverbs' found
  84. Consider adjusting the PKG_CONFIG_PATH environment variable if you
  85. installed software in a non-standard prefix.
  86. Alternatively, you may set the environment variables ibverbs_CFLAGS
  87. and ibverbs_LIBS to avoid the need to call pkg-config.
  88. See the pkg-config man page for more details.
  89. ** Follow the directions:
  90. balance:~/corosync/trunk% export ibverbs_CFLAGS=-I/usr/include/infiniband
  91. balance:~/corosync/trunk% export ibverbs_LIBS=-libverbs
  92. balance:~/corosync/trunk% export rdmacm_CFLAGS=-I/usr/include/rdma
  93. balance:~/corosync/trunk% export rdmacm_LIBS=-lrdmacm
  94. balance:~/corosync/trunk% ./configure --enable-rdma
  95. Hopefully pkgconfig support is added in your distribution's version of
  96. libibverbs and librdmacm soon if you run into this problem.
  97. ------------------------
  98. * Configuring Corosync *
  99. ------------------------
  100. The corosync executive will automatically determine cluster membership by
  101. communicating on a specified multicast address and port.
  102. The directory conf contains the file corosync.conf.example
  103. # Please read the corosync.conf.5 manual page
  104. totem {
  105. version: 2
  106. secauth: off
  107. threads: 0
  108. interface {
  109. ringnumber: 0
  110. bindnetaddr: 192.168.1.1
  111. mcastaddr: 226.94.1.1
  112. mcastport: 5405
  113. }
  114. }
  115. logging {
  116. fileline: off
  117. to_stderr: yes
  118. to_file: yes
  119. to_syslog: yes
  120. logfile: /tmp/corosync.log
  121. debug: off
  122. timestamp: on
  123. }
  124. The totem section contains three values. All three values must be set
  125. or the corosync executive wll exit with an error.
  126. bindnetaddr specifies the address which the corosync Executive should bind to.
  127. This address should always end in zero. If the local interface taffic
  128. should routed over is 192.168.5.92, set bindnetaddr to 192.168.5.0.
  129. mcastaddr is a multicast address. The default should work but you may have
  130. a different network configuration. Avoid 224.x.x.x because this is a "config"
  131. multicast address.
  132. mcastport specifies the UDP port number. It is possible to use the same
  133. multicast address on a network with the corosync services configured for
  134. different UDP ports.
  135. The timeout section contains seven values. This section is not normally used,
  136. but rather used to override the program defaults for the purposes of fine
  137. tuning for a given networking/processor combination or for debugging purposes.
  138. Be careful to use the same timeout values on each of the nodes in the cluster
  139. or unpredictable results may occur.
  140. Do not use DOS style termination. This breaks the parser.
  141. Generate a private key
  142. ----------------------
  143. corosync uses cryptographic techniques to ensure authenticity and privacy of
  144. messages. A private key must be generated and shared by all processors for
  145. correct operation.
  146. First generate the key on one of the nodes:
  147. balance# corosync-keygen
  148. Corosync Authentication key generator.
  149. Gathering 1024 bits for key from /dev/random.
  150. Writing corosync key to /etc/ais/authkey.
  151. After this is complete, a private key will be in the file /etc/ais/authkey.
  152. This private key must be copied to every processor that will be a member of
  153. the cluster. If the private key isn't the same for every node, those nodes
  154. with nonmatching private keys will not be able to join the same configuration.
  155. Copy the key to some transportable storage or use ssh to transmit the key
  156. from node to node. Then install the key with the command:
  157. balance# install -D --group=0 --owner=0 --mode=0400 /path_to_authkey/authkey /etc/ais/authkey
  158. If the message invalid digest appears, the keys are not the same on each node.
  159. Run the corosync executive
  160. -------------------------
  161. Get one or more nodes and run the corosync executive on each node. Run the
  162. corosync daemon after following the previous directions. The daemon must be
  163. run as UID 0(root).
  164. please read SECURITY to understand the threat model assumed by corosync
  165. and the techniques corosync use to overcome these threats.
  166. Before running any of the test programs
  167. ---------------------------------------
  168. The corosync executive will ensure security by only allowing the UID 0(root) or
  169. GID 0(root) to connect to it. To allow other users to access the corosync
  170. executive, create a directory called /etc/corosync/uidgid.d and place a file in
  171. it named in some way that is identifiable to you. All files in this directory
  172. will be scanned and their contents added to the allowed uid gid database. The
  173. contents of this file should be
  174. uidgid {
  175. uid: username
  176. gid: groupname
  177. }
  178. Please note that these users then have full ability to transmit and receive
  179. messages in the cluster and are not bound by the threat model described in
  180. SECURITY.
  181. Try out the corosync cpg functionality
  182. --------------------------------------
  183. After corosync is running
  184. Run test/testcpg on multiple nodes or on the same node. Messages can be typed
  185. which will then be sent to other testcpg applications in the cluster.
  186. To see a hashed verified output of data on all nodes, test/cpgverify can be
  187. run.