Precautions for Erlang distributed on Linux and Windows

Source: Internet
Author: User

If nothing happens, test Erlang distribution between two machines. One is Windows XP, and the other is redhat9. Without detailed documents, you can find it and record it.

1. First, the implementation of distributed Erlang provides its own security mechanism to prevent unauthorized access to the Erlang system. The Erlang system must have the same magic cookie when interacting with other machines. erlang. in the cookie file, you need to edit one copy to test between two different machines. erlang. cookie, the content is casual, such:
Just_test

Then copy the file to the directory where the Windows environment variable homepath is located, for example, my files are c: \ Documents and Settings \ admin, and Linux copies them to the directory pointed to by the environment variable $ home, for example, I am/root. Note that the. Erlang. Cookie file in Linux needs to be set to-r --------, that is, 400, which is only readable by the Owner:
Chmod 400. Erlang. Cookie

2. because the node name in Erlang is name @ host and host is computer name, you must add the computer name and IP address to the hosts file on both machines, this file is in/etc/hosts in Linux. You can use VI to edit it as follows: <! --

Code highlighting produced by actipro codehighlighter (freeware)

Http://www.CodeHighlighter.com/

--> 127.0.0.1 localhost
X. x Zane # IP address and computer name of the Windows Server

Hosts is in the c: \ windows \ system32 \ drivers \ etc directory of the Windows system. Edit: <! --

Code highlighting produced by actipro codehighlighter (freeware)

Http://www.CodeHighlighter.com/

--> 127.0.0.1 localhost
X. x Dennis # Name and IP address of the Linux machine

3. Step 3: Start the node by running the Erl-sname or Erl-name command. Before that, start the EPMD process, which maps the symbol name to the machine address.
Run the following command on both machines:
EPMD-daemon

4. now that the configuration is complete, you can test whether Erlang distributed programming is between different machines and systems (for example, Erlang entry (iii) -- ping pong in distributed programming) and very cool!

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.