Loading...

How to Install Elasticsearch on Ubuntu 18.04?

Simple.Predictable.Scalable

Easily deploy your favorite applications in seconds at an unbeatable price for your next projects.

Installing Elasticsearch on Ubuntu 18.04

Elasticsearch is a powerful search and analytics engine used for storing, searching, and analyzing large volumes of data. It is built on top of Apache Lucene and provides a scalable and distributed architecture, making it suitable for various use cases such as full-text search, log analysis, and data visualization.

Step 1: Update System Packages

Before installing Elasticsearch, it's always a good idea to update your Ubuntu system packages to their latest versions. Open the terminal and run the following commands:

sudo apt update sudo apt upgrade
  • sudo apt update updates the package lists for upgrades for packages already installed on your system.
  • sudo apt upgrade installs the most recent versions of all packages currently installed on your system.

Step 2: Install Java

Elasticsearch requires Java to run. You can check if Java is already installed by running the command java -version. If it's not installed, you can install it by running the following command:

sudo apt install openjdk-11-jdk

Step 3: Download and Install Elasticsearch

Next, we will download and install Elasticsearch. Run the following commands in the terminal:

wget -qO - https://artifacts.elastic.co/GPG-KEY-elasticsearch | sudo apt-key add - sudo apt install apt-transport-https echo "deb https://artifacts.elastic.co/packages/7.x/apt stable main" | sudo tee -a /etc/apt/sources.list.d/elastic-7.x.list sudo apt update sudo apt install elasticsearch

Step 4: Configure Elasticsearch

After the installation is complete, we need to configure Elasticsearch. Open the configuration file using the command:

sudo nano /etc/elasticsearch/elasticsearch.yml

Inside the file, find the line that starts with # network.host: and replace it with:

network.host: localhost

Save the changes and exit the editor.

Step 5: Start and Enable Elasticsearch

Start Elasticsearch service and enable it to start on boot with the following commands:

sudo systemctl start elasticsearch sudo systemctl enable elasticsearch

Step 6: Test Elasticsearch

To verify if Elasticsearch is running properly, run the following command:

curl -X GET "localhost:9200"

If everything is fine, you should get a response containing information about your Elasticsearch instance.

Congratulations! You have successfully installed Elasticsearch on Ubuntu 18.04. You can now integrate Elasticsearch with your applications to perform powerful search and analytics tasks.

Refer A Friend
Get $25

Installing Elasticsearch
Elasticsearch on Ubuntu
Elasticsearch on Ubuntu 18.04
Elasticsearch installation
Ubuntu Elasticsearch installation
Elastic search setup on Ubuntu
Ubuntu Elasticsearch setup
Installing Elasticsearch on Ubuntu 18.04 LTS
Elasticsearch installation guide
Elasticsearch setup tutorial

Why Customers Love Us

What our customers say about us

Ready To Get Started For Free?

Create your free account today.