How to Install Elasticsearch on Manjaro
Elasticsearch is an open-source, distributed search engine that is used for full-text search, analytics, and more. In this tutorial, we will guide you through the process of installing Elasticsearch on Manjaro.
Prerequisites
Before we start the installation process, ensure that your Manjaro system has the following prerequisites:
- A user account with
sudoprivileges - Java 8 or higher version installed on your system
- A stable internet connection
Step 1: Update Manjaro
Before installing Elasticsearch, update your system by running the following command:
sudo pacman -Syu
This process may take a while to complete, depending on the number of packages that need updating.
Step 2: Install Elasticsearch
Once your system has been updated, you can install Elasticsearch by following these steps:
Download the latest version of Elasticsearch from the official website here.
Extract the downloaded archive file to your preferred location. For example:
tar -xzf elasticsearch-7.14.0-linux-x86_64.tar.gzMove the extracted files to
/usr/share/elasticsearch/:sudo mv elasticsearch-7.14.0 /usr/share/elasticsearch/Next, create a soft link for ElasticSearch:
sudo ln -s /usr/share/elasticsearch/bin/elasticsearch /usr/bin/elasticsearchModify the
jvm.optionsfile to ensure Elasticsearch uses Java 8:sudo nano /usr/share/elasticsearch/config/jvm.optionsUncomment the following line by removing the
#:-XX:+UseConcMarkSweepGCFinally, start the Elasticsearch service with:
sudo systemctl start elasticsearchYou can check the status of the service by running the command below:
sudo systemctl status elasticsearch
Step 3: Test Elasticsearch
To test that Elasticsearch has been installed correctly, you can run the following command:
curl -X GET "localhost:9200/"
If everything has been installed correctly, you should see a response that looks something like this:
{
"name" : "node-1",
"cluster_name" : "elasticsearch",
"cluster_uuid" : "xyz",
"version" : {
"number" : "7.14.0",
"build_flavor" : "default",
"build_type" : "tar",
"build_hash" : "unknown",
"build_date" : "unknown",
"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"
}
Conclusion
Congratulations! You have successfully installed Elasticsearch on your Manjaro system. You can now start using Elasticsearch for all your full-text search needs. If you encounter any issues during the installation process, refer to the Elasticsearch documentation for more information.