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:
redis-server <path/to/redis.conf>
: If no config is passed, default config will be used. You can find starter config file here. You can either edit these config files or pass arguments directly to redis-server CLI.redis-server --port 7777 --replicaof 127.0.0.1 8888
Here is an example of how you can overwrite default config directly from the CLI.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.
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.
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>