INSTALL 7.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202
  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. The one optional
  57. dependency corosync has today is the nss package when built with support for
  58. nss encryption. NSS encryption performs more poorly then the default
  59. encryption, but may be a good choice if your organization has policies
  60. regarding encryption technology requiring the use of a common cryptographic
  61. library such as Netscape Security Services.
  62. To enable nss during building:
  63. balance:~/corosync/trunk% ./configure --enable-nss
  64. To disable nss during buildling:
  65. balance:~/corosync/trunk% ./configure --disable-nss
  66. The nss packages required to build corosync with nss support can usually be
  67. found by installing the "nss-devel" and "nspr-devel" packages for your
  68. distribution. Note nss is enabled by default, so if you don't want nss support
  69. or don't want to install nss devel packages, make sure to set the appropriate
  70. configure option as described above.
  71. ------------------------
  72. * Configuring Corosync *
  73. ------------------------
  74. The corosync executive will automatically determine cluster membership by
  75. communicating on a specified multicast address and port.
  76. The directory conf contains the file corosync.conf.example
  77. # Please read the corosync.conf.5 manual page
  78. totem {
  79. version: 2
  80. secauth: off
  81. threads: 0
  82. interface {
  83. ringnumber: 0
  84. bindnetaddr: 192.168.1.1
  85. mcastaddr: 226.94.1.1
  86. mcastport: 5405
  87. }
  88. }
  89. logging {
  90. fileline: off
  91. to_stderr: yes
  92. to_file: yes
  93. to_syslog: yes
  94. logfile: /tmp/corosync.log
  95. debug: off
  96. timestamp: on
  97. }
  98. The totem section contains three values. All three values must be set
  99. or the corosync executive wll exit with an error.
  100. bindnetaddr specifies the address which the corosync Executive should bind to.
  101. This address should always end in zero. If the local interface taffic
  102. should routed over is 192.168.5.92, set bindnetaddr to 192.168.5.0.
  103. mcastaddr is a multicast address. The default should work but you may have
  104. a different network configuration. Avoid 224.x.x.x because this is a "config"
  105. multicast address.
  106. mcastport specifies the UDP port number. It is possible to use the same
  107. multicast address on a network with the corosync services configured for
  108. different UDP ports.
  109. The timeout section contains seven values. This section is not normally used,
  110. but rather used to override the program defaults for the purposes of fine
  111. tuning for a given networking/processor combination or for debugging purposes.
  112. Be careful to use the same timeout values on each of the nodes in the cluster
  113. or unpredictable results may occur.
  114. Do not use DOS style termination. This breaks the parser.
  115. Generate a private key
  116. ----------------------
  117. corosync uses cryptographic techniques to ensure authenticity and privacy of
  118. messages. A private key must be generated and shared by all processors for
  119. correct operation.
  120. First generate the key on one of the nodes:
  121. balance# corosync-keygen
  122. Corosync Authentication key generator.
  123. Gathering 1024 bits for key from /dev/random.
  124. Writing corosync key to /etc/ais/authkey.
  125. After this is complete, a private key will be in the file /etc/ais/authkey.
  126. This private key must be copied to every processor that will be a member of
  127. the cluster. If the private key isn't the same for every node, those nodes
  128. with nonmatching private keys will not be able to join the same configuration.
  129. Copy the key to some transportable storage or use ssh to transmit the key
  130. from node to node. Then install the key with the command:
  131. balance# install -D --group=0 --owner=0 --mode=0400 /path_to_authkey/authkey /etc/ais/authkey
  132. If the message invalid digest appears, the keys are not the same on each node.
  133. Run the corosync executive
  134. -------------------------
  135. Get one or more nodes and run the corosync executive on each node. Run the
  136. corosync daemon after following the previous directions. The daemon must be
  137. run as UID 0(root).
  138. please read SECURITY to understand the threat model assumed by corosync
  139. and the techniques corosync use to overcome these threats.
  140. Before running any of the test programs
  141. ---------------------------------------
  142. The corosync executive will ensure security by only allowing the UID 0(root) or
  143. GID 0(root) to connect to it. To allow other users to access the corosync
  144. executive, create a directory called /etc/corosync/uidgid.d and place a file in
  145. it named in some way that is identifiable to you. All files in this directory
  146. will be scanned and their contents added to the allowed uid gid database. The
  147. contents of this file should be
  148. uidgid {
  149. uid: username
  150. gid: groupname
  151. }
  152. Please note that these users then have full ability to transmit and receive
  153. messages in the cluster and are not bound by the threat model described in
  154. SECURITY.
  155. Try out the corosync cpg functionality
  156. --------------------------------------
  157. After corosync is running
  158. Run test/testcpg on multiple nodes or on the same node. Messages can be typed
  159. which will then be sent to other testcpg applications in the cluster.
  160. To see a hashed verified output of data on all nodes, test/cpgverify can be
  161. run.