NexTalk服务器安装指南(Windows版)

文档版本: 5.7 发布时间: 2014/10/15

简介(Introduction)

**NexTalk***是基于WEB标准协议设计的,主要应用于WEB站点的,简单开放的即时消息系统。可快速为社区微博、电子商务、企业应用集成即时消息服务。

NexTalk架构设计上分离为 WebIM业务服务器 + 消息路由服务器 两个独立部分。消息服务器由Erlang语言开发,基于JSONP、WebSocket、MQTT等协议设计,可⾼效率、⽔平扩展⽀持⼤规模并发连接用户。

NexTalk消息服务器⽀持在各版本的freebsd云主机或服务器上安装部署。本⽂档介绍说明安装、配置、管理和卸载过程。

安装 (Installation)

NexTalk消息服务器安装包名称由:操作系统、32/64位、版本号、发布时间组成。例如Windows通用版本安装包名称为:

nextalk-win42-5.4-20140409.zip

下载安装包后,可直接解压到安装⺫录。

配置 (Configuration)

配置文件etc/app.config(UltraEdit之类编辑器打开),设置下述参数:

参数 说明
$SERVER 消息服务器的外⺴IP或域名。用户浏览器通过该地址与消息服务器建立WebSocket连接
$DOMAIN 网站WebIM插件与消息服务器通信的Domain
$APIKEY 网站WebIM插件与消息服务器通信的APIKEY
$ADMINSECRET 消息服务器的后台管理控制台登录密码

调试 (Debug)


#调试模式控制台启动,会弹出控制台窗口

.\bin\nextalk console

控制台显示:


|\      |         -------
| \     |            |
|  \    | |--- \   / |     /\     |    |  /
|   \   | |     \ /  |    /  \    |    | /
|    \  | |---   \   |   /----\   |    |/
|     \ | |     / \  |  /      \  |    |\
|      \| |--- /   \ | /        \ |--- | \

NexTalk PubSub is starting...[done]
NexTalk Router is starting...[done]
NexTalk Auth is starting...[done]
NexTalk Roster is starting...[done]
NexTalk GrpChat is starting...[done]
NexTalk Chatting is starting...[done]
NexTalk Meter is starting...[done]
NexTalk Endpoint Supervisor is starting...[done]
NexTalk Httpd is listening on 8080
NexTalk Broker 5.6 is running now
NexTalk Admin is listening on 8010
Eshell V5.10.4  (abort with ^G)

注意:启动如果报错提⽰缺少dll库,请安装bin\vcredist_x86.exe动态链接库。

启动 (Startup)

Windows Command命令行窗口,执行:

#注册Windows服务

.\bin\nextalk install

#正式启动运⾏

.\bin\nextalk start

成功显示:


nextalk is started successfully!

管理 (Admin)


#查询服务器运⾏状态

.\bin\nextalkctl status 

成功显示:

Node nextalk@airlee is started.
Running applications: [{nextalk_admin,"NexTalk Admin Console","1.0"},
                       {nextalk,"NexTalk Broker","5.6"},
                       {erlydtl,"Django Template Language for Erlang",
                                "0.9.2-12-g25d632f"},
                       {merl,"Metaprogramming in Erlang","0"},
                       {cowboy,"Small, fast, modular HTTP server.","0.8.6"},
                       {ranch,"Socket acceptor pool for TCP protocols.",
                              "0.8.5"},
                       {folsom,[],"0.7.4-32-gc6446fe"},
                       {elog,"elog","2.1"},
                       {lager,"Erlang logging framework","2.0.0"},
                       {compiler,"ERTS  CXC 138 10","4.9.4"},
                       {inets,"INETS  CXC 138 49","5.9.8"},
                       {os_mon,"CPO  CXC 138 46","2.2.14"},
                       {appmon,"DEVTOOLS  CXC 138 16","2.1.14.2"},
                       {xmerl,"XML parser","1.3.6"},
                       {mnesia,"MNESIA  CXC 138 12","4.11"},
                       {ssl,"Erlang/OTP SSL application","5.3.3"},
                       {syntax_tools,"Syntax tools","1.6.13"},
                       {public_key,"Public key infrastructure","0.21"},
                       {crypto,"CRYPTO version 2","3.2"},
                       {asn1,"The Erlang ASN1 compiler version 2.0.4","2.0.4"},
                       {sasl,"SASL  CXC 138 11","2.3.4"},
                       {stdlib,"ERTS  CXC 138 10","1.19.4"},
                       {kernel,"ERTS  CXC 138 10","2.16.4"}] 

停止 (Stop)


#停⽌进程

.\bin\nextalk stop

卸载 (Uninstall)


#卸载windows服务

.\bin\nextalk uninstall

后直接删除程序⺫录。