Post/Code

HomeAboutUsesNow

Redis Notes.

These are some Redis cheat sheet notes:

Installation

  • wget http://download.redis.io/releases/redis-5.0.3.tar.gz
  • tar xzf redis-5.0.3.tar.gz
  • cd redis-5.0.3

You will then need to run make, however, in order to do this, you first need to have the X Code Command Line Tools installed on your Mac. You can install these by (Note: only the XCode Command Line Tools will be installed, not all of XCode):

xcode-select --install

Agree to the T&Cs and follows the prompts. Once installed, in your redis folder run:

  • make.
  • Thereafter, run make test to ensure all is well!

Redis

Once setup, cd src, in src, run redis-server. This will get your Redis server running.

In a new Terminal (Ctrl + T), cd into your redis/src folder again and run: redis-cli.

Once in the CLI, you can run your Redis commands:

Redis Commands

  • INFO // give you your Redis server info
  • CONFIG GET * // returns all Redis keys
  • CONFIG GET databases // returns all dbs
  • SELECT 0 // will select the first db
  • KEYS * // will return all keys in a db

To be continued...