Skip to content

Instantly share code, notes, and snippets.

@JoshRosen
Forked from garlandkr/redis_es_ls.md
Created July 5, 2013 18:23
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save JoshRosen/5936329 to your computer and use it in GitHub Desktop.
Save JoshRosen/5936329 to your computer and use it in GitHub Desktop.

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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment