Skip to content

Instantly share code, notes, and snippets.

@scuml

scuml/blog.md Secret

Created June 12, 2020 13:07
Show Gist options
  • Save scuml/5e03de356fad8fa5d938c4f4a9fd62c5 to your computer and use it in GitHub Desktop.
Save scuml/5e03de356fad8fa5d938c4f4a9fd62c5 to your computer and use it in GitHub Desktop.

You can download and install Redis from source at https://redis.io/download or you can use Homebrew, a package manager for the Mac.

I recommend using Homebrew (or Brew as I'll refer to it) not only handles installation of Redis, but also handles starting redis up again when your computer restarts.

Installation with Brew

Install brew if you haven't previously installed it on your Mac.

https://gist.github.com/7d79402cf9fa6551f739ed99e3407582

Install Redis with Brew https://gist.github.com/a5cdae9ce04518f0a9f60b3b6141f8d2

Check installation

You can see the status of your newly installed redis server with the following command:

https://gist.github.com/6ac907a11bde406d8c82ba2e8ba6b8e1

If you see the word started in green next to redis, then Redis server is up and running on your machine. You can now type:

https://gist.github.com/2a5a79df9c358e4ffb488376b21e93d7

... and the redis prompt will appear.

Type PING here.

https://gist.github.com/939d49c975d7de44cb094869a82ce312

Congratulations! You just typed your first redis command on your newly installed redis server!

Next Steps

Those new to redis will want to start learning about Redis's built-in data types. There is wonderful documentation at https://redis.io/topics/data-types-intro. We'll go through each of these data types in depth in the next article in this series.

I'd also recommend installing Red, (https://echodot.com/red/) also available on the Mac App Store (https://apps.apple.com/us/app/red-ui-for-redis/id1491764008)

Red is a front-end client for Redis that makes it easy to get started visually with Redis concepts, while also showing what commands are being run to make things happen. It is a fantastic learning tool.

Helpful Brew Commands

To stop redis brew services stop redis

To start redis brew services start redis

To restart redis server brew services restart redis

To Upgrade Redis to the latest version brew upgrade redis

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment