Skip to content

Instantly share code, notes, and snippets.

@lucasmazza
Created August 17, 2011 17:49
Show Gist options
  • Star 7 You must be signed in to star a gist
  • Fork 3 You must be signed in to fork a gist
  • Save lucasmazza/1152130 to your computer and use it in GitHub Desktop.
Save lucasmazza/1152130 to your computer and use it in GitHub Desktop.
Redis 2.2 Install on Ubuntu 10.04

Installation commands:

$ wget http://redis.googlecode.com/files/redis-2.2.2.tar.gz
$ tar xvfz redis-2.2.2.tar.gz 
$ cd redis-2.2.2/
$ 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

And run it!

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

lxcodes commented Jan 20, 2012

Ah. Amazing script. Thanks!

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