You can find the video for this tutorial here
wget -qO- https://repos.influxdata.com/influxdb.key | gpg --dearmor | sudo tee /etc/apt/trusted.gpg.d/influxdb.gpg > /dev/null
export DISTRIB_ID=$(lsb_release -si); export DISTRIB_CODENAME=$(lsb_release -sc) echo "deb [signed-by=/etc/apt/trusted.gpg.d/influxdb.gpg] https://repos.influxdata.com/${DISTRIB_ID,,} ${DISTRIB_CODENAME} stable" | sudo tee /etc/apt/sources.list.d/influxdb.list > /dev/null
sudo apt-get update
sudo apt-get install influxdb2
:~$ apt-cache policy influxdb2 influxdb2: Installed: 2.1.1 Candidate: 2.1.1 Version table: *** 2.1.1 500 500 https://repos.influxdata.com/ubuntu focal/stable amd64 Packages 100 /var/lib/dpkg/status
sudo systemctl start influxdb
sudo systemctl enable influxdb
:~$ sudo systemctl status influxdb ● influxdb.service - InfluxDB is an open-source, distributed, time series database Loaded: loaded (/lib/systemd/system/influxdb.service; enabled; vendor preset: enabled) Active: active (running) since Mon 2022-03-07 08:13:25 +0330; 52min ago Docs: https://docs.influxdata.com/influxdb/ Process: 1665 ExecStart=/usr/lib/influxdb/scripts/influxd-systemd-start.sh (code=exited, status=0/SUCCESS) Main PID: 1683 (influxd) Tasks: 15 (limit: 11715) Memory: 117.4M CGroup: /system.slice/influxdb.service └─1683 /usr/bin/influxd
sudo apt install -y influxdb2-cli
:~$ apt-cache policy influxdb2-cli influxdb2-cli: Installed: 2.2.1 Candidate: 2.2.1 Version table: *** 2.2.1 500 500 https://repos.influxdata.com/ubuntu focal/stable amd64 Packages 100 /var/lib/dpkg/status
With InfluxDB running, visit localhost:8086.
Click Get Started
Enter a Username for your initial user.
Enter a Password and Confirm Password for your user.
Enter your initial Organization Name.
Enter your initial Bucket Name.
Click Continue.
influx setup
- Enter a primary username.
- Enter a password for your user.
- Confirm your password by entering it again.
- Enter a name for your primary organization.
- Enter a name for your primary bucket.
- Enter a retention period for your primary bucket
The part of InfluxDB’s data structure that describes for how long InfluxDB keeps data (duration), how many copies of those data are stored in the cluster (replication factor), and the time range covered by shard groups (shard group duration).RPs are unique per database and along with the measurement and tag set define a series
When you create a database, InfluxDB automatically creates a retention policy called autogen with an infinite duration, a replication factor set to one, and a shard group duration set to seven days.
you need getting token
search in your borwser : http://localhost:8086
login into your UI using username and password you set > data > API token
run the command below
influx config create --config-name <your_config_name> --host-url <url> --token <> --active)
influx org create -n org_name
influx bucket create --org <org_name> --name <bucket_name> --retention 4380h
influx bucket list
influx user create --name <user_name> --org <org_name> --password SecretP4ss
influx auth create --user <username> --read-buckets --write-buckets
influx write --bucket <bucket_name> --file <path_to_file> --format <file_format>
good luck :)