(Last Updated On: May 8, 2019)

In this guide, we will cover the installation of Elasticsearch 7.x or 6.x on Fedora 30 / Fedora 29 / Fedora 28. Elasticsearch is a highly scalable open-source analytics engine and full-text search. With Elasticsearch, you can store, search, and analyze big volumes of data faster and in near real-time.

Follow the steps provided in this article to have a working installation of Elasticsearch 7/6 on Fedora 30/29/28.

Step 1: Install Java on Fedora.

Elasticsearch depends on Java, you need it installed on your machine prior to installing Elasticsearch on Fedora. Default upstream version of OpenJDK can be installed on Fedora by running the commands:

sudo dnf install java-openjdk-devel java-openjdk

or use the link below to install Java 11.

How to Install Java 11 on CentOS 7 / Fedora 29 / Fedora 28

After the installation of Java, you can quickly confirm the version using the following command:

$ java -version
java version "11.0.1" 2018-10-16 LTS
Java(TM) SE Runtime Environment 18.9 (build 11.0.1+13-LTS)
Java HotSpot(TM) 64-Bit Server VM 18.9 (build 11.0.1+13-LTS, mixed mode)

Step 2: Add Elasticsearch 6 Repository to Fedora 30/29/28

After installing Java JDK, add Elasticsearch repository to your Fedora system.

1. Import GPG Key

sudo rpm --import https://artifacts.elastic.co/GPG-KEY-elasticsearch

2. Add Repository

For Elasticsearch 7.x

cat <<EOF | sudo tee /etc/yum.repos.d/elasticsearch.repo
[elasticsearch-7.x]
name=Elasticsearch repository for 7.x packages
baseurl=https://artifacts.elastic.co/packages/7.x/yum
gpgcheck=1
gpgkey=https://artifacts.elastic.co/GPG-KEY-elasticsearch
enabled=1
autorefresh=1
type=rpm-md
EOF

For Elasticsearch 6.x.

cat <<EOF | sudo tee /etc/yum.repos.d/elasticsearch.repo
[elasticsearch-6.x]
name=Elasticsearch repository for 6.x packages
baseurl=https://artifacts.elastic.co/packages/6.x/yum
gpgcheck=1
gpgkey=https://artifacts.elastic.co/GPG-KEY-elasticsearch
enabled=1
autorefresh=1
type=rpm-md
EOF

3.  Install Elasticsearch on Fedora 30/29/28

Elasticsearch repository is ready for use. You can install Elasticsearch using the command below:

sudo dnf install elasticsearch

JVM options like memory limits are set on /etc/elasticsearch/jvm.options

Start and enable elasticsearch service on boot:

sudo systemctl start elasticsearch
sudo systemctl enable elasticsearch

Check status:

$ sudo systemctl status elasticsearch
● elasticsearch.service - Elasticsearch
   Loaded: loaded (/usr/lib/systemd/system/elasticsearch.service; disabled; vendor preset: disabled)
   Active: active (running) since Mon 2018-11-19 20:43:01 UTC; 2s ago
     Docs: http://www.elastic.co
 Main PID: 2093 (java)
    Tasks: 14 (limit: 2359)
   Memory: 590.5M
   CGroup: /system.slice/elasticsearch.service
           └─2093 /bin/java -Xms512m -Xmx512m -XX:+UseConcMarkSweepGC -XX:CMSInitiatingOccupancyFraction=75 -XX:+UseCMSInitiatingOccupancyOnly -XX:+A>

Nov 19 20:43:01 fed29 systemd[1]: Started Elasticsearch.
Nov 19 20:43:02 fed29 elasticsearch[2093]: OpenJDK 64-Bit Server VM warning: Option UseConcMarkSweepGC was deprecated in version 9.0 and will likely >

Test to verify that it is working:

$ curl http://127.0.0.1:9200 
{
  "name" : "LfFm_OY",
  "cluster_name" : "elasticsearch",
  "cluster_uuid" : "YLZXkJ2OSKeFY2sPbHZGAA",
  "version" : {
    "number" : "6.5.0",
    "build_flavor" : "default",
    "build_type" : "rpm",
    "build_hash" : "816e6f6",
    "build_date" : "2018-11-09T18:58:36.352602Z",
    "build_snapshot" : false,
    "lucene_version" : "7.5.0",
    "minimum_wire_compatibility_version" : "5.6.0",
    "minimum_index_compatibility_version" : "5.0.0"
  },
  "tagline" : "You Know, for Search"
}

Step 3: Install Kibana on Fedora 30/29/28.

Kibana lets you visualize your Elasticsearch data and navigate the Elastic Stack. Install it after adding the repository using the command:

sudo dnf install -y kibana

After a successful installation, configure Kibana

$ sudo vim /etc/kibana/kibana.yml
server.host: "0.0.0.0"
server.name: "kibana.example.com"
elasticsearch.url: "http://localhost:9200"

Change other settings as desired then start kibana service:

sudo systemctl start kibana
sudo systemctl enable kibana

Access http://ip-address:5601 to open Kibana Dashboard:

If you have an active firewall, you’ll need to allow access to Kibana port:

sudo firewall-cmd --add-port=5601/tcp --permanent
sudo firewall-cmd --reload

For Ubuntu users, check

How to Install Elasticsearch on Ubuntu

Other Elasticsearch guides:

How to delete Elasticsearch Index data with curl