Skip to content

Instantly share code, notes, and snippets.

@garlandkr
Created September 20, 2012 01:28
Show Gist options
  • Save garlandkr/3753451 to your computer and use it in GitHub Desktop.
Save garlandkr/3753451 to your computer and use it in GitHub Desktop.
Installing Redis Elasticsearch and Logstash

This will be a copy/paste doc for installing redis, elasticsearch and logstash on ubuntu 12.04

Pre-Requisites

apt-get update
apt-get upgrade
apt-get install tcl8.5 tcl8.5-dev build-essential rubygems git \
htop python-dev openjdk-7-jre-headless libcurl4-openssl-dev \
bison ctags flex gperf libevent-dev libpcre3-dev libssl-dev libreadline6-dev \
libtokyocabinet-dev libncursesw5-dev libxml2-dev libxslt1-dev libsqlite3-dev \
unzip libzmq-dev -y
gem install bundler
reboot

Redis

cd /opt/
wget http://redis.googlecode.com/files/redis-2.4.17.tar.gz
tar zxvf redis-2.4.17.tar.gz
mv redis-2.4.17 redis
cd redis
make; make test
make install
cp utils/redis_init_script /etc/init.d/redis
mkdir /etc/redis
cp redis.conf /etc/redis.conf
update-rc.d redis defaults
service redis start

If everything works out you can edit the conf and enable daemon mode if you want. There might also be some issues with the init, pid and conf file name. Adjust them all to suit your environment, the current version expects the port number to be involved more than I'd like since I'm only running one redis server.

Elasticsearch

cd /opt/
wget https://github.com/downloads/elasticsearch/\
elasticsearch/elasticsearch-0.19.9.tar.gz
tar zxvf elasticsearch-0.19.9.tar.gz
mv elasticsearch-0.19.9 elasticsearch
git clone https://github.com/elasticsearch/elasticsearch-servicewrapper.git
cp -Rpf elasticsearch-servicewrapper/service elasticsearch/bin/
cd elasticsearch
vi bin/service/elasticsearch.conf # need to edit the top entry for HOME
bin/service/elasticsearch install
service elasticsearch start

Details on this installation method can be seen here - http://www.elasticsearch.org/guide/reference/setup/installation.html

Logstash

mkdir /opt/logstash
cd /opt/logstash
wget http://semicomplete.com/files/logstash/logstash-1.1.1-monolithic.jar

Afterwards you'll need to make the conf files and run it as desired.

Kibana

cd /opt/
git clone --branch=kibana-ruby https://github.com/rashidkpc/Kibana.git
mv Kibana kibana
cd kibana
bundle install
ruby kibana.rb
@DeGrinch
Copy link

Correction,
"wget https://github.com/downloads/elasticsearch/\
elasticsearch/elasticsearch-0.19.9.tar.gz

Would also be changed to...

"wget https://download.elasticsearch.org/elasticsearch/elasticsearch/elasticsearch-1.1.1.tar.gz"

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