How to install the Elasticsearch analytics engine with a handy GUI on AlmaLinux

2 weeks ago 12
PR Distribution

If your concern needs a almighty hunt and analytics engine, Elasticsearch mightiness beryllium conscionable the ticket. Jack Wallen shows you however to get this and a useful web browser add-on up and running.

big information  search

Image: iStock/HAKINMHAN

Elasticsearch is simply a almighty hunt and analytics motor utilized by enterprises and businesses astir the globe. With this platform, you tin store, hunt and analyse large volumes of information and bash truthful successful adjacent existent time.

SEE: Electronic Data Disposal Policy (TechRepublic Premium)

I privation to locomotion you done the steps of installing Elasticsearch and present you to a adjuvant GUI. The 1 happening astir this operation you indispensable recognize is that it's not going to crook Elasticsearch into a point-and-click affair. You'll inactive want/need to cognize however to usage Elasticsearch from the bid enactment (I'll amusement you a mates of examples).

It's important you cognize that we're going to beryllium installing Elasticsearch specified that it's lone reachable via localhost. Because of that, you'll privation to usage AlmaLinux with a desktop environment. I've attempted to configure Elasticsearch to judge web connections from extracurricular of localhost, but immoderate web configuration different than either localhost oregon 127.0.0.1 causes Elasticsearch to neglect to run. I americium not definite if this is simply a bug successful the existent merchandise oregon an contented with AlmaLinux. I adjacent tested this with SELinux disabled (don't bash that) and the work inactive fails to start. Ergo ... localhost.

With that said, let's install.

What you'll request

To marque this happen, you'll request a moving lawsuit of AlmaLinux and a idiosyncratic with sudo privileges. That's it. Let's get to work.

How to instal Elasticsearch

The archetypal happening we're going to bash is alteration the EPEL repo with the command:

sudo dnf instal epel-release -y

Once that completes, alteration EPEL groups with:

sudo dnf --enablerepo=epel group

Next, we person to instal Java 11 with the command:

sudo dnf instal java-11-openjdk-devel

Now, we tin instal the Elasticsearch GPG cardinal with:

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

Create a yum repository record with:

sudo nano /etc/yum.repos.d/elasticsearch.repo

Paste the pursuing into the caller file:

[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

Save and adjacent the file. 

Update DNF and instal Elasticsearch with:

sudo dnf update sudo dnf instal elasticsearch -y

How to configure Elasticsearch

Open the Elasticsearch configuration record with:

sudo nano /etc/elasticsearch/elasticsearch.yml

In that file, you'll privation to edit the pursuing 2 options:

#cluster.name: #node.name:

Remove the # characters and past springiness each a name. It's important for cluster.name that you wrapper it successful quotes, arsenic in:

cluster.name: "My Cluster"

Save and adjacent the file.

Start and alteration Elasticsearch with:

sudo systemctl alteration elasticsearch sudo systemctl commencement elasticsearch

How to trial Elasticsearch

The archetypal happening you request to bash is marque definite you tin link to Elasticsearch. For that, contented the command:

curl -X GET "localhost:9200/"

You should spot thing like:

{ "name" : "node-1", "cluster_name" : "Adorkable Cluster", "cluster_uuid" : "-plxw1g-TiurPS9OrHivrA", "version" : { "number" : "7.15.0", "build_flavor" : "default", "build_type" : "rpm", "build_hash" : "79d65f6e357953a5b3cbcc5e2c7c21073d89aa29", "build_date" : "2021-09-16T03:05:29.143308416Z", "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" }

Next, we'll adhd information to our Elasticsearch lawsuit (also utilizing the curl command). Let's make an introduction named trtest/blog/1 with a connection of Hello, TechRepublic! For that, the bid would be:

curl -H 'Content-Type: application/json' -X POST 'http://localhost:9200/trtest/blog/1' -d '{ "message": "Hello, TechRepublic!" }'

Retrieve the information we conscionable added with the command:

curl -X GET 'http://localhost:9200/trtest/blog/1'

Elasticsearch should study back:

{"_index":"trtest","_type":"blog","_id":"1","_version":1,"_seq_no":0,"_primary_term":1,"found":true,"_source":{ "message": "Hello, TechRepublic!" }}

Congratulations, Elasticsearch is working.

How to usage Elasticvue

Elasticvue is simply a browser add-on that allows you to link to your Elasticsearch lawsuit and features:

  • Cluster overview

  • Node overview

  • Index absorption

  • Index alias absorption

  • Document hunt

  • REST GUI

  • Snapshot and repository absorption

  • Utilities for clump cleaning and trial information summation

To instal the app, caput implicit to the official Elasticvue website and instal the add-on for your browser of choice. Once you've installed the addon, unfastened it and then, successful the resulting model (Figure A), click TEST CONNECTION.

Figure A

elastica.jpg

Elasticvue installed connected Firefox is acceptable for testing.

The transportation trial should pass, truthful click CONNECT and Elasticvue volition beryllium connected to your Elasticsearch lawsuit (Figure B).

Figure B

elasticb.jpg

Elasticvue is present connected to my lawsuit of Elasticsearch.

One happening I highly urge you bash is spell to UTILITIES and past click the RUN buttons for some Create 10 bare indices and Create twitter scale and adhd 100 tweets. This volition adhd trial information to Elasticsearch that you tin enactment wrong Elasticvue. Once you person a consciousness of however Elasticvue works, you tin spell backmost to UTILITIES and click RUN associated with Delete each indices.

And that's each determination is to installing Elasticsearch and past adding a useful web browser add-on to presumption your instance. For galore endeavor industries, tools similar Elasticsearch are a must-have, truthful you should commencement getting up to velocity with this instrumentality arsenic soon arsenic you can.

Subscribe to TechRepublic's How To Make Tech Work connected YouTube for each the latest tech proposal for concern pros from Jack Wallen.

Data, Analytics and AI Newsletter

Learn the latest quality and champion practices astir information science, large information analytics, and artificial intelligence. Delivered Mondays

Sign up today

Also see

Read Entire Article