Would you like to learn how to do a ElasticSearch installation on Ubuntu Linux? In this tutorial, we are going to show you how to install ElasticSearch on a computer running Ubuntu Linux.
• Ubuntu version: 18
• Ubuntu version: 19
• ElasticSearch version: 7.4.0
Hardware List:
The following section presents the list of equipment used to create this ElasticSearch tutorial.
Every piece of hardware listed above can be found at Amazon website.
ElasticSearch Related Tutorial:
On this page, we offer quick access to a list of tutorials related to ElasticSearch installation.
Tutorial ElasticSearch – Installation on Ubuntu Linux
Use apt-get to install the required packages.
Set the correct timezone and enable the NTP service.
In our example, we configured the America/Sao_Paulo timezone.
Set a hostname with a domain name using the hostnamectl command.
Try to ping the hostname of your Elastic server.
This command must ping the IP addres of the server.
Download and install the ElasticSearch repository key.
Add the official ElasticSearch repository to your APT database
Update the APT-GET database and install the ElasticSearch package.
Edit the ElasticSearch configuration file named: elasticsearch.yml
Add the following lines at the end of the file.
In our example, we allow the ElasticSearch service only on the server IP address: 192.168.15.15
Start the ElasticSearch service.
Use the following command to look at the ElasticSearch log file.
Here is the command output:
Use the NETSTAT command to verify if the service is running on ports 9200 and 9300.
In our example, the ElasticSearch service is running on ports 9200 and 9300.
Verify the Elasticsearch server status.
Here is the expected command output.
Use the following comand to test your ElasticSearch installation.
The ElasticSearch service should reply your request.
Another way to test your Elasticsearch installation is to use your browser.
Open your browser and enter the IP address of your ElasticSearch server plus :9200.
In our example, the following URL was entered in the Browser:
• http://192.168.15.15:9200
The ElasticSearch rest interface should answer your request:
Configure the ElasticSearch service to start during boot time.
Congratulations! You have finished the ElasticSearch installation on Ubuntu Linux.
Tutorial ElasticSearch – Add Information
Use the following command to add information to your ElasticSearch installation.
In our example, we created an index named tutorial and the type techarticle suing the identification number 1.
The ElasticSearch system should acknowledge your entry.
Use the following command to get your information from the ElasticSearch installation.
The ElasticSearch service should reply your request.
If you add ?pretty to the end of your request, the ElasticSearch sever will present the information like this:
Use the following command to modify information in the ElasticSearch server.
Test again your ElasticSearch communication.
Congratulations! You have tested your ElasticSearch communication.