Skip to content

Instantly share code, notes, and snippets.

@torgeir
Forked from lucasmazza/script.md
Last active August 30, 2024 08:37
Show Gist options
  • Save torgeir/1925736 to your computer and use it in GitHub Desktop.
Save torgeir/1925736 to your computer and use it in GitHub Desktop.
Redis 2.4.8 Install on Ubuntu 10.04

Installation commands:

$ wget http://redis.googlecode.com/files/redis-2.4.8.tar.gz
$ tar xvfz redis-2.4.8.tar.gz 
$ cd redis-2.4.8/
$ mkdir -p /opt/redis
$ make PREFIX=/opt/redis install
$ cp redis.conf /opt/redis/redis.conf
$ chown -R redis:redis /opt/redis
$ touch /var/log/redis.log
$ chown redis:redis /var/log/redis.log

Create this upstart script at /etc/init/redis-server.conf:

description "redis server"

start on runlevel [23]
stop on shutdown

exec sudo -u redis /opt/redis/bin/redis-server /opt/redis/redis.conf

respawn

Configure it, here's what I changed:

bind 127.0.0.1
timeout 300
loglevel notice
logfile /var/log/redis.log
dir /opt/redis/

And run it!

$ sudo start redis-server
$ sudo restart redis-server
$ sudo stop redis-server
@kylefox
Copy link

kylefox commented Apr 10, 2013

This worked excellent for me, thanks for sharing!

One thing worth noting is that you can always get the latest version of Redis from http://download.redis.io/redis-stable.tar.gz. For example: wget http://download.redis.io/redis-stable.tar.gz

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment