How to Install Elasticsearch on POP! OS Latest

Elasticsearch is a highly scalable and powerful search engine that's commonly used in applications requiring full-text search capabilities. If you're using POP! OS Latest and want to install Elasticsearch, here's a step-by-step guide.

Prerequisites

Before you begin with the installation, ensure that you have the following:

Step 1: Download Elasticsearch

First, download the Elasticsearch package file from Elastic's official website:

wget https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-7.15.1-linux-x86_64.tar.gz

Note: Make sure to replace the version number with the latest Elasticsearch version available.

Step 2: Extract the Elasticsearch package

Once you've downloaded Elasticsearch, extract the package using the following command:

tar -xvf elasticsearch-7.15.1-linux-x86_64.tar.gz

Note: Again, replace the version number with the latest Elasticsearch version available.

Step 3: Configure Elasticsearch

Navigate to the extracted Elasticsearch folder and access the config directory:

cd elasticsearch-7.15.1/config/

While in the config directory, open the elasticsearch.yml file using your preferred text editor:

sudo nano elasticsearch.yml

Locate the following lines:

# network.host: 192.168.0.1
# http.port: 9200

Uncomment those lines by removing the # symbol at the beginning of the lines and then make the following changes:

network.host: 127.0.0.1
http.port: 9200

Once you've made these changes, save the file and exit your text editor.

Step 4: Start Elasticsearch

To start Elasticsearch, navigate back to the root of the extracted Elasticsearch folder and run the following command:

./bin/elasticsearch

If Elasticsearch starts successfully, you should see the following message in your terminal:

[2021-11-01T10:27:46,312][INFO ][o.e.b.BootstrapChecks    ] [node_name] bound or publishing to a non-loopback address, enforcing bootstrap checks

Step 5: Verify Elasticsearch

To verify whether Elasticsearch is running correctly, open a browser and navigate to the following URL:

http://localhost:9200/

If Elasticsearch is running correctly, you should see a response that looks similar to the following:

{
  "name" : "node_name"
  "cluster_name" : "elasticsearch"
  "cluster_uuid" : "SQ6U8jzlQ_eLNjfVb2fJYg"
  "version" : {
    "number" : "7.15.1",
    ...
  }
  ...
}

Congratulations! You have now successfully installed Elasticsearch on your POP! OS Latest system!

Conclusion

Elasticsearch is an essential tool for applications that need to perform full-text searches. With the step-by-step guide outlined in this tutorial, we hope you were able to install Elasticsearch on your POP! OS system successfully!

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!