docker部署influxdb
使用docker部署influxdbdocker-compose.yamlversion: "3"services:influxdb:image: influxdb:latestcontainer_name: influxdbenvironment:- INFLUXDB_DB=db0- INFLUXDB_ADMIN_ENABLED=true- INFLUXDB_ADMIN_USER=admin-
·
- 使用docker部署influxdb
生成默认config.yml
docker run \
--rm influxdb:latest \
influxd print-config > config.yml
docker-compose.yaml
version: "3"
services:
influxdb:
image: influxdb:latest
container_name: influxdb
environment:
- INFLUXDB_DB=db0
- INFLUXDB_ADMIN_ENABLED=true
- INFLUXDB_ADMIN_USER=admin
- INFLUXDB_ADMIN_PASSWORD=123456
volumes:
- /rssp/code/docker-influx/influxdb2:/var/lib/influxdb2
- /rssp/code/docker-influx/config.yml:/etc/influxdb2/config.yml
- /rssp/code/docker-influx/data:/var/lib/influxdb/data
- /rssp/code/docker-influx/meta:/var/lib/indluxdb/meta
- /rssp/code/docker-influx/wal:/var/lib/indluxdb/wal
- /rssp/code/docker-influx/backup/bin:/home/backup
- /rssp/code/docker-influx/backup/data:/tmp/backup/data
- /rssp/code/docker-influx/backup/gz:/tmp/backup/gz
- /etc/localtime:/etc/localtime:ro
ports:
- "8086:8086"
restart: always
docker pull influxdb
docker-compose up -d
- influx CLI
安装和可执行文件设置
wget https://dl.influxdata.com/influxdb/releases/influxdb2-client-2.2.0-linux-amd64.tar.gz
tar xvzf path/to/influxdb2-client-2.2.0-linux-amd64.tar.gz
sudo cp influxdb2-client-2.2.0-linux-amd64/influx /usr/local/bin/
启动cli
influx setup
设置默认参数
查看配置
influx config
登录web
更多推荐
已为社区贡献20条内容
所有评论(0)