forked from 0x2620/pandora
make elasticsearch work as a single-node and limit ram
This commit is contained in:
parent
dca95f9d95
commit
a890b11790
1 changed files with 8 additions and 0 deletions
|
@ -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
|
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 update -qq
|
||||||
apt-get -y install elasticsearch
|
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 enable elasticsearch.service
|
||||||
systemctl start elasticsearch.service
|
systemctl start elasticsearch.service
|
||||||
#curl -X GET "http://localhost:9200/?pretty"
|
#curl -X GET "http://localhost:9200/?pretty"
|
||||||
|
|
Loading…
Reference in a new issue