Erlang Central

ConnectingNodesByHand

Revision as of 19:36, 10 January 2007 by GeScript (Talk | contribs)

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:
    1. !/bin/bash
    HOSTNAME=`hostname`
    HDNAME=`host ${HOSTNAME} | cut -d ' ' -f 4`
    erl -name ANode@${HDNAME} -setcookie ACookie -mnesia dir '"~/NodeStorage/NodeA"'
  1. cp ANode.sh BNode.sh
  2. sed -e 's/ANode/BNode/g' ANode.sh > BNode.sh
  3. sed -e 's/ANode/CNode/g' ANode.sh > CNode.sh
  1. Each file should now contain something like:

erl (or erl.exe or werl.ex on windows) -name