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.
1 | vi /etc/yum.repos.d/kibana.repo |
We open the repo with the vi editor and copy the text below after pressing the i key.
1 2 3 4 5 6 7 8 | [kibana-7.x] name=Kibana repository for 7.x packages baseurl=https://artifacts.elastic.co/packages/7.x/yum gpgcheck=1 gpgkey=https://artifacts.elastic.co/GPG-KEY-elasticsearch enabled=1 autorefresh=1 type=rpm-md |
After copying the text above, we save and exit by typing :wq!
.
Let’s check that our repo has been created with the help of the command below.
1 | 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.
1 | yum install elasticsearch -y |
After the installation is complete, we enable the service.
1 | systemctl enable elasticsearch.service |
After our service is enabled, let’s start the service.
1 | 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.
1 | systemctl status elasticsearch.service |
You may need some configurations after installation. You can find necessary information in the below article.
How To Install Elasticsearch On Centos