Verifying InfluxDB Installed Using an RPM Package
- Initialize the database. Enter the user name, password, organization name, bucket (database) name, and retention (data retention period, in hours) in sequence.
Enter the actual values.
1influx setup
If repeated initialization is required, delete the files in the data directory first. For example, if the data directory shown in the RPM CLI output is /root/.influxdbv2/, run the following commands to delete files in the data directory:
1 2 3
ll /root/.influxdbv2/ cd /root/.influxdbv2/ rm -rf *
- View the creation result.
1 2 3
influx bucket list influx user list influx config list

- Add and query data.
1 2 3
influx write --bucket tst "m,host=host1 field1=1.2" influx write --bucket tst "m,host=host2 field1=1.3" influx query 'from(bucket:"tst") |> range(start:-1m)'

- Delete the data and confirm the result.
1 2
influx delete --bucket tst --start 2021-10-15T18:10:28Z --stop $(date +"%Y-%m-%dT%H:%M:%SZ") --predicate '_measurement="m"' --org=softstone influx query 'from(bucket:"tst") |> range(start:-1m)'

Parent topic: Verifying InfluxDB