influxdb安装相关

一、安装

cat <<EOF | sudo tee /etc/yum.repos.d/influxdb.repo
[influxdb]
name = InfluxDB Repository - RHEL \$releasever
baseurl = https://repos.influxdata.com/rhel/\$releasever/\$basearch/stable
enabled = 1
gpgcheck = 1
gpgkey = https://repos.influxdata.com/influxdb.key
EOF

启动

# centos6.9安装
sudo yum install influxdb
# centos7 启动
sudo service influxdb start
 
 
# centos6.9安装
sudo yum install influxdb
# centos7 启动
sudo systemctl start influxdb
 
 
# 当前加载配置查看
influxd config

核心配置文件:

vim /etc/influxdb/influxdb.conf
 
# 数据源迁移(建议默认不要放在系统磁盘下面)
[meta]
  # Where the metadata/raft database is stored
  dir = "/workspace/service/influxdb/meta"
[data]
  # The directory where the TSM storage engine stores TSM files.
  dir = "/workspace/service/influxdb/data"
 
  # The directory where the TSM storage engine stores WAL files.
  wal-dir = "/workspace/service/influxdb/wal"
 
 
# 赋权限
chown -R influxdb:influxdb /workspace/service/influxdb/

influxdb常用命令:

# 进入交互式界面
influx -precision rfc3339
 
 
# 创建db
CREATE DATABASE mydb
 
 
# 查看数据库
SHOW DATABASES
 
 
# 进入数据库
USE mydb
 
#显示该数据库中所有的表
show measurements
 
# 查看用户
show users
 
 
#创建所有权限用户
CREATE USER jmeter WITH PASSWORD 'jmeter' WITH ALL PRIVILEGES
 
 
# 删除用户
drop user jmeter

 

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值