Elasticsearch setup
Installing Elasticsearch¶
The installation on this article is based on RHEL version 8, you can use yum instead of dnf.
Switch to superuser
sudo su
Update applications installed on a system
dnf update
Install vim editor - the colored editor may indicate errors in the config files
dnf -y install vim
Install java. You can specify the version and release you desire.
dnf -y install java
Import the elasticsearch GnuPG key
rpm --import https://artifacts.elastic.co/GPG-KEY-elasticsearch
Create a file called elasticsearch.repo
in the /etc/yum.repos.d/
directory with the command
vim /etc/yum.repos.d/elasticsearch.repo
and paste the following then save the file:
[elasticsearch]
name=Elasticsearch repository for 8.x packages
baseurl=https://artifacts.elastic.co/packages/8.x/yum
gpgcheck=1
gpgkey=https://artifacts.elastic.co/GPG-KEY-elasticsearch
enabled=0
autorefresh=1
type=rpm-md
Install Elasticsearch
dnf install --enablerepo=elasticsearch elasticsearch
systemctl daemon-reload
systemctl enable elasticsearch.service
systemctl start elasticsearch.service
Reference link Elasticsearch setup