Install Redis Ubuntu

Just my private notes to install redis on ubuntu. 😀
I prefer to install it manually because redis at ubuntu repo (I’m using Elementary OS that based on ubuntu) are not up to date.

1. Download latest redis at http://redis.io/download
2. Extract your downloaded redis and compile it.

$ tar -xzvf redis-x.x.x.tar.gz
$ cd redis-x.x.x
$ make

Now your compiled binary are in “src” directory you can run redis with “redis-server”. Usually I moved all my binary to “opt” within system root but this step are optional.
3. Rename and move to “opt” directory.

$ mv src redis
$ mv redis /opt

4. Then add to your system path by adding this line “export PATH=”$PATH:/opt/redis” on your “.bashrc” or “.zshrc” if you are using zsh and restart your terminal and now you can run “redis-server” and “redis-cli” from anywhere.

Reference: http://redis.io/download#installation