1. Setup


Installation

Simple apt command to install Redis and/or Redis stack. Redis-stack combines all other software in the Redis eco-system like Redis JSON, Redis OM, Redis Search, Redis Timeseries, Redis AI etc.

To start the server, simply run redis-server & to start the server in background. You can use redis --help to learn about other options and arguments. Here are some helpful and frequently used examples:

Benchmark

To benchmark you Redis-server, use Redis-Benchmark utility tool. Simply run redis-benchmark. It has several other options to help you benchmark the server according to your use-cases. You can benchmark particular commands, specific read/write size, and so much more.

History

The history is preserved between restarts of the CLI, in a file named .rediscli_history inside the user home directory, as specified by the HOME environment variable.

Connect

Once you have your Redis server up and running, you can either use Redis CLI, Redis Insight, Client libraries to connect to the server.

<aside> 💡 Redis CLI is a very powerful tool. It not only allows you to start an interactive session but does many more things like monitoring, server stats, data import and export, etc.

</aside>

2. Commands


Data Types