To install Redis on your mac

Download redis tar file from here

untar it

> tar -xvf redis-stable.tar

Then go to directory

> cd redis-stable

Then compile it with make

> make

You will notice that the files are created in src folder

Then move redis-server and redis-cli files to /usr/local/bin folder (assuming this folder is in your path) so that you can execute this command from any of the folder

To start server just type command

> redis-server

To test server from client open new terminal and type command

> redis-cli ping

Output will be

> pong

To use redis cli type command

> redis-cli

To set key value pair

> set mykey somevalue

To get key value pair

> get mykey

You can find all the commands here