官方网址:https://portal.influxdata.com/downloads/
[root@dayu ~]#cat <<EOF | sudo tee /etc/yum.repos.d/influxdata.repo
[influxdata]
name = InfluxData Repository - Stable
baseurl = https://repos.influxdata.com/stable/\\$basearch/main
enabled = 1
gpgcheck = 1
gpgkey = https://repos.influxdata.com/influxdata-archive_compat.key
EOF
[root@dayu ~]#yum install influxdb2 telegraf
[root@dayu ~]#vim /etc/default/influxdb2 #查看配置文件,发现被include到了/etc/influxdb/config.toml文件
[root@dayu ~]#vim /etc/influxdb/config.toml
bolt-path = "/var/lib/influxdb/influxd.bolt" #原有
engine-path = "/var/lib/influxdb/engine" #原有
http-bind-address = ":8088" #增加,默认监听的端口是8086
[root@dayu ~]#systemctl restart influxdb.service
[root@dayu local]#wget https://dl.influxdata.com/influxdb/releases/influxdb2-client-2.6.1-linux-amd64.tar.gz. #下载influxCLI工具
[root@dayu local]#tar xf influxdb2-client-2.6.1-linux-amd64.tar.gz
[root@dayu local]#ln -s /usr/local/influxdb2-client-2.6.1 /usr/local/influxdb2-client
[root@dayu ~]#echo 'PATH=/usr/local/influxdb2-client/:$PATH' > /etc/profile.d/influx.sh
[root@dayu ~]#source /etc/profile.d/influx.sh
[root@dayu ~]#influx setup -u wang -p wang.org -t wang.org -o wang.org -b dayu -f -host http://localhost:8088 User Organization Bucket wang wang.org dayu
现在使用浏览器打开http://IP地址:8088管理influxdb了,也可以使用influxCLI命令行工具管理数据库