In this article, we will install elasticsearch 7.9 on Centos 7 and 8. We talked about ElasticSearch as a Search Engine and its general terms in the article named What is Elasticsearch. You can find other ELK articles in our menu Analytics && BI -> ELK.
If Java is not installed on your system, you must first install Java. You can find necessary steps in our previous article How To Install Elasticsearch on Centos
Install Elasticsearch 7.9 on Centos 7 and 8
I performed this installation on Centos 7 and Centos 8. So this article covers both Centos version.
First, let’s create our repository. We write it as follows with the vi command.
We open the repo with the vi editor and copy the text below after pressing the i key.
name=Kibana repository for 7.x packages
After copying the text above, we save and exit by typing
Let’s check that our repo has been created with the help of the command below.
ls -lrh /etc/yum.repos.d/
It should be formed as kibana.repo as below.
At the time of writing this article, since the latest Repo is 7.9.1-1, when we run the yum command below, it will install the latest elasticsearch version. If you want to install a specific Elasticsearch version, you can write the version information in the part indicated by x above in kibana.repo.
yum install elasticsearch -y
After the installation is complete, we enable the service.
systemctl enable elasticsearch.service
After our service is enabled, let’s start the service.
systemctl start elasticsearch.service
Our Elasticsearch service is ready to be used now. Let’s check the status of our service with the help of the command below.
systemctl status elasticsearch.service
You may need some configurations after installation. You can find necessary information in the below article.