安装环境:
CentOS V7.1
[root@localhost ~]# wget https://dl.influxdata.com/influxdb/releases/influxdb-1.8.4.x86_64.rpm
--2021-03-20 20:12:03-- https://dl.influxdata.com/influxdb/releases/influxdb-1.8.4.x86_64.rpm
正在解析主机 dl.influxdata.com (dl.influxdata.com)... 13.226.219.49, 13.226.219.52, 13.226.219.48, ...
正在连接 dl.influxdata.com (dl.influxdata.com)|13.226.219.49|:443... 已连接。
已发出 HTTP 请求,正在等待回应... 200 OK
长度:64098280 (61M) [application/octet-stream]
正在保存至: “influxdb-1.8.4.x86_64.rpm”
100%[======================================>] 64,098,280 134KB/s 用时 5m 31s
2021-03-20 20:17:35 (189 KB/s) - 已保存 “influxdb-1.8.4.x86_64.rpm” [64098280/64098280])
[root@localhost ~]# yum localinstall influxdb-1.8.4.x86_64.rpm
已加载插件:fastestmirror, langpacks
正在检查 influxdb-1.8.4.x86_64.rpm: influxdb-1.8.4-1.x86_64
influxdb-1.8.4.x86_64.rpm 将被安装
正在解决依赖关系
--> 正在检查事务
---> 软件包 influxdb.x86_64.0.1.8.4-1 将被 安装
--> 解决依赖关系完成
依赖关系解决
================================================================================
Package 架构 版本 源 大小
================================================================================
正在安装:
influxdb x86_64 1.8.4-1 /influxdb-1.8.4.x86_64 166 M
事务概要
================================================================================
安装 1 软件包
总计:166 M
安装大小:166 M
Is this ok [y/d/N]: y
Downloading packages:
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
正在安装 : influxdb-1.8.4-1.x86_64 1/1
Created symlink from /etc/systemd/system/influxd.service to /usr/lib/systemd/system/influxdb.service.
Created symlink from /etc/systemd/system/multi-user.target.wants/influxdb.service to /usr/lib/systemd/system/influxdb.service.
验证中 : influxdb-1.8.4-1.x86_64 1/1
已安装:
influxdb.x86_64 0:1.8.4-1
完毕!
[root@localhost ~]# systemctl start influxdb
[root@localhost ~]# systemctl status influxdb
● influxdb.service - InfluxDB is an open-source, distributed, time series database
Loaded: loaded (/usr/lib/systemd/system/influxdb.service; enabled; vendor preset: disabled)
Active: active (running) since 六 2021-03-20 20:47:11 CST; 9s ago
Docs: https://docs.influxdata.com/influxdb/
Main PID: 5412 (influxd)
CGroup: /system.slice/influxdb.service
└─5412 /usr/bin/influxd -config /etc/influxdb/influxdb.conf
3月 20 20:47:11 localhost.localdomain influxd[5412]: ts=2021-03-20T12:47:11....
3月 20 20:47:11 localhost.localdomain influxd[5412]: ts=2021-03-20T12:47:11....
3月 20 20:47:11 localhost.localdomain influxd[5412]: ts=2021-03-20T12:47:11....
3月 20 20:47:11 localhost.localdomain influxd[5412]: ts=2021-03-20T12:47:11....
3月 20 20:47:11 localhost.localdomain influxd[5412]: ts=2021-03-20T12:47:11....
3月 20 20:47:11 localhost.localdomain influxd[5412]: ts=2021-03-20T12:47:11....
3月 20 20:47:11 localhost.localdomain influxd[5412]: ts=2021-03-20T12:47:11....
3月 20 20:47:11 localhost.localdomain influxd[5412]: ts=2021-03-20T12:47:11....
3月 20 20:47:11 localhost.localdomain influxd[5412]: ts=2021-03-20T12:47:11....
3月 20 20:47:11 localhost.localdomain influxd[5412]: ts=2021-03-20T12:47:11....
Hint: Some lines were ellipsized, use -l to show in full.
[root@localhost ~]#systemctl status influxdb
[root@localhost ~]#systemctl enable influxdb
[root@localhost ~]#systemctl restart influxdb
[root@localhost ~]# ps aux | grep -v grep | grep influxdb
influxdb 5412 0.0 1.2 447164 23868 ? Ssl 20:47 0:00 /usr/bin/influxd -config /etc/influxdb/influxdb.conf
查看InfluxDB的服务端口8088:
[root@localhost ~]# netstat -a -n | grep 8088
tcp 0 0 127.0.0.1:8088 0.0.0.0:* LISTEN
默认influxDB使用以下端口
8086: 用于客户端和服务端交互的HTTP API8088: 用于提供备份和恢复的RPC服务
现将端口8086修改为8076
配置文件通过安装包安装,在linux上默认位置:
/etc/influxdb/influxdb.conf

去掉 # ,找到8086并修改
[root@roma-02 influxdb]# netstat -a -n |grep 8076
tcp6 0 0 :::8076 :::* LISTEN
tcp6 0 0 172.17.5.13:8076 192.168.1.200:64714 ESTABLISHED
tcp6 0 0 172.17.5.13:8076 192.168.1.200:64054 ESTABLISHED
关闭InfluxDB服务,服务端口关闭
[root@localhost ~]# systemctl stop influxdb
SELECT * FROM "mem" WHERE time > now() - 5m ORDER BY time DESC
SELECT COUNT(*) FROM DEVICE_MON
管理工具:
InfluxDB Studio
Chronograf
本文档详细记录了在CentOS7.1系统中下载、安装和启动InfluxDB1.8.4的过程,并展示了如何修改默认的HTTP端口8086为8076。安装完成后,通过netstat命令验证了端口变更,并展示了服务状态。

6280

被折叠的 条评论
为什么被折叠?



