首页 > 技术文章 > mqtt服务器的安装(1)--EMQX

nuister 2020-04-30 21:01 原文

参考:https://developer.aliyun.com/mirror/docker-ce?spm=a2c6h.13651102.0.0.3e221b11GaoAqB

阿里云Ubuntu系统

1、安装docker-ce

# step 1: 安装必要的一些系统工具
sudo apt-get update
sudo apt-get -y install apt-transport-https ca-certificates curl software-properties-common
# step 2: 安装GPG证书
curl -fsSL https://mirrors.aliyun.com/docker-ce/linux/ubuntu/gpg | sudo apt-key add -
# Step 3: 写入软件源信息
sudo add-apt-repository "deb [arch=amd64] https://mirrors.aliyun.com/docker-ce/linux/ubuntu $(lsb_release -cs) stable"
# Step 4: 更新并安装Docker-CE
sudo apt-get -y update
sudo apt-get -y install docker-ce

# 安装指定版本的Docker-CE:
# Step 1: 查找Docker-CE的版本:
# apt-cache madison docker-ce
# docker-ce | 17.03.1~ce-0~ubuntu-xenial | https://mirrors.aliyun.com/docker-ce/linux/ubuntu xenial/stable amd64 Packages
# docker-ce | 17.03.0~ce-0~ubuntu-xenial | https://mirrors.aliyun.com/docker-ce/linux/ubuntu xenial/stable amd64 Packages
# Step 2: 安装指定版本的Docker-CE: (VERSION例如上面的17.03.1~ce-0~ubuntu-xenial)
# sudo apt-get -y install docker-ce=[VERSION]

在step3出现了问题

解决方法:

vi /usr/bin/apt-add-repository
# 把 ! /usr/bin/python3 改成 ! /usr/bin/python3.5

2、用Docker安装 EMQ

https://docs.emqx.io/broker/latest/cn/getting-started/install.html##docker

 

 docker ps 查看进程

查看后台

ip:18083(阿里云安全组开放端口18083、1883、8083)

默认账号:admin 密码:public

 

3、安装DockerUI工具-- Portainer

1、安装portainer

  docker pull docker.io/portainer/portainer 

2、启动portainer

docker run -d -p 9000:9000 --restart=always -v /var/run/docker.sock:/var/run/docker.sock --name prtainer-arry portainer/portainer
#  --name prtainer-arry  自定义名称

3、登录可视化界面

访问方式:http://IP:9000 (阿里云安全组开放端口 9000)

 

 

推荐阅读