Compiling latest Redis on WSL2

We have been using Redis on our windows workstations for some time now. It just works. If you are in the mood to get something done, your best options are:

  1. Download an MSI from here:

  1. Use your distro package installer (apt in this case)

sudo apt-get update
sudo apt-get upgrade
sudo apt-get install redis-server

Let’s go on an adventure!

So, you want to test the latest version of Redis on WSL. Your best bet is to download and compile the latest version from source.

These are the instructions, almost verbatim, from the redis site (minus the specific version):

tar xzf redis-6.0.5.tar.gz
cd redis-6.0.5/

At this point, you will likely realize that you don’t have make on your fresh WSL install.

sudo apt-get update
sudo apt install make

Make needs the c compiler. A good option is to install the build-essential package.

sudo apt install build-essential

Now, you will run into issues related to missing dependencies. So let’s build those dependencies.

cd deps
make hiredis jemalloc linenoise lua geohash-int

And finally, let’s compile redis!

cd ..

And now, you can go into the src folder run the redis server:

cd src

How Gorelo uses Redis:

At Gorelo, we use Redis for all our search needs. Tickets, Assets, Contacts, Alerts are fully searchable. Thanks to Redis.