Step 1 – Get the source and compile it

curl -O http://redis.googlecode.com/files/redis-1.2.6.tar.gz
tar xvzf redis-1.2.6.tar.gz
cd redis-1.2.6
make


Step 2 – Place the binaries and configure
  • copy redis-benchmark, redis-server, redis-cli, and redis-stat to /usr/local/bin and set the owner to root.
  • copy redis.conf to /usr/local/etc and change “daemonize” to “yes”
  • if you want it to start when the system boots, create redis.plist in ~/Library/LaunchAgents directory with following content:




        Label
        com.redis
        RunAtLoad
        
        ProgramArguments
        
                /usr/local/bin/redis-server
                /usr/local/etc/redis.conf
        




Then use the following command to automatically start when your computer boots

launchctl load ~/Library/LaunchAgents/redis.plist
launchctl start com.redis


Step 3 – Test
  • open Redis CLI by entering “redis-cli”

set joon "rubyhead"
get joon #=> should return "rubyhead"
exit
         open Redis CLI again
  

get joon #=> should return "rubyhead" again