Question

ElasticSearch with Ubuntu

  • Posted May 7, 2014

I followed the guide here on how to install elastic search. https://www.digitalocean.com/community/articles/how-to-install-elasticsearch-on-an-ubuntu-vps#tutorial-comment-submit

It mentions that it’s outdated though for installing the deb packages. What would be the steps needed to install elasticsearch through their repository. I wasn’t entirely sure and obviously don’ want to mess it up.

Subscribe
Share

Submit an answer
You can type!ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

@Andrew SB <br> <br>Thanks Andrew, I seem to have it working. My Putty is showing it’s connected. <br> <br>Jonny

Just run the command as it is. It downloads the key on its own. <br> <br>The “wget” command downloads the key from the url provided. The " | " is called a pipe. It passes the results of the “wget” command to what comes after it, in this case the “apt-key add” command. Try just running: <br> <br><pre> <br>wget -O - http://packages.elasticsearch.org/GPG-KEY-elasticsearch <br></pre> <br> <br>You’ll see that it prints to the terminal the contents of the downloaded file. So when you add the second part, those contents are “piped” to the “apt-key add” command. <br> <br>I hope that’s clear. You might want to check out: <br> <br>https://www.digitalocean.com/community/articles/an-introduction-to-linux-i-o-redirection

Thanks Andrew, where you say “to install their key with:” Do I need to replace the first command where it says <br> <br>wget -O - http://packages.elasticsearch.org/GPG-KEY-elasticsearch | apt-key add <br> <br>With <br> <br>wget -O - http://packages.elasticsearch.org/ACTUAL-KEY-I-DOWNLOADED | apt-key add <br> <br>? <br> <br>If so do I need to include the initial “-----BEGIN PGP PUBLIC KEY BLOCK----- <br>Version: GnuPG v2.0.14 (GNU/Linux… rest of key” <br> <br>Like, literally copy the contents of the whole public key you can download here: <br> <br>http://packages.elasticsearch.org/GPG-KEY-elasticsearch <br> <br>Again apologies if this is ever so simple.

ElasticSearch now provides a Debian repository that makes it much easier to install it and keep it updated. See: <br> <br>http://www.elasticsearch.org/blog/apt-and-yum-repositories/ <br> <br>The basic install instructions are to install their key with: <br> <br><pre> <br>wget -O - http://packages.elasticsearch.org/GPG-KEY-elasticsearch | apt-key add <br></pre> <br> <br>Then, create a new file “/etc/apt/sources.list.d/elasticsearch.list” containing: <br> <br><pre> <br>deb http://packages.elasticsearch.org/elasticsearch/1.0/debian stable main <br></pre> <br> <br>Then run: <br> <br><pre> <br>apt-get update <br>apt-get install elasticsearch <br></pre>