ubuntu18.04部署node-red,emqx,influxdb

ubuntu18.04部署node-red,emqx,influxdb

关闭防火墙

systemctl disable ufw && service ufw stop && service ufw status

配置静态IP

查看网卡

ip add

修改配置文件

vim /etc/netplan/00-installer-config.yaml

配置参考

# This is the network config written by 'subiquity'
network:
  ethernets:
    enp1s0:
      dhcp4: no
      addresses: [192.168.1.100/24]
      gateway4: 192.168.1.1
      nameservers:
        addresses: [8.8.8.8,114.114.114.114]
    enp3s0:
      dhcp4: true
  version: 2

应用配置

netplan apply

开启ssh服务

安装openssh

apt-get update && apt install openssh-server -y

安装node-red

参考链接:

https://nodered.org/docs/getting-started/local

https://github.com/node-red/linux-installers

https://blog.csdn.net/hfh8130/article/details/126420427

https://blog.csdn.net/Janent168/article/details/128286212

安装node-red

apt install build-essential
bash <(curl -sL https://raw.githubusercontent.com/node-red/linux-installers/master/deb/update-nodejs-and-nodered)

安装pm2进程管理工具启动node-red

npm install -g pm2
pm2 start node-red

添加开机自启服务

pm2 save
pm2 startup

安装emqx

参考链接:

https://www.emqx.io/docs/zh/v5.0/deploy/install-ubuntu.html

https://www.emqx.io/docs/en/v4.3/advanced/acl-file.html#define-acl

开始安装

curl -s https://assets.emqx.com/scripts/install-emqx-deb.sh | sudo bash
apt-get install emqx

启动服务

systemctl enable emqx --now
systemctl status emqx

version `GLIBC_2.34‘ not found 解决方法:

https://blog.csdn.net/huazhang_001/article/details/128828999

E: Could not get lock /var/lib/dpkg/lock-frontend - open (11: Resource temporarly unavailable) 解决方法:

https://blog.csdn.net/leoFY123/article/details/122120685

emqx 默认阻止发布和订阅 $SYS/## 主题,需要修改acl.conf配置文件

vim /etc/emqx/acl.conf

注释这一行

%%{deny, all, subscribe, ["$SYS/#", {eq, "#"}]}.

重启服务

systemctl restart emqx

安装influxdb

参考链接:

https://blog.csdn.net/weixin_43114209/article/details/123252235

添加apt源

curl -sL https://repos.influxdata.com/influxdb.key | sudo apt-key add -
source /etc/lsb-release
echo "deb https://repos.influxdata.com/${DISTRIB_ID,,} ${DISTRIB_CODENAME} stable" | sudo tee /etc/apt/sources.list.d/influxdb.list
apt-get update 

key异常,The following signatures couldn‘t be verified because the public key is not available,解决方法:

https://blog.csdn.net/TineAine/article/details/118455874

开始安装1.8版本influxdb

apt-get install influxdb
apt list --installed |grep influxdb

启动服务

systemctl enable influxdb --now
systemctl status influxdb

Failed to enable unit: Unit file /etc/systemd/system/influxdb.service is masked.解决方法:

# 先移除原有的influxdb.service,再次apt安装
systemctl unmask influxdb
apt-get install influxdb
  • 1
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值