Erlang Central

ConnectingNodesByHand

Revision as of 18:59, 10 January 2007 by GeScript (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

If you wanted a simple 3 node cluster you could do the following by hand.

  1. On linux:
  1. Install erlang somewhere, say /usr/local/otp_NNN
  2. mkdir NodeStorage; mkdir NodeStorage/ANode; mkdir NodeStorage/BNode
  3. export ERL_TOP=(erlang install dir, in bash) or setenv ( csh )
  4. cd $ERL_TOP
  1. create a shell script (ANodeStart.sh) that contains the following:

\# \#!/bin/bash \# Start Node A HOSTNAME=`hostname` HDNAME=`host ${HOSTNAME} | cut -d ' ' -f 4` erl -name ANode@${HDNAME} -setcookie ACookie -mnesia dir '"~/NodeStorage/NodeA"'

5) cp ANode.sh BNode.sh 6) sed -e 's/ANode/BNode/g' ANode.sh > BNode.sh 7)