To install Elasticsearch, add the key
1 |
wget -qO - https://artifacts.elastic.co/GPG-KEY-elasticsearch | sudo apt-key add - |
add apt repository
1 2 |
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 |
install elasticsearch with apt
1 2 |
apt-get update apt-get install elasticsearch |
Set elasticsearch to start on boot
1 2 |
systemctl daemon-reload systemctl enable elasticsearch |
Elasticsearch can be started and stopped as follows:
1 2 |
systemctl start elasticsearch systemctl stop elasticsearch |
verify elasticsearch is running with
1 |
systemctl status elasticsearch |
or with
1 |
curl localhost:9200 |
if it fail to start, you can debug with
1 |
journalctl --unit elasticsearch |
See elasticsearch