Pertama, install package apt-transport-https:

sudo apt install apt-transport-https

Kemudian import Elasticsearch PGP Key:

wget -qO - https://artifacts.elastic.co/GPG-KEY-elasticsearch | sudo apt-key add -

Tambahkan repository Elasticsearch ke package manager:

echo "deb https://artifacts.elastic.co/packages/7.x/apt stable main" | sudo tee -a /etc/apt/sources.list.d/elastic-7.x.list

Kemudian install Elasticsearch:

sudo apt-get update && sudo apt-get install elasticsearch

Jalankan elasticsearch:

sudo systemctl start elasticsearch

Periksa apakah elasticsearch sudah running:

curl -X GET "localhost:9200/?pretty"

Jika berhasil, akan muncul response berikut di console:

{
"name" : "bravoos",
"cluster_name" : "elasticsearch",
"cluster_uuid" : "UKupPwh3RCeQ7FnoRJtFUg",
"version" : {
"number" : "7.4.2",
"build_flavor" : "default",
"build_type" : "deb",
"build_hash" : "2f90bbf7b93631e52bafb59b3b049cb44ec25e96",
"build_date" : "2019-10-28T20:40:44.881551Z",
"build_snapshot" : false,
"lucene_version" : "8.2.0",
"minimum_wire_compatibility_version" : "6.8.0",
"minimum_index_compatibility_version" : "6.0.0-beta1"
},
"tagline" : "You Know, for Search"
}

LEAVE A REPLY

Please enter your comment!
Please enter your name here