How to install Redis on Mac OS. Before installing redis let’s give you a quick introduction to redis.
What is Redis
Redis is an open source, in-memory data structure store, used as database, cache and message broker.
Redis supports multiple data structures such as
i) Strings
ii) Hashes
iii) Lists
iv) Sets
v) Sorted sets with range queries
vi) Bitmaps
vii) Hyperloglogs and geospatial indexes with radius queries.
Apart from supporting following data structures it has built-in replication, Lua scripting, LRU eviction, transactions and different levels of on-disk persistence, and provides high availability via Redis Sentinel and automatic partitioning with Redis Cluster.
How to Set up Virtual Host in Apache on Mac OS.
How to Install Redis on Mac OS
1)
Install Redis using HomeBrew
If you have installed HomeBrew on you mac system then simply type following command.
1 |
$ brew install redis |
2)
Install Redis without using HomeBrew
If you don’t have homebrew no issues, let’s install redis without using homebrew.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 |
$ curl -O http://download.redis.io/redis-stable.tar.gz /* Untar archive files. */ $ tar -xvzf redis-stable.tar.gz /* Delete archive files. */ $ rm redis-stable.tar.gz $ cd redis-stable $ make $ sudo make install |
Now redis installation is complete, start redis server using following command.
1 |
$ redis-server |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 |
_._ _.-``__ ''-._ _.-`` `. `_. ''-._ Redis 3.0.6 (00000000/0) 64 bit .-`` .-```. ```\/ _.,_ ''-._ ( ' , .-` | `, ) Running in standalone mode |`-._`-...-` __...-.``-._|'` _.-'| Port: 6379 | `-._ `._ / _.-' | PID: 12830 `-._ `-._ `-./ _.-' _.-' |`-._`-._ `-.__.-' _.-'_.-'| | `-._`-._ _.-'_.-' | http://redis.io `-._ `-._`-.__.-'_.-' _.-' |`-._`-._ `-.__.-' _.-'_.-'| | `-._`-._ _.-'_.-' | `-._ `-._`-.__.-'_.-' _.-' `-._ `-.__.-' _.-' `-._ _.-' `-.__.-' |
Learn the basics of Redis by trying their command online. Try redis online.