I started playing around with elasticsearch and after searching a little bit I found a way to install it quickly and with minimal/default settings
By executing the following steps:
rpm --import https://artifacts.elastic.co/GPG-KEY-elasticsearch vim /etc/yum.repos.d/elasticsearch.repo
You need to add the following:
[Elasticsearch-7] name=Elasticsearch 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
Next we just need to run:
yum install -y elasticsearch
Lastly, let’s make a small change on the settings by editing the following file:
Update the following line to make it look like this:
Now, please start the service and test it running:
curl -X GET "localhost:9200/?pretty"
It should return something otherwise something is wrong.