INSTALL 5.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173
  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. * Building from subversion *
  13. ----------------------------
  14. When building and installing from subversion, automake 2.61 or later is
  15. required. Prior versions will result in build failures.
  16. Step 1: check out a read only copy of the repository
  17. svn checkout http://svn.fedoraprojects.org/svn/corosync
  18. Find the version you want to build. Usually this will be the "trunk" version
  19. located in the trunk directory. If you want to build a specific released
  20. version check in the tags directory.
  21. Step 2: Generate the makefiles
  22. balance:~/corosync/trunk% ./autogen.sh
  23. Step 3: Run the configure script
  24. balance:~/corosync/trunk% ./configure
  25. Step 4: Install the binaries
  26. balance:~/corosync/trunk% su
  27. balance:~/corosync/trunk# make install
  28. -------------------------
  29. * Building from tarball *
  30. -------------------------
  31. The tarball is distributed with pregenerated makefiles. There is no need
  32. to run the autogen.sh script in this case.
  33. Step 1: Run the configure script
  34. balance:~/corosync/trunk% ./configure
  35. Step 2: Install the binaries
  36. balance:~/corosync/trunk% su
  37. balance:~/corosync/trunk# make install
  38. ------------------------
  39. * Configuring Corosync *
  40. ------------------------
  41. The corosync executive will automatically determine cluster membership by
  42. communicating on a specified multicast address and port.
  43. The directory conf contains the file corosync.conf.example
  44. # Please read the corosync.conf.5 manual page
  45. totem {
  46. version: 2
  47. secauth: off
  48. threads: 0
  49. interface {
  50. ringnumber: 0
  51. bindnetaddr: 192.168.1.1
  52. mcastaddr: 226.94.1.1
  53. mcastport: 5405
  54. }
  55. }
  56. logging {
  57. fileline: off
  58. to_stderr: yes
  59. to_file: yes
  60. to_syslog: yes
  61. logfile: /tmp/corosync.log
  62. debug: off
  63. timestamp: on
  64. }
  65. The totem section contains three values. All three values must be set
  66. or the corosync executive wll exit with an error.
  67. bindnetaddr specifies the address which the corosync Executive should bind to.
  68. This address should always end in zero. If the local interface taffic
  69. should routed over is 192.168.5.92, set bindnetaddr to 192.168.5.0.
  70. mcastaddr is a multicast address. The default should work but you may have
  71. a different network configuration. Avoid 224.x.x.x because this is a "config"
  72. multicast address.
  73. mcastport specifies the UDP port number. It is possible to use the same
  74. multicast address on a network with the corosync services configured for
  75. different UDP ports.
  76. The timeout section contains seven values. This section is not normally used,
  77. but rather used to override the program defaults for the purposes of fine
  78. tuning for a given networking/processor combination or for debugging purposes.
  79. Be careful to use the same timeout values on each of the nodes in the cluster
  80. or unpredictable results may occur.
  81. Do not use DOS style termination. This breaks the parser.
  82. Configure Host
  83. --------------
  84. For security reasons, corosync only allows a process that had the EGID/GID
  85. of "ais" to connect to it. To make development easier, it is recommended to
  86. create an "ais" user with the "ais" group.
  87. [root@balance root]# adduser ais -g ais
  88. Set the ais user's password:
  89. [root@balance root]# passwd ais
  90. Changing password for user ais.
  91. New password:
  92. Retype new password:
  93. passwd: all authentication tokens updated successfully.
  94. Generate a private key
  95. ----------------------
  96. corosync uses cryptographic techniques to ensure authenticity and privacy of
  97. messages. A private key must be generated and shared by all processors for
  98. correct operation.
  99. First generate the key on one of the nodes:
  100. unix# exec/keygen
  101. Corosync Authentication key generator.
  102. Gathering 1024 bits for key from /dev/random.
  103. Writing corosync key to /etc/ais/authkey.
  104. After this is complete, a private key will be in the file /etc/ais/authkey.
  105. This private key must be copied to every processor that will be a member of
  106. the cluster. If the private key isn't the same for every node, those nodes
  107. with nonmatching private keys will not be able to join the same configuration.
  108. Copy the key to some transportable storage or use ssh to transmit the key
  109. from node to node. Then install the key with the command:
  110. unix# install -D --group=0 --owner=0 --mode=0400 /path_to_authkey/authkey /etc/ais/authkey
  111. If the message invalid digest appears, the keys are not the same on each node.
  112. Run the corosync executive
  113. -------------------------
  114. Get one or more nodes and run the corosync executive on each node. A list of
  115. node IPs should be logged when the nodes join a configuration. Run the
  116. corosync daemon after following the previous directions. The daemon must be
  117. run as UID 0(root).
  118. please read SECURITY to understand the threat model assumed by corosync
  119. and the techniques corosync use to overcome these threats.
  120. Before running any of the test programs
  121. ---------------------------------------
  122. The corosync executive will ensure security by only allowing the ais group (or
  123. uid root) to connect to the service. Switch to the ais group before
  124. running any applications linked to the ais apis, or the applications will
  125. not be authenticated and won't be able to access services.
  126. [sdake@balance sdake]$ su ais
  127. Password:
  128. [ais@balance sdake]$ id
  129. uid=501(ais) gid=502(ais) groups=502(ais)
  130. Try out the corosync cpg functionality
  131. --------------------------------------
  132. After corosync is running
  133. su to ais user
  134. Run test/testcpg on multiple nodes or on the same node. Messages can be typed
  135. which will then be sent to other testcpg applications in the cluster.