一、win10 安装子程序18.04
安装完后更换为国内源
(1)查看版本:lsb_release -a
(2)更换源的时候一定要更换对应 的ubuntu 版本 的源,否则某些依赖会安装不上,建议去中科大选https://mirrors.ustc.edu.cn/repogen/
(3)sudo cp /etc/apt/sources.list /etc/apt/sources.list.bak#备份
sudo vim /etc/apt/sources.list#进入修改模式
按“i”进行编辑模式
注释所有的服务器,粘贴到中科大选来的内容。
按ESC退出编辑模式,打入“:wq”保存并退出
apt-get update#更新软件源
二、安装宝塔面板:
(1)使用命令安装:wget -O install.sh http://download.bt.cn/install/install-ubuntu_6.0.sh && sudo bash install.sh fed61d
(2)启动宝塔面板:sudo service bt start
(3)浏览器使用提示的网址和密码进行联接
192.168.123.2:8888/5fd46f66 username: xyyfsulu password: e0e8e0aa
三、搭建mqtt服务器。
#前往MQTT服务器软件下载地址:emqtt.com/downloads ,复制链接。注意对应的版本!
wget https://www.emqx.io/downloads/broker/v4.2.8/emqx-ubuntu18.04-4.2.8-x86_64.deb#下载
sudo apt install ./emqx-ubuntu18.04-4.2.8-x86_64.deb#安装
sudo emqx start#启动
#注意端口放行
访问地址:http://192.168.123.2:18083/
帐号:admin 密码:public