当前位置:Gxlcms > 数据库问题 > InfluxDB学习(一):基本概念和安装

InfluxDB学习(一):基本概念和安装

时间:2021-07-01 10:21:17 帮助过:15人阅读

/usr/local/influxdb # groupadd -r dba # useradd -r -g dba tnuser # chown -R tnuser.dba /usr/local/influxdb # sudo su - tnuser $ cd /usr/local/influxdb $ wget https://dl.influxdata.com/influxdb/releases/influxdb-1.8.0-static_linux_amd64.tar.gz $ tar -zxf influxdb-1.8.0-static_linux_amd64.tar.gz $ mv influxdb-1.8.0-1/* . $ rm -rf influxdb-1.8.0*

使用CentOS7的systemctl管理InfluxDB服务

# cat /usr/lib/systemd/system/influxdb.service 
[Unit]
Description=InfluxDB is time series database
Documentation=https://docs.influxdata.com/influxdb/v1.8/introduction/get-started/
After=syslog.target
After=network.target

[Service]
Type=fork
User=tnuser
Group=dba
Restart=always

# Disable OOM kill on the Redis
OOMScoreAdjust=-1000
Environment=PG_OOM_ADJUST_FILE=/proc/self/oom_score_adj
Environment=PG_OOM_ADJUST_VALUE=0

ExecStart=/usr/local/influxdb/usr/bin/influxd
ExecStop=/bin/kill -15 $MAINPID
LimitNOFILE=65536
 
[Install]
WantedBy=multi-user.target
# systemctl daemon-reload
# systemctl enable influxdb
# systemctl start influxdb
# systemctl status influxdb
● influxdb.service - InfluxDB is time series database
   Loaded: loaded (/usr/lib/systemd/system/influxdb.service; disabled; vendor preset: disabled)
   Active: active (running) since Sat 2020-04-18 23:19:03 PDT; 1s ago
     Docs: https://docs.influxdata.com/influxdb/v1.8/introduction/get-started/
 Main PID: 22583 (influxd)
   CGroup: /system.slice/influxdb.service
           └─22583 /usr/local/influxdb/usr/bin/influxd

Apr 18 23:19:04 ec2t-dbaadmin-01.mypna.com influxd[22583]: ts=2020-04-19T06:19:04.203421Z lvl=info msg="InfluxDB starting" log...568f5
Apr 18 23:19:04 ec2t-dbaadmin-01.mypna.com influxd[22583]: ts=2020-04-19T06:19:04.203467Z lvl=info msg="Go runtime" log_id=0MG...ocs=4
Apr 18 23:19:04 ec2t-dbaadmin-01.mypna.com influxd[22583]: ts=2020-04-19T06:19:04.311597Z lvl=info msg="Using data dir" log_id.../data
Apr 18 23:19:04 ec2t-dbaadmin-01.mypna.com influxd[22583]: ts=2020-04-19T06:19:04.311635Z lvl=info msg="Compaction settings" l...31648
Apr 18 23:19:04 ec2t-dbaadmin-01.mypna.com influxd[22583]: ts=2020-04-19T06:19:04.311647Z lvl=info msg="Open store (start)" lo...start
Apr 18 23:19:04 ec2t-dbaadmin-01.mypna.com influxd[22583]: ts=2020-04-19T06:19:04.553803Z lvl=info msg="Reading file" log_id=0...87843
Apr 18 23:19:04 ec2t-dbaadmin-01.mypna.com influxd[22583]: ts=2020-04-19T06:19:04.572851Z lvl=info msg="Opened file" log_id=0M...749ms
Apr 18 23:19:04 ec2t-dbaadmin-01.mypna.com influxd[22583]: ts=2020-04-19T06:19:04.594031Z lvl=info msg="Opened file" log_id=0M...915ms
Apr 18 23:19:04 ec2t-dbaadmin-01.mypna.com influxd[22583]: ts=2020-04-19T06:19:04.610554Z lvl=info msg="Opened shard" log_id=0...256ms
Apr 18 23:19:04 ec2t-dbaadmin-01.mypna.com influxd[22583]: ts=2020-04-19T06:19:04.612039Z lvl=info msg="Opened shard" log_id=0...741ms
Hint: Some lines were ellipsized, use -l to show in full.

 

InfluxDB学习(一):基本概念和安装

标签:end   执行文件   hint   restart   企业   chown   ystemd   cgroup   sql语法   

人气教程排行