Skip to content

Instantly share code, notes, and snippets.

Forked from tkoeppen/
Created February 19, 2013 17:58
What would you like to do?
# install elasticsearch VERSION on Ubuntu 12.04 (precise)
curl -OL -k$
unzip elasticsearch-$
sudo mv elasticsearch-$VERSION /usr/local/
if [ -L /usr/local/elasticsearch ]
then sudo rm /usr/local/elasticsearch
sudo ln -s /usr/local/elasticsearch-$VERSION /usr/local/elasticsearch
# fix wrong permission from the original zip
sudo find /usr/local/elasticsearch/ -type d -exec chmod 755 {} \;
curl -L | tar -xz
sudo mv *servicewrapper*/service /usr/local/elasticsearch/bin/
rm -Rf *servicewrapper*
sudo chown -R root:root /usr/local/elasticsearch-$VERSION
# install init.d
if [ -L /etc/init.d/elasticsearch ]
then sudo rm /etc/init.d/elasticsearch
sudo /usr/local/elasticsearch/bin/service/elasticsearch install
if [ -L /usr/local/bin/elasticsearch ]
then sudo rm /usr/local/bin/elasticsearch
sudo ln -s `readlink -f /usr/local/elasticsearch/bin/service/elasticsearch` /usr/local/bin/elasticsearch
# fix missing logs dir for first wrapper start
sudo mkdir /usr/local/elasticsearch/logs
# eof
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment