Installing Redis on Ubuntu 12.04
Introduction

This is a quick guide to setting up the latest redis version on Ubuntu 12.04. I’m actually working on an Ubuntu 12.04 64

Dependencies

Redis doesn’t have many dependencies, just Make, gcc, and TCL:


sudo apt-get update
sudo apt-get install build-essential
sudo apt-get install tcl8.5

Compile

The makers of Redis recommend building from source since you’ll get the latest stable version and it’s a very quick compile time. After running make, they suggest running ‘make test’:

wget http://download.redis.io/redis-stable.tar.gz
tar xvzf redis-stable.tar.gz
cd redis-stable
make
make test

Install

Copy the Redis files to their proper locations:

sudo cp src/redis-server /usr/local/bin
sudo cp src/redis-cli /usr/local/bin
sudo mkdir /etc/redis
sudo cp redis.conf /etc/redis/redis.conf

Add an Upstart script so Redis can run automatically. The upstart script creates the file ‘/var/run/redis-server.pid’ if you’re using monit to monitor your processes.

wget https://gist.github.com/brandonhamric/6047256/raw/9fafacf874ea8c3a8d43fc054e5b0fd47862d3d4/redis-server.conf
sudo cp redis-server.conf /etc/init

Start up the server:

sudo start redis-server

Advertisements

One thought on “Installing latest Redis on Ubuntu 12.04 LTS

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s