influxdb-1.7.8绿色安装-centos7
2019-10-19 07:08
1506 查看
influxdb作为一款性能强悍的时序数据库, 一旦拥有, 别无所求. 本文介绍它的绿色安装方法.
- 环境准备, 下载, 解压.
[dev5@7bdc6644c7c4 influxdb-1.7.8] cat /etc/redhat-release CentOS Linux release 7.6.1810 (Core) [dev5@7bdc6644c7c4 influxdb-1.7.8] pwd /home/dev5/tools/ [dev5@7bdc6644c7c4 influxdb-1.7.8] mkdir influxdb-1.7.8 [dev5@7bdc6644c7c4 influxdb-1.7.8] cd influxdb-1.7.8 [dev5@7bdc6644c7c4 influxdb-1.7.8] mkdir influx [dev5@7bdc6644c7c4 influxdb-1.7.8] mkdir influx/wal influx/dat influx/meta [dev5@7bdc6644c7c4 influxdb-1.7.8] wget https://repos.influxdata.com/centos/7Server/x86_64/stable/influxdb-1.7.8.x86_64.rpm [dev5@7bdc6644c7c4 influxdb-1.7.8] rpm2cpio influxdb-1.7.8.x86_64.rpm | cpio -idmv [dev5@7bdc6644c7c4 influxdb-1.7.8]$ pwd /home/dev5/tools/influxdb-1.7.8 [dev5@7bdc6644c7c4 influxdb-1.7.8]$ ls etc influx usr var
修改配置文件: vim etc/influxdb/influxdb.conf
- 将
元数据
,数据
,日志
目录指向上面我们创建的influx/meta
,influx/dat
,influx/wal
.
[meta] # Where the metadata/raft database is stored dir = "/home/dev5/tools/influxdb-1.7.8/influx/meta" [data] # The directory where the TSM storage engine stores TSM files. dir = "/home/dev5/tools/influxdb-1.7.8/influx/dat" # The directory where the TSM storage engine stores WAL files. wal-dir = "/home/dev5/tools/influxdb-1.7.8/influx/wal"
如果你不准备污染系统环境变量, 就准备一个启动脚本startup-influxdb.sh
#!/bin/sh # export PATH=/home/dev5/tools/influxdb-1.7.8/usr/bin:$PATH # nohup influxd -config /home/dev5/tools/influxdb-1.7.8/etc/influxdb/influxdb.conf &
刚起来的influxdb还不具备鉴权能力, 手动配置之前, 先创建一个用户.
[dev5@7bdc6644c7c4 influxdb-1.7.8]$ export PATH=/home/dev5/tools/influxdb-1.7.8/usr/bin:$PATH [dev5@7bdc6644c7c4 influxdb-1.7.8]$ influx Connected to http://localhost:8086 version 1.7.8 InfluxDB shell version: 1.7.8 > create user admin with password 'deadbeef' with all privileges > create user "x-msg-im" with password 'deadbeef' with all privileges > exit
- 使能鉴权: vim etc/influxdb/influxdb.conf
[http] # Determines whether HTTP endpoint is enabled. # enabled = true # The bind address used by the HTTP service. # bind-address = ":8086" # Determines whether user authentication is enabled over HTTP/HTTPS. auth-enabled = true
- kill, 重启.
[dev5@7bdc6644c7c4 influxdb-1.7.8]$ ps -aef|grep influx dev5 51622 1 0 13:04 pts/3 00:00:01 influxd -config /home/dev5/tools/influxdb-1.7.8/etc/influxdb/influxdb.conf dev5 52055 39606 0 13:22 pts/3 00:00:00 grep --color=auto influx [dev5@7bdc6644c7c4 influxdb-1.7.8]$ kill 51622
默认的配置会引起较多的运行时日志, 我们可以禁用它
- vim etc/influxdb/influxdb.conf
# Whether queries should be logged before execution. Very useful for troubleshooting, but will # log any sensitive data contained within a query. # query-log-enabled = true query-log-enabled = false
# Determines whether HTTP request logging is enabled. # log-enabled = true log-enabled = false
- 记得重启.
到这里一个可用的绿色版influxdb就安装好了, 打包备份. 真正的一次安装, 到处运行.
相关文章推荐
- centos7安装influxdb
- centos7上安装influxdb
- CentOS7安装iptables防火墙
- CentOS7安装Docker全程并启动
- centos7 安装python-pip及python的第三方库
- centos7上安装JDK11
- CentOS7 安装 Java 8 以及Tomcat8
- CentOS7部署wordpress安装主题提示“安装失败:无法创建目录”
- Centos7 安装 yum nginx 1.8
- 台式机安装centos7提示“No Caching mode page found”
- wget、rpm、yum在centOS7中安装mysql5.7.20
- centos7 安装lvs
- centos7安装iptables
- centos7安装python3.5
- CentOS7 下 Python3.5.1安装过程
- VSFTP在centos7上安装
- java8 centos7安装 tar.gz
- Centos7安装快速搭建Mysql环境
- CentOS7下安装MariaDB
- Centos7 下安装mplayer播放器