ConnectingNodesByHand
From Erlang Community
(Difference between revisions)
| Revision as of 18:59, 10 January 2007 (edit) Patricknharris (Talk | contribs) (3 Node Cluster Example) ← Previous diff |
Revision as of 19:36, 10 January 2007 (edit) (undo) Patricknharris (Talk | contribs) Next diff → |
||
| Line 8: | Line 8: | ||
| # create a shell script (ANodeStart.sh) that contains the following: | # create a shell script (ANodeStart.sh) that contains the following: | ||
| - | + | ## | |
| - | + | ##!/bin/bash | |
| - | + | ||
| - | + | ||
| - | + | ||
| - | + | ||
| - | + | HOSTNAME=`hostname` | |
| - | + | HDNAME=`host ${HOSTNAME} | cut -d ' ' -f 4` | |
| - | + | erl -name ANode@${HDNAME} -setcookie ACookie -mnesia dir '"~/NodeStorage/NodeA"' | |
| + | |||
| + | # cp ANode.sh BNode.sh | ||
| + | # sed -e 's/ANode/BNode/g' ANode.sh > BNode.sh | ||
| + | # sed -e 's/ANode/CNode/g' ANode.sh > CNode.sh | ||
| + | |||
| + | # Each file should now contain something like: | ||
| + | erl (or erl.exe or werl.ex on windows) -name | ||
Revision as of 19:36, 10 January 2007
If you wanted a simple 3 node cluster you could do the following by hand.
- On linux:
- Install erlang somewhere, say /usr/local/otp_NNN
- mkdir NodeStorage; mkdir NodeStorage/ANode; mkdir NodeStorage/BNode
- export ERL_TOP=(erlang install dir, in bash) or setenv ( csh )
- cd $ERL_TOP
- create a shell script (ANodeStart.sh) that contains the following:
- !/bin/bash
HOSTNAME=`hostname`
HDNAME=`host ${HOSTNAME} | cut -d ' ' -f 4`
erl -name ANode@${HDNAME} -setcookie ACookie -mnesia dir '"~/NodeStorage/NodeA"'
- cp ANode.sh BNode.sh
- sed -e 's/ANode/BNode/g' ANode.sh > BNode.sh
- sed -e 's/ANode/CNode/g' ANode.sh > CNode.sh
- Each file should now contain something like:
erl (or erl.exe or werl.ex on windows) -name

Digg It
Del.icio.us
Reddit
Facebook
Stumble Upon
Technorati

