Linux: Basic installation and startup of InfluxDB (version 1.8.4) and command line testing

1. Statement

The current content is mainly to record starting InfluxDB and basic operations under Linux

2. Download and unzip

download

wget https://dl.influxdata.com/influxdb/releases/influxdb-1.8.4_linux_amd64.tar.gz

Unzip

tar xvf influxdb-1.8.4_linux_amd64.tar.gz

3. Start and test

cd influxdb-1.8.4-1/
cd usr/bin/

Insert picture description here

Start the service:./influxd
Insert picture description here
8086 is the connection port

Close: press Ctrl+C

4. Client connection and other operations

1. View the connection help:./influx -help

2. Client connection

./influx

Insert picture description here
3. Create a database: create database mytest

4. View the database: show databases
Insert picture description here

5. Use the database: use mytest

Insert picture description here

6. Insert data:

insert treasures,captain_id=dread_pirate_roberts value=801 1439856000
insert treasures,captain_id=flint value=29 1439856000
insert treasures,captain_id=sparrow value=38 1439856000
insert treasures,captain_id=tetra value=47 1439856000
insert treasures,captain_id=crunch value=109 1439858880

The last part of this shows the time rubbing, the default is not to write the current time, this is useful in testing
Insert picture description here
Here, the timing will be automatically created by default:treasures

==7. Query data: select * from treasures ==
Insert picture description here

8. Conditional delete operation:delete from treasures where captain_id='crunch'

 delete from treasures where captain_id='crunch'

Insert picture description here

8. Delete the database:drop database mytest
Insert picture description here

9. Exit the command line: exit

5. Summary

1. The current command-line operation mode of InfluxDB is basically the same as that of sql. Basically this is no problem with SQL

Guess you like

Origin blog.csdn.net/weixin_45492007/article/details/114481644