1 下载 rpm文件
wget https://mirrors.tuna.tsinghua.edu.cn/influxdata/yum/el7-x86_64/influxdb2-2.1.1.x86_64.rpm
wget https://dl.influxdata.com/influxdb/releases/influxdb-1.8.4.x86_64.rpm
2 安装
yum localinstall influxdb2-2.1.1.x86_64.rpm
sudo yum localinstall influxdb-1.8.4.x86_64.rpm
3 修改配置文件
influxdb2使用
/etc/influxdb/config.toml
bolt-path = “/var/lib/influxdb/influxd.bolt”
engine-path = “/var/lib/influxdb/engine”
#web管理界面,1.1版本以上默认关闭。需要的话,可以手动打开
enable=true
#web服务界面的端口
bind-address=“:8086”
4 启动服务
influxdb2使用
systemctl start influxdb #启动influxdb
systemctl status influxdb #查看状态
systemctl enable influxdb #开启开机启动
influxdb1使用
#启动Influx:
systemctl start influxdb.service
#以指定配置文件启动Influx:
influxd -config /etc/influxdb/influxdb.conf
#连接数据库:
influx -precision rfc3339 或influx
#指定端口连接