您的位置:首页 > 其它

erlang 自定义dns文件和Hosts文件

2016-02-18 15:12 197 查看

参考文档

http://erlang.org/doc/apps/erts/inet_cfg.html

使用方法

在命令行加入参数

erl -sname my_node -kernel inetrc '"./cfg_files/erl_inetrc"'


inetrc文件配置

%% -- ERLANG INET CONFIGURATION FILE --
%% read the hosts file
{file, hosts, "/etc/hosts"}.
%% add a particular host
{host, {134,138,177,105}, ["finwe"]}.
%% do not monitor the hosts file
{hosts_file, ""}.
%% read and monitor nameserver config from here
{resolv_conf, "/usr/local/etc/resolv.conf"}.
%% enable EDNS
{edns,0}.
%% disable caching
{cache_size, 0}.
%% specify lookup method
{lookup, [file, dns]}.
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: