Blob Blame History Raw
:compat-mode: legacy
= Installing Cluster Software =

== Installing the Software ==

Most major Linux distributions have pacemaker packages in their standard
package repositories, or the software can be built from source code.
See the http://clusterlabs.org/wiki/Install[Install wiki page] for details.

== Enabling Pacemaker ==

=== Enabling Pacemaker For Corosync version 2 and greater ===

High-level cluster management tools are available that can configure
corosync for you. This document focuses on the lower-level details
if you want to configure corosync yourself.

Corosync configuration is normally located in
+/etc/corosync/corosync.conf+.

.Corosync configuration file for two nodes *myhost1* and *myhost2*
====
----
totem {
version: 2
secauth: off
cluster_name: mycluster
transport: udpu
}

nodelist {
  node {
        ring0_addr: myhost1
        nodeid: 1
       }
  node {
        ring0_addr: myhost2
        nodeid: 2
       }
}

quorum {
provider: corosync_votequorum
two_node: 1
}

logging {
to_syslog: yes
}
----
====

.Corosync configuration file for three nodes *myhost1*, *myhost2* and *myhost3*
====
----
totem {
version: 2
secauth: off
cluster_name: mycluster
transport: udpu
}

nodelist {
  node {
        ring0_addr: myhost1
        nodeid: 1
       }
  node {
        ring0_addr: myhost2
        nodeid: 2
       }
  node {
        ring0_addr: myhost3
        nodeid: 3
       }
}

quorum {
provider: corosync_votequorum

}

logging {
to_syslog: yes
}
----
====

In the above examples, the +totem+ section defines what protocol version and
options (including encryption) to use,
footnote:[
Please consult the Corosync website (http://www.corosync.org/) and
documentation for details on enabling encryption and peer authentication for
the cluster.
]
and gives the cluster a unique name (+mycluster+ in these examples).

The +node+ section lists the nodes in this cluster.

The +quorum+ section defines how the cluster uses quorum.
The important thing is that two-node clusters must be handled specially,
so +two_node: 1+ must be defined for two-node clusters (and only for two-node
clusters).

The +logging+ section should be self-explanatory.