Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
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
@msadeghi

This comment has been minimized.

Copy link

@msadeghi msadeghi commented Aug 3, 2013

hi admin
when i run command service redis start
i see this error Fatal error, can't open config file '/etc/redis/6379.conf'.

@msadeghi

This comment has been minimized.

Copy link

@msadeghi msadeghi commented Aug 3, 2013

how install logstash java file please describe this.

@ouychai

This comment has been minimized.

Copy link

@ouychai ouychai commented Oct 2, 2013

sudo apt-get install redis-server
for install redis on ubuntu 12.04 server

@rychannel

This comment has been minimized.

Copy link

@rychannel rychannel commented Oct 7, 2013

These instructions are way too vague

@ghost

This comment has been minimized.

Copy link

@ghost ghost commented Apr 29, 2014

The available installation instructions for logstash are completely useless and extremely vague, when will u guys provide update installion information for this product of a sufficent standard.

@DeGrinch

This comment has been minimized.

Copy link

@DeGrinch DeGrinch commented May 30, 2014

Probably solved this by now... But..
"hi admin
when i run command service redis start
i see this error Fatal error, can't open config file '/etc/redis/6379.conf'.

Create the file in 6379.conf in the directory. The problem is stated "Can't open config file '/etc/redis/6379.conf'. "

Anytime your error is can't open check the directory for the correct folder/file :)

The instructions are not way too vague, you just need to use a bit of problem solving skills when you are installing these files and programs. Use your brain. otherwise pay someone else to install for you :) no offence...

Furtther more with regards to the " wget https://github.com/downloads/elasticsearch/elasticsearch/elasticsearch-0.19.9.tar.gz " and all reference in the above document change .

"...elasticsearch-0.19.9.tar.gz "
to
"...elasticsearch-1.1.1.tar.gz "

@DeGrinch

This comment has been minimized.

Copy link

@DeGrinch DeGrinch commented May 31, 2014

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