“Cara Install Elasticsearch pada CentOS 8”
Elasticsearch adalah mesin analitik dan pencarian teks lengkap terdistribusi open-source. Ini mendukung operasi RESTful dan memungkinkan Anda untuk menyimpan, mencari, dan menganalisis data dalam jumlah besar secara real-time. Elasticsearch adalah salah satu mesin pencari paling populer yang mendukung aplikasi yang memiliki persyaratan pencarian yang kompleks seperti toko e-commerce besar dan aplikasi analitik.
Cara Install Elasticsearch pada CentOS 8
1. Install Java
- Install Java
dnf install java-11-openjdk-devel
- Cek versi
java -version
- Setting Java
nano /etc/elasticsearch/jvm.options
-Xms4g -Xmx4g
2. Install Elasticsearch
- Import GPG key
sudo rpm --import https://artifacts.elastic.co/GPG-KEY-elasticsearch
- Tambahkan repo elastic
sudo nano /etc/yum.repos.d/elasticsearch.repo
[elasticsearch-7.x] 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
- Install elasticsearch
sudo dnf install elasticsearch
- Enable service
sudo systemctl enable elasticsearch.service --now
- Test curl
curl -X GET "localhost:9200/"
{ "name" : "localdomain", "cluster_name" : "elasticsearch", "cluster_uuid" : "V_mfjn2PRJqX3PlZb_VD7w", "version" : { "number" : "7.6.0", "build_flavor" : "default", "build_type" : "rpm", "build_hash" : "7f634e9f44834fbc12724506cc1da681b0c3b1e3", "build_date" : "2020-02-06T00:09:00.449973Z", "build_snapshot" : false, "lucene_version" : "8.4.0", "minimum_wire_compatibility_version" : "6.8.0", "minimum_index_compatibility_version" : "6.0.0-beta1" }, "tagline" : "You Know, for Search" }
- cek log
journalctl -u elasticsearch
3. Konfigurasi Elasticsearch
sudo firewall-cmd --new-zone=elasticsearch --permanent sudo firewall-cmd --reload sudo firewall-cmd --zone=elasticsearch --add-source=192.168.10.80/32 --permanent sudo firewall-cmd --zone=elasticsearch --add-port=9200/tcp --permanent sudo firewall-cmd --reload
- setting elastic
nano /etc/elasticsearch/elasticsearch.yml
network.host: 0.0.0.0 cluster.name: elk node.name: node-1 network.host: localhost http.port: 9200
- restart service
systemctl restart elasticsearch
Sahabat Blog Learning & Doing demikianlah penjelasan mengenai Cara Install Elasticsearch pada CentOS 8. Semoga Bermanfaat . Sampai ketemu lagi di postingan berikut nya.