erl - Location Transparency 真的很好 !!
参考:
http://www.ibm.com/developerworks/cn/aix/library/au-learning_erlang/index.html
http://guibin.iteye.com/blog/935033
a. 安装好 两台 erlang
b.形成 cookie 文件
tc195$> echo "test" > test ; chmod 400 test
tc196$> echo "test" > test ; chmod 400 test
tc227$> echo "test" > test ; chmod 400 test
c. 运行 起 lt 服务
tc195$> erl -name tc195@10.11.156.195 -setcookie test
tc196$> erl -name tc195@10.11.156.196 -setcookie test
d. tc227$> erl -name tc227@10.11.156.227 -setcookie test
(tc227@10.11.156.227)7> net_adm:ping('tc196@10.11.156.196').
(tc227@10.11.156.227)6> net_adm:ping('tc195@10.11.156.195').
(tc227@10.11.156.227)8> nodes().
['tc195@10.11.156.195','tc196@10.11.156.196']
(tc227@10.11.156.227)5> rpc:call('tc195@10.11.156.195', os, cmd, ['uname -a']).
>> "Linux tc196 2.6.18-194.el5xen #1 SMP Tue Mar 16 22:01:26 EDT 2010 x86_64 x86_64 x86_64 GNU/Linux\n"
阅读(707) | 评论(0) | 转发(0) |