INSTALL 7.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201
  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, Debian Lenny, Red Hat Enterprise Linux 5
  16. Solaris: version 10 CSW
  17. BSD: FreeBSD and OpenBSD
  18. MacOSX: Darwin latest update
  19. It should build and run properly on the tested platforms as well as possibly
  20. others with minimal effort. Corosync requires a coherent mmap() system call
  21. and will not operate on platforms which don't support coherent mmap().
  22. Corosync has been tested with recent gcc compilers and Intel's C compiler.
  23. SunStudio compilers fail to build with various internal compiler errors.
  24. ----------------------------
  25. * Building from subversion *
  26. ----------------------------
  27. When building and installing from subversion, automake 2.61 or later is
  28. required. Prior versions will result in build failures.
  29. Step 1: check out a read only copy of the repository
  30. svn checkout http://svn.fedoraprojects.org/svn/corosync
  31. Find the version you want to build. Usually this will be the "trunk" version
  32. located in the trunk directory. If you want to build a specific released
  33. version check in the tags directory.
  34. Step 2: Generate the makefiles
  35. balance:~/corosync/trunk% ./autogen.sh
  36. Step 3: Run the configure script
  37. balance:~/corosync/trunk% ./configure
  38. Step 4: Install the binaries
  39. balance:~/corosync/trunk% su
  40. balance:~/corosync/trunk# make install
  41. -------------------------
  42. * Building from tarball *
  43. -------------------------
  44. The tarball is distributed with pregenerated makefiles. There is no need
  45. to run the autogen.sh script in this case.
  46. Step 1: Run the configure script
  47. balance:~/corosync/trunk% ./configure
  48. Step 2: Install the binaries
  49. balance:~/corosync/trunk% su
  50. balance:~/corosync/trunk# make install
  51. -------------------------------
  52. * A notice about dependencies *
  53. -------------------------------
  54. We have strived very hard to avoid dependencies as much as possible, and in
  55. fact corosync can be compiled without any dependencies. The one optional
  56. dependency corosync has today is the nss package when built with support for
  57. nss encryption. NSS encryption performs more poorly then the default
  58. encryption, but may be a good choice if your organization has policies
  59. regarding encryption technology requiring the use of a common cryptographic
  60. 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. * Configuring Corosync *
  72. ------------------------
  73. The corosync executive will automatically determine cluster membership by
  74. communicating on a specified multicast address and port.
  75. The directory conf contains the file corosync.conf.example
  76. # Please read the corosync.conf.5 manual page
  77. totem {
  78. version: 2
  79. secauth: off
  80. threads: 0
  81. interface {
  82. ringnumber: 0
  83. bindnetaddr: 192.168.1.1
  84. mcastaddr: 226.94.1.1
  85. mcastport: 5405
  86. }
  87. }
  88. logging {
  89. fileline: off
  90. to_stderr: yes
  91. to_file: yes
  92. to_syslog: yes
  93. logfile: /tmp/corosync.log
  94. debug: off
  95. timestamp: on
  96. }
  97. The totem section contains three values. All three values must be set
  98. or the corosync executive wll exit with an error.
  99. bindnetaddr specifies the address which the corosync Executive should bind to.
  100. This address should always end in zero. If the local interface taffic
  101. should routed over is 192.168.5.92, set bindnetaddr to 192.168.5.0.
  102. mcastaddr is a multicast address. The default should work but you may have
  103. a different network configuration. Avoid 224.x.x.x because this is a "config"
  104. multicast address.
  105. mcastport specifies the UDP port number. It is possible to use the same
  106. multicast address on a network with the corosync services configured for
  107. different UDP ports.
  108. The timeout section contains seven values. This section is not normally used,
  109. but rather used to override the program defaults for the purposes of fine
  110. tuning for a given networking/processor combination or for debugging purposes.
  111. Be careful to use the same timeout values on each of the nodes in the cluster
  112. or unpredictable results may occur.
  113. Do not use DOS style termination. This breaks the parser.
  114. Generate a private key
  115. ----------------------
  116. corosync uses cryptographic techniques to ensure authenticity and privacy of
  117. messages. A private key must be generated and shared by all processors for
  118. correct operation.
  119. First generate the key on one of the nodes:
  120. balance# corosync-keygen
  121. Corosync Authentication key generator.
  122. Gathering 1024 bits for key from /dev/random.
  123. Writing corosync key to /etc/ais/authkey.
  124. After this is complete, a private key will be in the file /etc/ais/authkey.
  125. This private key must be copied to every processor that will be a member of
  126. the cluster. If the private key isn't the same for every node, those nodes
  127. with nonmatching private keys will not be able to join the same configuration.
  128. Copy the key to some transportable storage or use ssh to transmit the key
  129. from node to node. Then install the key with the command:
  130. balance# install -D --group=0 --owner=0 --mode=0400 /path_to_authkey/authkey /etc/ais/authkey
  131. If the message invalid digest appears, the keys are not the same on each node.
  132. Run the corosync executive
  133. -------------------------
  134. Get one or more nodes and run the corosync executive on each node. Run the
  135. corosync daemon after following the previous directions. The daemon must be
  136. run as UID 0(root).
  137. please read SECURITY to understand the threat model assumed by corosync
  138. and the techniques corosync use to overcome these threats.
  139. Before running any of the test programs
  140. ---------------------------------------
  141. The corosync executive will ensure security by only allowing the UID 0(root) or
  142. GID 0(root) to connect to it. To allow other users to access the corosync
  143. executive, create a directory called /etc/corosync/uidgid.d and place a file in
  144. it named in some way that is identifiable to you. All files in this directory
  145. will be scanned and their contents added to the allowed uid gid database. The
  146. contents of this file should be
  147. uidgid {
  148. uid: username
  149. gid: groupname
  150. }
  151. Please note that these users then have full ability to transmit and receive
  152. messages in the cluster and are not bound by the threat model described in
  153. SECURITY.
  154. Try out the corosync cpg functionality
  155. --------------------------------------
  156. After corosync is running
  157. Run test/testcpg on multiple nodes or on the same node. Messages can be typed
  158. which will then be sent to other testcpg applications in the cluster.
  159. To see a hashed verified output of data on all nodes, test/cpgverify can be
  160. run.