How to Install Redis

Development Environment

$brew install redis

Run the commands shown after the installation is complete to start redis automatically on startup. To start the server manually, run:

$redis-server /usr/local/etc/redis.conf

Production Environment

Install Redis using Moonshine Redis plugin.

For Rails 4.x application:

plugger install git://

Specify the redis version to install, by adding the following configuration to moonshine.yml in your Rails project:

  :version: 2.8.9

You don't have to specify other settings, Moonshine will use default settings.

Include the recipe in your Moonshine manifest, in app/manifests/application_manifest.rb:

recipe :redis

Check in the code to git and do a cap deploy.

Manual Installation

If you are not managing your server using Moonshine, you can skip the above four steps and install it manually by reading How To Install and Use Redis

Verify Installation

You can check the redis server version as follows:

$redis-server --version
Redis server v=2.8.9 sha=00000000:0 malloc=libc bits=64 build=9ccc8119ea98f6e1

To check if redis is working properly. You can ssh into your server and run:

$redis-cli ping

You can also play with it in an interactive mode to make sure it's working as follows:

$redis-cli> ping
PONG> set foo bar
OK> get foo

Related Articles

Ace the Technical Interview

  • Easily find the gaps in your knowledge
  • Get customized lessons based on where you are
  • Take consistent action everyday
  • Builtin accountability to keep you on track
  • You will solve bigger problems over time
  • Get the job of your dreams

Take the 30 Day Coding Skills Challenge

Gain confidence to attend the interview

No spam ever. Unsubscribe anytime.