linux安装influxdb
1、下载安装influxdb
下载链接: https://portal.influxdata.com/downloads/
github主页: https://github.com/influxdata/influxdb
下载前会要求注册下载:输入用户名密码进行注册下载。
然后跳转到下载页面,选择对应自己的版本下载。
使用相应的命令进行下载安装包
# influxdata-archive_compat.key GPG fingerprint:
# 9D53 9D90 D332 8DC7 D6C8 D3B9 D8FF 8E1F 7DF8 B07E
下载.key文件
wget -q https://repos.influxdata.com/influxdata-archive_compat.key
生成gpg文件
echo '393e8779c89ac8d958f81f942f9ad7fb82a25e133faddaf92e15b16e6ac9ce4c influxdata-archive_compat.key' | sha256sum -c && cat influxdata-archive_compat.key | gpg --dearmor | sudo tee /etc/apt/trusted.gpg.d/influxdata-archive_compat.gpg > /dev/null
添加influxdb软件源
echo 'deb [signed-by=/etc/apt/trusted.gpg.d/influxdata-archive_compat.gpg] https://repos.influxdata.com/debian stable main' | sudo tee /etc/apt/sources.list.d/influxdata.list
apt安装influxdb数据库
sudo apt-get update && sudo apt-get install influxdb2
2、官方文档
文档链接: https://docs.influxdata.com/influxdb/v2.7/
3、设置开机自启动
安装完成后默认已经设置了systemd开机自启动
4、启动influxdb数据库
systemctl start influxd.service
默认数据库端口是8086
5、使用influxdb数据库
访问 http://ip:8086
Organization: An organization is a workspace for a group of users requiring access to time series data, dashboards, and other resources. You can create organizations for different functional groups, teams, or projects.
bucket:A bucket is where your time series data is stored with a retention policy.
复制记录Api Token:
MnkUyPRpeBCDuCQ6MdQDkw185MgQ-qpHbSGCZiHgXwUO4azn_CdeN2wL3oM3-tA5uaZrwiCa6UoASJTdnc-vtA==
作用是用来授权创建用户、组织等