-
-
Save aaronshaf/1190526 to your computer and use it in GitHub Desktop.
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 |
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
@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." } }
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
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
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
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
Now ES provides deb package, so just download from http://www.elasticsearch.org/download/ and install it.
Then service elasticsearch start
should work.
Thanks for writing this up, saved me quite a headache.