Skip to content

Instantly share code, notes, and snippets.

@aaronshaf
Created September 3, 2011 03:53
Show Gist options
  • Star 41 You must be signed in to star a gist
  • Fork 31 You must be signed in to fork a gist
  • Save aaronshaf/1190526 to your computer and use it in GitHub Desktop.
Save aaronshaf/1190526 to your computer and use it in GitHub Desktop.
Install ElasticSearch on Ubuntu 11.04
cd ~
sudo apt-get update
sudo apt-get install unzip curl python-software-properties -y
#sudo add-apt-repository "deb http://archive.canonical.com/ lucid partner"
sudo add-apt-repository ppa:ferramroberto/java
sudo apt-get update
sudo apt-get install sun-java6-jre sun-java6-plugin -y
wget https://github.com/downloads/elasticsearch/elasticsearch/elasticsearch-0.18.7.tar.gz -O elasticsearch.tar.gz
tar -xf elasticsearch.tar.gz
rm elasticsearch.tar.gz
sudo mv elasticsearch-* elasticsearch
sudo mv elasticsearch /usr/local/share
curl -L http://github.com/elasticsearch/elasticsearch-servicewrapper/tarball/master | tar -xz
mv *servicewrapper*/service /usr/local/share/elasticsearch/bin/
rm -Rf *servicewrapper*
sudo /usr/local/share/elasticsearch/bin/service/elasticsearch install
sudo ln -s `readlink -f /usr/local/share/elasticsearch/bin/service/elasticsearch` /usr/local/bin/rcelasticsearch
#curl http://localhost:9200
@ondreian
Copy link

ondreian commented Dec 6, 2011

Thanks for writing this up, saved me quite a headache.

@Chrysweel
Copy link

I did all the steps, but localhost:9200 doesnt work, and when I do "sudo bin/elasticsearch -f" dont stop, and while this process is active, localhost:9200 response, but when I do ctrl + c to stop, goodbye.

Anyone know what happens ? Thanks

@emgiezet
Copy link

@Chysweel:

Use: sudo /etc/init.d/elasticsearch start
After you will got:
$ curl http://localhost:9200 { "ok" : true, "name" : "Foster, Bill", "version" : { "number" : "0.17.6", "date" : "2011-08-13T10:10:03", "snapshot_build" : false }, "tagline" : "You Know, for Search", "cover" : "DON'T PANIC", "quote" : { "book" : "The Restaurant at the End of the Universe", "chapter" : "Chapter 18", "text1" : "\"Er...\" he said, \"hello. Er, look, I'm sorry I'm a bit late. I've had the most ghastly time, all sorts of things cropping up at the last moment.\"", "text2" : "He seemed nervous of the expectant awed hush. He cleared his throat.", "text3" : "\"Er, how are we for time?\" he said, \"have I just got a min—\"", "text4" : "And so the Universe ended." } }

@alvaromorais
Copy link

As in https://lists.ubuntu.com/archives/ubuntu-security-announce/2011-December/001528.html
the ppa was removed
It won't work in 12.04

http://blog.flexion.org/2012/01/16/install-sun-java-6-jre-jdk-from-deb-packages/

for quick install:

cd ~/
wget https://raw.github.com/flexiondotorg/oab-java6/master/oab-java6.sh -O oab-java6.sh
chmod +x oab-java6.sh
sudo ./oab-java6.sh

@KazW
Copy link

KazW commented May 15, 2012

This gist will soon be unusable and/or violate Oracle's license, I have created a new one using the info from pluri-it's comment.
https://gist.github.com/2700316

@mdoroudi
Copy link

I had to update my elasticsearch to the latest version for it to work and start
https://github.com/downloads/elasticsearch/elasticsearch/elasticsearch-0.19.3.tar.gz

Copy link

ghost commented Dec 2, 2012

the wget address has changed:

cd ~/
wget https://github.com/flexiondotorg/oab-java6/raw/0.2.6/oab-java.sh -O oab-java.sh
chmod +x oab-java.sh
sudo ./oab-java.sh

@lxyu
Copy link

lxyu commented Apr 4, 2013

Now ES provides deb package, so just download from http://www.elasticsearch.org/download/ and install it.

Then service elasticsearch start should work.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment