Install and configure Elasticsearch on Linux Ubuntu from terminal, a powerful Open Source search engine.
What is Elasticsearch
Elasticsearch is a search and analysis engine distributed under an open source license. Elasticsearch, uses the Information Retrieval (IR) paradigm, for indexing and retrieval structured and unstructured data.
Developed in Java, requiring the Java Virtual Machine to run, is used to search, analyze and visualize large amounts of data in real time very quickly and efficiently.
Install Elasticsearch from terminale
Here are the simple steps to install Elasticsearch on Linux Ubuntu using an SSH terminal
- Install Java JRE, if you have not already done it
- Install and configure Java JDK, if you have not already done it
- Download theElasticsearch installation package directly from the Elastic website
wget https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-7.17.9-amd64.deb
- After the download is finished, proceed withthe installation of the package
sudo dpkg -i elasticsearch-7.17.9-amd64.deb
- Enable and start the service with
sudo systemctl enable elasticsearch.service sudo systemctl start elasticsearch.service
Configure Elasticsearch on Linux Ubuntu
Ensure that Elasticsearch works only on the local server by editing the file /etc/elasticsearch/elasticsearch.yml
network.host: 127.0.0.1
Restart Elasticsearch services with the command
systemctl restart elasticsearch.service
and check that the Elasticsearch service is only listening on thelocal IP address with netstat
netstat -a -o -n | grep LISTEN
this is the command to install netstat, in case it is not already installed
sudo apt install net-tools