In the following steps, we will guide you through the installation process of ElasticSearch 7 on a Debian server.
In your SSH, as root, run:
Code: Select all
wget -qO - https://artifacts.elastic.co/GPG-KEY-elasticsearch | sudo apt-key add -
sudo apt-get install apt-transport-https
echo "deb https://artifacts.elastic.co/packages/7.x/apt stable main" | sudo tee /etc/apt/sources.list.d/elastic-7.x.list
apt-get update
apt-get install elasticsearch
# Now let's optionally limit ElasticSearch RAM usage to 2 GB :
echo "" >> /etc/elasticsearch/jvm.options
echo "-Xms2g" >> /etc/elasticsearch/jvm.options
echo "-Xmx2g" >> /etc/elasticsearch/jvm.options
systemctl enable elasticsearch.service
systemctl start elasticsearch.service
systemctl status elasticsearch.service
# Test it:
curl -X GET "http://localhost:9200/?pretty"