下载安装
官网无需翻墙,下载跳出的界面需要翻墙,链接
https://dl.influxdata.com/influxdb/releases/influxdb-1.6.2_windows_amd64.zip
基础环境
本机win10 64bit, Go 1.10 环境
set GOARCH=amd64
set GOBIN=D:\lishuiCache\bin
set GOCACHE=C:\Users\huitu\AppData\Local\go-build
set GOEXE=.exe
set GOHOSTARCH=amd64
set GOHOSTOS=windows
set GOOS=windows
set GOPATH=D:\lishuiCache
set GORACE=
set GOROOT=C:\Go
set GOTMPDIR=
set GOTOOLDIR=C:\Go\pkg\tool\windows_amd64
set GCCGO=gccgo
set CC=gcc
set CXX=g++
set CGO_ENABLED=1
set CGO_CFLAGS=-g -O2
set CGO_CPPFLAGS=
set CGO_CXXFLAGS=-g -O2
set CGO_FFLAGS=-g -O2
set CGO_LDFLAGS=-g -O2
set PKG_CONFIG=pkg-config
set GOGCCFLAGS=-m64 -mthreads -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fdebug-prefix-map=C:\Users\huitu\AppData\Local\Temp\go-build432470030=/tmp/go-build -gno-record-gcc-switches
基本配置
- 解压
- 在相应路径下运行
.\influxd.exe config > auto.conf
生成配置,调整[meta]dir
[data]dir
wal-dir
默认路径有可能存在权限问题无法读写
[meta]
dir = "D:\\inflexdb\\.influxdb\\meta"
retention-autocreate = true
logging-enabled = true
[data]
dir = "D:\\inflexdb\\.influxdb\\data"
index-version = "inmem"
wal-dir = "D:\\inflexdb\\.influxdb\\wal"
wal-fsync-delay = "0s"
query-log-enabled = true
cache-max-memory-size = 1073741824
cache-snapshot-memory-size = 26214400
cache-snapshot-write-cold-duration = "10m0s"
compact-full-write-cold-duration = "4h0m0s"
max-series-per-database = 1000000
max-values-per-tag = 100000
max-concurrent-compactions = 0
max-index-log-file-size = 1048576
trace-logging-enabled = false
tsm-use-madv-willneed = false
- 制定配置文件运行
.\influxd.exe -config .\auto.conf
运行界面 - 运行
.\influx.exe
输入官网示例sql
Connected to http://localhost:8086 version 1.6.2
InfluxDB shell version: 1.6.2
> CREATE DATABASE mydb
> SHOW DATABASES
name: databases
name
----
_internal
mydb
> USE mydb
Using database mydb
>
创建新用户
> create user njht with password 'njht'
> grant all privileges to njht
用新用户名密码登录.\influx.exe -username njht -password njht
网友评论