How to install Redis on Ubuntu and Mac OS X
Redis caught your interest and want to try it on your Mac or Ubuntu? Excellent! Installing Redis is almost similar in Mac and Ubuntu.
wget does not come installed by default on Mac, so install wget first if you are on Mac.
And here we go:
$ wget http://redis.googlecode.com/files/redis-2.4.8.tar.gz
$ tar -zxvf redis-2.4.8.tar.gz
$ cd redis-2.4.8
$ make install
$ make test
make install gives you "
Permission denied" error, do
sudo make install.The testing process takes a while to complete, so be patient.
To start the Redis server:
When you start the server you will see this:
# Warning: no config file specified, using the default config. In order to specify a config file use 'redis-server /path/to/redis.conf'
You could run Redis without any customized configuration on your development machine, but will most probably need to use a customized config file in production. Use the
redis.conf file which came with the installer as the template for your configuration file. While still in the installation dir, so this:
$ mkdir ~/.redis
$ mv redis.conf ~/.redis/
To start the server with the config file:
$ redis-server ~/.redis/redis.conf
To connect to the Redis server:
There you have installed Redis on your Ubuntu / Mac!