How to Install Redis
📣 Sponsor
Redis is a NoSQL database technology which has gained a lot of traction within the developer community - and for good reason. Redis has many applications as an in-memory database with great applications in analytics, caching, and messaging. Installing it can easily be done from the command line or terminal.
How to install Redis on Mac
To install redis on a mac, use homebrew:
brew install redis
If you need to install homebrew, you can learn about that here. You can then start up redis using:
brew services start redis
You can then make redis startup when you book your computer by using the following command:
cp /usr/local/opt/redis/*.plist ~/Library/LaunchAgents
How to install Redis on Linux
To install redis on linux, run the following commands:
curl -fsSL https://packages.redis.io/gpg | sudo gpg --dearmor -o /usr/share/keyrings/redis-archive-keyring.gpg
echo "deb [signed-by=/usr/share/keyrings/redis-archive-keyring.gpg] https://packages.redis.io/deb $(lsb_release -cs) main" | sudo tee /etc/apt/sources.list.d/redis.list
sudo apt-get update
sudo apt-get install redis
How to install Redis on Windows
If you want to install redis on windows, there is an archived and no longer maintained port which Microsoft have created. Since this is no longer supported, it is advisable you do not use it, and instead look at Microsoft's suggested alternative, Memurai.
More Tips and Tricks for Redis
- How to Create and Manipulate a List in Redis
- How to delete all keys and everything in Redis
- Make your SSR site Lightning Fast with Redis Cache
- How to get all keys in Redis
- A Complete Guide to Redis Hashes
- How to create key value pairs with Redis
- How to Install Redis
- Getting Started with Redis and Node.JS