From a890b11790b9fc0d0ad4f22889eda8835aab931a Mon Sep 17 00:00:00 2001 From: j Date: Sat, 18 Nov 2023 20:52:30 +0100 Subject: [PATCH] make elasticsearch work as a single-node and limit ram --- vm/install_elasticsearch.sh | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/vm/install_elasticsearch.sh b/vm/install_elasticsearch.sh index 87e7a0ba8..bfd1970f7 100755 --- a/vm/install_elasticsearch.sh +++ b/vm/install_elasticsearch.sh @@ -3,6 +3,14 @@ curl -sL https://artifacts.elastic.co/GPG-KEY-elasticsearch | sudo apt-key add - echo "deb https://artifacts.elastic.co/packages/7.x/apt stable main" > /etc/apt/sources.list.d/elasticsearch.list apt-get update -qq apt-get -y install elasticsearch +cat >> /etc/elasticsearch/elasticsearch.yml << EOF +xpack.security.enabled: false +discovery.type: single-node +EOF +cat > /etc/elasticsearch/jvm.options.d/mem.options << EOF +-Xms8g +-Xmx8g +EOF systemctl enable elasticsearch.service systemctl start elasticsearch.service #curl -X GET "http://localhost:9200/?pretty"