Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I am new to redis. and I just followed cli to install redis sudo apt-get install redis. but the install server version is 2.2.12 . If I want to update this version and I want to install redis 2.7 + then how can I do this thing, please help. I am working on ubuntu 12.04

share|improve this question
    
    
how can i update this version –  lord_linus Aug 20 '12 at 8:37
    
redis.io/download How did this escape you? –  foocorpluser Sep 10 '12 at 16:48
    
i just dowbloaded that package and extracted it in www folder, instead of installing from command line –  lord_linus Sep 11 '12 at 6:56

2 Answers 2

up vote 10 down vote accepted

Either compile from source or build a .deb package via fpm:

Install fpm with gem:

# apt-get install rubygems
# gem install fpm

Compile Redis:

# cd /usr/local/src/
# wget http://redis.googlecode.com/files/redis-2.4.16.tar.gz
# tar zxvf redis-2.4.16.tar.gz 
# cd redis-2.4.16/
# make

Build .deb package:

# mkdir -p /tmp/redis-$VERSION.$$/usr/bin
# mkdir -p /tmp/redis-$VERSION.$$/etc

# cp src/{redis-benchmark,redis-check-aof,redis-check-dump,redis-cli,redis-server} /tmp/redis-$VERSION.$$/usr/bin

# cp redis.conf /tmp/redis-$VERSION.$$/etc/redis.conf
# cd ..

# fpm -s dir -t deb -n redis-server -v 2.4.16 -C /tmp/redis-2.4.16.18597/ -p redis-server-2.4.16_amd64.deb usr/bin/

Upgrade Redis:

# dpkg -i redis-server-2.4.16_amd64.deb
dpkg: warning: downgrading redis-server from 2:2.2.12-1build1 to 2.4.16.
(Reading database ... 148744 files and directories currently installed.)
Preparing to replace redis-server 2:2.2.12-1build1 (using redis-server-2.4.16_amd64.deb) ...
Stopping redis-server: redis-server.
Unpacking replacement redis-server ...
dpkg: warning: unable to delete old directory '/var/log/redis': Directory not empty
dpkg: warning: unable to delete old directory '/etc/redis': Directory not empty
Setting up redis-server (2.4.16) ...
Processing triggers for man-db ...
Processing triggers for ureadahead ...

Examine the version:

# /usr/bin/redis-server -v
Redis server version 2.4.16 (00000000:0)

Source: https://gist.github.com/944216

share|improve this answer

I installed it following this checkinstall tutorial, the steps I followed are:

  1. Install checkinstall and its dependencies:

    sudo apt-get install build-essential automake autoconf libtool pkg-config libcurl4-openssl-dev intltool libxml2-dev libgtk2.0-dev libnotify-dev libglib2.0-dev libevent-dev checkinstall

  2. Make the package and install the .deb file

    ./configure && make && sudo checkinstall

It worked good for me.

share|improve this answer
    
It usually a good idea to explain the solution instead of only linking to an external site. –  Drew Khoury Sep 11 '13 at 4:35
    
Yeah well, the link has a full tutorial didn't want to duplicate content, the idea is to use a utility named checkinstall, this utility will create a Slackware, RPM or Debian compatible package and install it with Slackware's installpkg, "rpm -i" or Debian's "dpkg -i" as appropriate, so you can view it's contents with pkgtool ("rpm -ql" for RPM users or "dpkg -l" for Debian) or remove it with removepkg ("rpm -e"|"dpkg -r") –  chischaschos Sep 13 '13 at 0:48
    
the problem is that when that link dies your answer becomes useless. –  Drew Khoury Sep 13 '13 at 13:12
    
Ah got it good point, ok thanks let me improve my answer. –  chischaschos Sep 13 '13 at 20:35

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.