Skip to content

Instantly share code, notes, and snippets.

@csanz
Created August 29, 2011 07:40
Show Gist options
  • Save csanz/1177950 to your computer and use it in GitHub Desktop.
Save csanz/1177950 to your computer and use it in GitHub Desktop.
Moving your redis instance to linode

Move your redis instance to Linode!

create linode server instance

local:

<shell>$ssh root@(IP ADDRESS)

remote:

<shell>$sudo apt-get update
<shell>$sudo aptitude install build-essential

Download & Install

<shell>$mkdir downloads 
<shell>$cd downloads
<shell>$wget http://redis.googlecode.com/files/redis-2.2.12.tar.gz
<shell>$tar xzvf redis-2.2.12.tar.gz
<shell>$cd redis-2.2.12/src
<shell>$make 
<shell>$(Fuck testing)
<shell>$make install
<shell>$curl -O https://raw.github.com/csanz/configs/master/redis/redis-server
<shell>$curl -O https://raw.github.com/csanz/configs/master/redis/redis.conf
<shell>$sudo mv redis-server /etc/init.d/redis-server
<shell>$sudo chmod +x /etc/init.d/redis-server
<shell>$sudo mv redis.conf /etc/redis.conf

(Edit redis.conf if needed)

Add User

<shell>$sudo useradd redis
<shell>$sudo mkdir -p /var/lib/redis
<shell>$sudo mkdir -p /var/log/redis
<shell>$sudo chown redis.redis /var/lib/redis
<shell>$sudo chown redis.redis /var/log/redis

Boot & Start

<shell>$sudo update-rc.d redis-server defaults
<shell>$sudo /etc/init.d/redis-server start

Clean up

<shell>$exit
<shell>$login / heroku
<shell>$mv -rf redis-to-go >> /dev/null
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment