作者:用户geafr1kx8g | 来源:互联网 | 2023-07-21 06:02
个人笔记,不喜请饶路
emq是采用erlang语言开发的MQ消息服务器,安装前先安装erlang环境支持
yum install erlang -y
1、下载
[root@test src]# wget -c https://www.emqx.cn/downloads/broker/v4.2.7/emqx-centos7-4.2.7-x86_64.zip
2、解压、启动
[root@test src]# unzip emqx-centos7-4.2.7-x86_64.zip -d /usr/local/
[root@test src]# cd /usr/local/emqx/
[root@test emqx]# ll
total 4
drwxr-xr-x 2 root root 324 Jan 29 13:52 bin
drwxr-xr-x 5 root root 94 Jan 29 13:52 data
drwxr-xr-x 7 root root 65 Jan 29 13:52 erts-10.7
drwxr-xr-x 5 root root 135 Jan 29 13:52 etc
drwxr-xr-x 84 root root 4096 Jan 29 13:52 lib
drwxr-xr-x 2 root root 6 Jan 29 13:51 log
drwxr-xr-x 3 root root 90 Jan 29 13:52 releases
[root@test emqx]# cd bin/
[root@test bin]# ./emqx console
Exec: /usr/src/emqx/erts-10.7/bin/erlexec -boot /usr/src/emqx/releases/4.2.7/emqx -mode embedded -boot_var ERTS_LIB_DIR /usr/src/emqx/erts-10.7/../lib -mnesia dir "/usr/src/emqx/data/mnesia/emqx@127.0.0.1" -config /usr/src/emqx/data/configs/app.2021.02.02.14.40.19.config -args_file /usr/src/emqx/data/configs/vm.2021.02.02.14.40.19.args -vm_args /usr/src/emqx/data/configs/vm.2021.02.02.14.40.19.args -start_epmd false -epmd_module ekka_epmd -proto_dist ekka -- console
Root: /usr/src/emqx
/usr/src/emqx
Erlang/OTP 22 [erts-10.7] [source] [64-bit] [smp:2:2] [ds:2:2:8] [async-threads:4] [hipe]Starting emqx on node emqx@127.0.0.1
Start http:management listener on 8081 successfully.
Start http:dashboard listener on 18083 successfully.
Start mqtt:tcp listener on 127.0.0.1:11883 successfully.
Start mqtt:tcp listener on 0.0.0.0:1883 successfully.
Start mqtt:ws listener on 0.0.0.0:8083 successfully.
Start mqtt:ssl listener on 0.0.0.0:8883 successfully.
Start mqtt:wss listener on 0.0.0.0:8084 successfully.
EMQ X Broker 4.2.7 is running now![root@test bin]# ./emqx start 启动
EMQ X Broker 4.2.7 is started successfully!
[root@test bin]# ./emqx_ctl admins add toyix 123456 添加用户密码
ok
3、浏览器登录
ip:18083
------------------------------end