您的位置:首页 > 编程语言 > Qt开发

emqttd--------mqttd-benchmark-------Erlang安装

2016-08-03 09:52 267 查看
1.linux的emqttd的安装进入控制台调试模式启动,检查emqttd是否可正常启动:下载安装解压包  用ls cd 命令进入安装目录输入unzip emqttd-ubuntu64-1.1.2-beta-20160630.zip进入emqttd控制台调试模式启动,检查emqttd是否可正常启动:
./bin/emqttd console
emqttd消息服务器如启动正常,控制台输出:
starting emqttd on node 'emqttd@127.0.0.1'
emqttd ctl is starting...[done]
emqttd trace is starting...[done]
emqttd pubsub is starting...[done]
emqttd stats is starting...[done]
emqttd metrics is starting...[done]
emqttd retainer is starting...[done]
emqttd pooler is starting...[done]
emqttd client manager is starting...[done]
emqttd session manager is starting...[done]
emqttd session supervisor is starting...[done]
emqttd broker is starting...[done]
emqttd alarm is starting...[done]
emqttd mod supervisor is starting...[done]
emqttd bridge supervisor is starting...[done]
emqttd access control is starting...[done]
emqttd system monitor is starting...[done]
http listen on 0.0.0.0:18083 with 4 acceptors.
mqtt listen on 0.0.0.0:1883 with 16 acceptors.
mqtts listen on 0.0.0.0:8883 with 4 acceptors.
http listen on 0.0.0.0:8083 with 4 acceptors.
Erlang MQTT Broker 1.1 is running now
Eshell V6.4  (abort with ^G)
(emqttd@127.0.0.1)1>
CTRL+c关闭控制台。守护进程模式启动:4000
./bin/emqttd start
启动日志输出在log/emqttd_sasl.log文件。
emqttd消息服务器进程状态查询:
./bin/emqttd_ctl status
正常运行状态,查询命令返回:
$ ./bin/emqttd_ctl status
Node 'emqttd@127.0.0.1' is started
emqttd 1.1 is running
emqttd消息服务器提供了状态监控URL:
http://localhost:8083/status
停止服务器:
./bin/emqttd stop
2.下面最难的是安装Erlang
虽然你百度到很多Erlang的安装  但是这个安装对于emqtt-benchmark的安装有影响,本人亲测按照其他安装成功Erlang但是benchmark却安装不上去  这个闪由于Erlang有好多配置依赖文件
进入到/etc/apt/sources.list 文件 在文件末尾添加 如下三行 或者其中一行 在终端里面用nano+文件名打开文件添加
deb http://packages.erlang-solutions.com/ubuntu trusty contrib
deb http://packages.erlang-solutions.com/ubuntu saucy contrib
deb http://packages.erlang-solutions.com/ubuntu precise contrib 
在终端里面用nano
决定安装谁,终端里面输入如下命令  如果想偷懒  上面三个网站全部添加
lsb_release -c 
进入到/etc/apt/sources.list 文件 在文件末尾添
运行如下两个命令 成功更新/etc/apt/sources.list 文件
wget http://packages.erlang-solutions.com/ubuntu/erlang_solutions.asc
sudo apt-key add erlang_solutions.asc
运行如下两个两个命令
sudo apt-get update
sudo apt-get install erlang
安装成功输入erl   有如下显示 即安装成功
Erlang/OTP 19 [erts-8.0] [source] [64-bit] [async-threads:10] [hipe] [kernel-poll:false]

Eshell V8.0  (abort with ^G)
1> 
3.安装emqtt-benchmark  
进入如下网页下载http://github.com/emqtt/emqtt_benchmark
下载到linux系统里面 让后unzip解压  然后ls cd 进入解压目录
输入make 显示如下 即安装成功
==> goldrush (get-deps)
==> lager (get-deps)
==> gen_logger (get-deps)
==> getopt (get-deps)
==> emqttc (get-deps)
==> emqtt_benchmark-master (get-deps)
==> goldrush (compile)
==> lager (compile)
==> gen_logger (compile)
==> getopt (compile)
==> emqttc (compile)
==> emqtt_benchmark-master (compile)
==> emqtt_benchmark-master (xref)
参考如下三个网站   http://docs.emqtt.cn/zh_CN/latest/install.html  http://stackoverflow.com/questions/27215936/how-to-upgrade-the-erlang-version-on-ubuntu-r14b04-to-latest-stable-version  https://github.com/emqtt/emqtt_benchmark 
                                            
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签:  Erlang e emqttd emq