Grafana and Oracle database - Part 2A - Installation of Influx DB
- Get link
- X
- Other Apps
I am currently on InfluxDB v1.5, which you can download from here here.
Of course, I do understand that it isn't the latest version (current version, as on date, is 2.4). However, there are significant changes in InfluxDB v2.0 and above, which I haven't yet gotten around to implementing.
I prefer to download the tar.gz file and use the compiled executable as Oracle software owner (oracle) user - for obvious reasons, I don't want to perform yum/apt-get install (I don't want to do anything with root user 😊).
You may use wget to download the binaries to the desired location.
Refer the documentation for installation details.
NOTE: If possible, get a OS user - influxdb (or similar user) created. Else, use the Oracle software owner OS user (in my case - oracle).
$ whoami
oracle
$ mkdir -p /oracle/influxdb
$ cd /oracle/influxdb
$ wget https://dl.influxdata.com/influxdb/releases/influxdb-1.5.5_linux_amd64.tar.gz
--2022-09-19 05:17:29-- https://dl.influxdata.com/influxdb/releases/influxdb-1.5.5_linux_amd64.tar.gz
Resolving dl.influxdata.com (dl.influxdata.com)... 108.138.246.75, 108.138.246.34, 108.138.246.81, ...
Connecting to dl.influxdata.com (dl.influxdata.com)|108.138.246.75|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 22645770 (22M) [application/x-tar]
Saving to: ‘influxdb-1.5.5_linux_amd64.tar.gz’
100%[=================================================================================================================>] 22,645,770 17.4MB/s in 1.2s
2022-09-19 05:17:31 (17.4 MB/s) - ‘influxdb-1.5.5_linux_amd64.tar.gz’ saved [22645770/22645770]
$ ls -lrt
total 89944
-rw-r--r-- 1 oracle oinstall 92098809 Aug 18 12:49 influxdb-1.5.5_linux_amd64.tar.gz
Once the binaries are downloaded, tar and gunzip them under any preferred directory:
$ tar xzvf influxdb-1.5.5_linux_amd64.tar.gz
./influxdb-1.5.5-1/
./influxdb-1.5.5-1/etc/
./influxdb-1.5.5-1/etc/logrotate.d/
./influxdb-1.5.5-1/etc/logrotate.d/influxdb
./influxdb-1.5.5-1/etc/influxdb/
./influxdb-1.5.5-1/etc/influxdb/influxdb.conf
./influxdb-1.5.5-1/var/
./influxdb-1.5.5-1/var/lib/
./influxdb-1.5.5-1/var/lib/influxdb/
./influxdb-1.5.5-1/var/log/
./influxdb-1.5.5-1/var/log/influxdb/
./influxdb-1.5.5-1/usr/
./influxdb-1.5.5-1/usr/lib/
./influxdb-1.5.5-1/usr/lib/influxdb/
./influxdb-1.5.5-1/usr/lib/influxdb/scripts/
./influxdb-1.5.5-1/usr/lib/influxdb/scripts/influxdb.service
./influxdb-1.5.5-1/usr/lib/influxdb/scripts/init.sh
./influxdb-1.5.5-1/usr/share/
./influxdb-1.5.5-1/usr/share/man/
./influxdb-1.5.5-1/usr/share/man/man1/
./influxdb-1.5.5-1/usr/share/man/man1/influxd.1.gz
./influxdb-1.5.5-1/usr/share/man/man1/influxd-version.1.gz
./influxdb-1.5.5-1/usr/share/man/man1/influxd-config.1.gz
./influxdb-1.5.5-1/usr/share/man/man1/influxd-restore.1.gz
./influxdb-1.5.5-1/usr/share/man/man1/influxd-run.1.gz
./influxdb-1.5.5-1/usr/share/man/man1/influx.1.gz
./influxdb-1.5.5-1/usr/share/man/man1/influxd-backup.1.gz
./influxdb-1.5.5-1/usr/share/man/man1/influx_stress.1.gz
./influxdb-1.5.5-1/usr/share/man/man1/influx_inspect.1.gz
./influxdb-1.5.5-1/usr/share/man/man1/influx_tsm.1.gz
./influxdb-1.5.5-1/usr/bin/
./influxdb-1.5.5-1/usr/bin/influx_stress
./influxdb-1.5.5-1/usr/bin/influx_tsm
./influxdb-1.5.5-1/usr/bin/influx
./influxdb-1.5.5-1/usr/bin/influxd
./influxdb-1.5.5-1/usr/bin/influx_inspect
$ cd influxdb-1.5.5-1
$ ls -lrt
total 12
drwxr-xr-x 4 oracle oinstall 4096 Dec 19 2018 var
drwxr-xr-x 5 oracle oinstall 4096 Dec 19 2018 usr ==> All executables
drwxr-xr-x 4 oracle oinstall 4096 Dec 19 2018 etc ==> Config file
Three files of interest:
$ find . -name "influxd"
./usr/bin/influxd
$ find . -name "influx"
./usr/bin/influx
$ find . -name "influxdb.conf"
./etc/influxdb/influxdb.conf
Now, make sure that the first two executables are available in the PATH variable.
Make sure to modify .bash_profile of the Oracle software OS user as well.
$ export PATH=/oracle/influxdb/influxdb-1.5.5-1/usr/bin:$PATH
$ which influxd
/oracle/influxdb/influxdb-1.5.5-1/usr/bin/influxd
$ which influx
/oracle/influxdb/influxdb-1.5.5-1/usr/bin/influx
$ echo "export PATH=/oracle/influxdb/influxdb-1.5.5-1/usr/bin:\$PATH" >> ~/.bash_profile
Configure the below parameters in the conf file:
$ ls -ld /oracle/influxdb/influxdb-1.5.5-1/etc/influxdb/influxdb.conf
reporting-disabled = true
[meta]
dir = "/oracle/influxdb/meta"
[data]
dir = "/oracle/influxdb/data"
wal-dir = "/oracle/influxdb/wal"
...
...
[http]
enabled = true
bind-address = ":8086"
auth-enabled = true
Of course - dont' forget to create those directories:
$ mkdir -p /oracle/influxdb/meta /oracle/influxdb/data /oracle/influxdb/wal
Now, fire up influx DB as below:
$ nohup influxd -config /oracle/influxdb/influxdb-1.5.5-1/etc/influxdb/influxdb.conf >> /oracle/influxdb/influxdb-1.5.5-1/var/log/influxdb/influxd_$(hostname).log 2>&1 &
Verify that everything's fine in the logs:
Voila! Your influx DB instance is up and running.
A few things to note, especially for people from Oracle DB background:
1. Influx DB works similar to MySQL or Mongo DB - i.e., one instance --> many databases.
2. As I said before - two executables are important - influxd and influx (just like mysqld and mysql or mongod and mongo)
influxd - the Influx DB daemon
influx - the command line utility to connect to the Influx DB - similar to SQL Plus
3. Influx DB is a time series DB. Hence, all data stored in the database is with the timestamp - the precision is configurable and can go up to nanoseconds.
4. Go through the documentation to learn more about influx CLI, creating DBs and the works.
Next up: Create your first Influx database, measurements, tags and fields - refer the primer here.
< Prev (Part 1: Introduction) Next (Part 2B: Influx DB data) >
- Get link
- X
- Other Apps
Comments