How to Install Elasticsearch on Manjaro

Elasticsearch is an open-source, distributed search engine that is used for full-text search, analytics, and more. In this tutorial, we will guide you through the process of installing Elasticsearch on Manjaro.

Prerequisites

Before we start the installation process, ensure that your Manjaro system has the following prerequisites:

Step 1: Update Manjaro

Before installing Elasticsearch, update your system by running the following command:

sudo pacman -Syu

This process may take a while to complete, depending on the number of packages that need updating.

Step 2: Install Elasticsearch

Once your system has been updated, you can install Elasticsearch by following these steps:

  1. Download the latest version of Elasticsearch from the official website here.

  2. Extract the downloaded archive file to your preferred location. For example:

    tar -xzf elasticsearch-7.14.0-linux-x86_64.tar.gz
    
  3. Move the extracted files to /usr/share/elasticsearch/:

    sudo mv elasticsearch-7.14.0 /usr/share/elasticsearch/
    
  4. Next, create a soft link for ElasticSearch:

    sudo ln -s /usr/share/elasticsearch/bin/elasticsearch /usr/bin/elasticsearch
    
  5. Modify the jvm.options file to ensure Elasticsearch uses Java 8:

    sudo nano /usr/share/elasticsearch/config/jvm.options
    

    Uncomment the following line by removing the #:

    -XX:+UseConcMarkSweepGC
    
  6. Finally, start the Elasticsearch service with:

    sudo systemctl start elasticsearch
    

    You can check the status of the service by running the command below:

    sudo systemctl status elasticsearch
    

Step 3: Test Elasticsearch

To test that Elasticsearch has been installed correctly, you can run the following command:

curl -X GET "localhost:9200/"

If everything has been installed correctly, you should see a response that looks something like this:

{
  "name" : "node-1",
  "cluster_name" : "elasticsearch",
  "cluster_uuid" : "xyz",
  "version" : {
    "number" : "7.14.0",
    "build_flavor" : "default",
    "build_type" : "tar",
    "build_hash" : "unknown",
    "build_date" : "unknown",
    "build_snapshot" : false,
    "lucene_version" : "8.9.0",
    "minimum_wire_compatibility_version" : "6.8.0",
    "minimum_index_compatibility_version" : "6.0.0-beta1"
  },
  "tagline" : "You Know, for Search"
}

Conclusion

Congratulations! You have successfully installed Elasticsearch on your Manjaro system. You can now start using Elasticsearch for all your full-text search needs. If you encounter any issues during the installation process, refer to the Elasticsearch documentation for more information.

If you want to self-host in an easy, hands free way, need an external IP address, or simply want your data in your own hands, give IPv6.rs a try!

Alternatively, for the best virtual desktop, try Shells!