Facebook Twitter Instagram
    TecAdmin
    • Home
    • Ubuntu 20.04
      • Upgrade Ubuntu
      • Install Java
      • Install Node.js
      • Install Docker
      • Install LAMP Stack
    • Tutorials
      • AWS
      • Shell Scripting
      • Docker
      • Git
      • MongoDB
    • FeedBack
    • Submit Article
    • About Us
    Facebook Twitter Instagram
    TecAdmin
    Home»General Articles»How To Install Elasticsearch on Fedora 34/33

    How To Install Elasticsearch on Fedora 34/33

    RahulBy RahulOctober 21, 20202 Mins ReadUpdated:June 13, 2021

    Elasticsearch is a modern search and analytics engine based on Apache Lucene. It is completely open-source and built with Java. It stored data in form of documents and provides APIs for the full-text search. Elasticsearch is distributed under the Apache 2 license, which provides it flexibility.

    This tutorial will help you to install and configure Elasticsearch on Fedora Linux systems.

    Prerequisites

    Java is the primary requirement for running elasticsearch. We assume you already have Java installed on your Fedora system.

    You can use following command to install OpenJDK java on your system. Open a terminal and execute:

    sudo dnf install java-11-openjdk 
    

    After installation, check the Java version:

    java -version 
    

    Step 1 – Install ElasticSearch on Fedora

    1. First of all, Download and install the Public Signing Key for elasticsearch:
      sudo rpm --import https://artifacts.elastic.co/GPG-KEY-elasticsearch 
      
    2. Next create a repository file elasticsearch.repo in the directory /etc/yum.repos.d and add below content to file.
      [Elasticsearch-7]
      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
      

      Save this file and close it.

    3. Clean the dnf cache and install elasticsearch package on your fedora system:
      sudo dnf clean 
      sudo yum install elasticsearch 
      
    4. Elasticsearch RPM package has been installed. Next, you need to configure elasticsearch based on your environment.

      Step 2 – Configure Elasticsearch

      Edit the elasticsearch configuration file elasticsearch.yml and set the network.host to localhost. You can also change it to the system LAP IP address to make it accessible over the network.

      vim /etc/elasticsearch/elasticsearch.yml 
      
        network.host: localhost
      

      Then enable the elasticsearch service and start it.

      sudo systemctl enable elasticsearch 
      sudo systemctl start elasticsearch 
      

      The ElasticSearch has been successfully installed and running on your Fedora system.

      Step 3 – Test Elasticsearch

      Elasticsearch listens on port 9200 for the REST APIs. Port 9300 is used by the elasticsearch for communication between nodes.

      Let’s connect on port 5200 via REST API to view the elasticsearch version.

      curl -X GET "localhost:9200/?pretty" 
      

      You will see the results like below:

      {
        "name" : "tecadmin",
        "cluster_name" : "elasticsearch",
        "cluster_uuid" : "HY8HoLHnRCeb3QzXnTcmrQ",
        "version" : {
          "number" : "7.9.2",
          "build_flavor" : "default",
          "build_type" : "rpm",
          "build_hash" : "d34da0ea4a966c4e49417f2da2f244e3e97b4e6e",
          "build_date" : "2020-09-23T00:45:33.626720Z",
          "build_snapshot" : false,
          "lucene_version" : "8.6.2",
          "minimum_wire_compatibility_version" : "6.8.0",
          "minimum_index_compatibility_version" : "6.0.0-beta1"
        },
        "tagline" : "You Know, for Search"
      }
      

      As the the above connected node name is tecadmin running elasticsearch version 7.9.2.

      Conclusion

      In this tutorial, you have learned to install and configure Elasticsearch on the Fedora Linux system.

    Share. Facebook Twitter Pinterest LinkedIn Tumblr Email WhatsApp
    Previous ArticleHow To Install Python 3.9 on Ubuntu 18.04
    Next Article How to Use AppImage on Linux (Beginner Guide)

    Related Posts

    What is CPU? – Definition, Types and Parts

    3 Mins Read

    How to Install Ionic Framework on Ubuntu 22.04

    3 Mins Read

    What is the /etc/hosts file in Linux

    Updated:June 27, 20222 Mins Read

    Creating DMARC Record for Your Domain

    Updated:June 29, 20223 Mins Read

    What is Computer Hardware?

    4 Mins Read

    What is Information Technology (IT)?

    Updated:June 29, 20223 Mins Read

    Leave A Reply Cancel Reply

    Recent Posts
    • What is CPU? – Definition, Types and Parts
    • What is the /etc/aliases file
    • What is the /etc/nsswitch.conf file in Linux
    • How to Install Ionic Framework on Ubuntu 22.04
    • What is the /etc/hosts file in Linux
    Facebook Twitter Instagram Pinterest
    © 2022 Tecadmin.net. All Rights Reserved | Terms  | Privacy Policy

    Type above and press Enter to search. Press Esc to cancel.