{"id":2851,"date":"2019-05-06T23:25:16","date_gmt":"2019-05-06T20:25:16","guid":{"rendered":"https:\/\/kifarunix.com\/?p=2851"},"modified":"2019-05-08T13:47:28","modified_gmt":"2019-05-08T10:47:28","slug":"install-influxdb-on-fedora-30-fedora-29","status":"publish","type":"post","link":"https:\/\/kifarunix.com\/install-influxdb-on-fedora-30-fedora-29\/","title":{"rendered":"Install InfluxDB on Fedora 30\/Fedora 29"},"content":{"rendered":"\n<p>Welcome to our guide on how to Install InfluxDB on Fedora 30\/Fedora 29. <a rel=\"noreferrer noopener\" aria-label=\"InfluxDB (opens in a new tab)\" href=\"https:\/\/www.influxdata.com\/\" target=\"_blank\">InfluxDB<\/a> is an open source time series database written in Go to provide scalable datastore for system metrics, events and real-time analytics. InfluxDB is designed to be fast, highly available and to handle high write and query loads. It is one of the major components of <a rel=\"noreferrer noopener\" aria-label=\"TICK (opens in a new tab)\" href=\"https:\/\/www.influxdata.com\/time-series-platform\/\" target=\"_blank\">TICK<\/a> stack which composes of Telegraf, InfluxDB, Chronograf and Kapacitor.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Install InfluxDB on Fedora 30\/Fedora 29<\/h2>\n\n\n\n<p>To install InfluxDB on Fedora, you can manually use the RPM package or you can create the InfluxDB repo and install it automatically from repos.<\/p>\n\n\n\n<p>We covered how to install Telegraf on Fedora 30\/Fedora 29 in our previous guide. See the link below.<\/p>\n\n\n\n<p><a href=\"https:\/\/kifarunix.com\/install-telegraf-on-fedora-30-fedora-29\/\" target=\"_blank\" rel=\"noreferrer noopener\" aria-label=\" (opens in a new tab)\">Install Telegraf on Fedora 30\/Fedora 29<\/a><\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Install InfluxDB using RPM package<\/h3>\n\n\n\n<p>To install InfluxDB using RPM package, download the binary file from the <a rel=\"noreferrer noopener\" aria-label=\"downloads page (opens in a new tab)\" href=\"https:\/\/portal.influxdata.com\/downloads\/\" target=\"_blank\">downloads page<\/a>.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><code>wget https:\/\/dl.influxdata.com\/influxdb\/releases\/influxdb-1.7.6.x86_64.rpm<\/code><\/pre>\n\n\n\n<p>Check the SHA256 hash of the downloaded binary if matches the hash provided on the downloads page, <code>ffcf0def4a0bffb74728c7aaa0ade39231ea4e91b3be67de5528d7982b295ea8<\/code>.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><code>sha256sum influxdb-1.7.6.x86_64.rpm<br>ffcf0def4a0bffb74728c7aaa0ade39231ea4e91b3be67de5528d7982b295ea8  influxdb-1.7.6.x86_64.rpm<br><\/code><\/pre>\n\n\n\n<p>If all is well, proceed to install InfluxDB;<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><code>dnf localinstall influxdb-1.7.6.x86_64.rpm<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">Install InfluxDB from InfluxDB Repository<\/h3>\n\n\n\n<p>To install InfluxDB from InfluxDB repos, you need to create the InfluxDB repository on Fedora 30 as shown below;<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>cat > \/etc\/yum.repos.d\/influxdb.repo &lt;&lt; EOF\n[influxdb]\nname = InfluxDB Repository\nbaseurl = https:\/\/repos.influxdata.com\/rhel\/7Server\/x86_64\/stable\/\nenabled = 1\ngpgcheck = 1\ngpgkey = https:\/\/repos.influxdata.com\/influxdb.key\nEOF<\/code><\/pre>\n\n\n\n<p>Next, install InfluxDB by running the command below;<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><code>dnf update<br>dnf install influxdb<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">Start and Enable InfluxDB service<\/h3>\n\n\n\n<p>Once the installation is done, you can start and enable InfluxDB service by running the commands;<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><code>systemctl start influxdb<br>systemctl enable influxdb<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">Open InfluxDB ports on Firewall<\/h3>\n\n\n\n<p>InfluxDB uses TCP ports 8086 and 8088 for client-server communication and for back up and restore operations respectively. Hence ensure that these ports are opened on firewalld.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><code>firewall-cmd --add-port={8086,8088}\/tcp --permanent<br>firewall-cmd --reload<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">Testing InfluxDB<\/h3>\n\n\n\n<p>Now that the installation of InfluxDB is done, you can, in basics, test it by creating a database as shown below;<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><code>curl -XPOST \"http:\/\/localhost:8086\/query\" --data-urlencode \"q=CREATE DATABASE testdb\"<br> {\"results\":[{\"statement_id\":0}]}<\/code><\/pre>\n\n\n\n<p>Well that seems okay. You can also verify this by logging into InfluxDB and showing the databases as shown below. InfluxDB supports InfluxQL, an SQL-like query language that enables you to execute SQL like queries on InfluxDB<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>influx\nConnected to http:\/\/localhost:8086 version 1.7.6\nInfluxDB shell version: 1.7.6\nEnter an InfluxQL query\n> show databases;\nname: databases\nname\n----\ntelegraf\n_internal\ntestdb<\/code><\/pre>\n\n\n\n<p>You can also create databases while you are logged in to InfluxDB just as you would on the other database systems;<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><code>create database testdb1 <\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code>> show databases;\nname: databases\nname\n----\ntelegraf\n_internal\ntestdb\ntestdb1\n><\/code><\/pre>\n\n\n\n<p>You can also create database user.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>> use testdb\nUsing database testdb\n> create user testuser with password 'StrongPass'\n><\/code><\/pre>\n\n\n\n<p>To show users in a database;<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>> show users\nuser     admin\n----     -----\ntestuser false<\/code><\/pre>\n\n\n\n<p>To create and grant a user all privileges;<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><code>> create user amos with password 'NicePASS' with all privileges<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code>> show users\nuser     admin\n----     -----\ntestuser false\namos     true<\/code><\/pre>\n\n\n\n<p>Great. That is just about it on how to install InfluxDB on Fedora 30. Enjoy.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Welcome to our guide on how to Install InfluxDB on Fedora 30\/Fedora 29. InfluxDB is an open source time series database written in Go to<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"rank_math_lock_modified_date":false,"footnotes":""},"categories":[936,72,932],"tags":[924,937,934],"class_list":["post-2851","post","type-post","status-publish","format-standard","hentry","category-influxdb","category-monitoring","category-tick-stack","tag-fedora-30","tag-influxdb","tag-tick-stack","generate-columns","tablet-grid-50","mobile-grid-100","grid-parent","grid-50"],"_links":{"self":[{"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/posts\/2851"}],"collection":[{"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/comments?post=2851"}],"version-history":[{"count":3,"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/posts\/2851\/revisions"}],"predecessor-version":[{"id":2882,"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/posts\/2851\/revisions\/2882"}],"wp:attachment":[{"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/media?parent=2851"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/categories?post=2851"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/tags?post=2851"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}