That's an app written in Visual Studio in Windows, writing and reading data to Redis running on Ubuntu in the Windows Subsystem for Linux.
With that code present, hitting F5 started the app and wrote the text 12345 to the console, which counts as a successful test for me. Var redis = ConnectionMultiplexer.Connect("localhost") NET Core console app, adding a reference to the Stackexchange.Redis NuGet package and dropping in this code: using StackExchange.Redis
This involved using Visual Studio to create a. Checking Redis is workingīeing someone who writes code, the easiest way to check that Redis is up and running for me was to use a simple example to write some data to the Redis server and then pull it back out. Immediately up-popped a dialog from the Windows firewall to ask for network access permision for Redis. Starting Redis is as simple as running the command redis-server from the command line in Ubuntu. This eliminates anything I do with pulling down the latest bits and trying to use them from the equation if something doesn't work. Before that I did take a moment to run Redis and make sure it worked. Not helpful in the grand scheme of things, so next up was trying to pull and build from source.
Get:3 trusty/universe redis-server amd64 2:2.8.4-2 Get:2 trusty/universe redis-tools amd64 2:2.8.4-2 Get:1 trusty/universe libjemalloc1 amd64 3.5.1-2 The following NEW packages will be installedĠ to upgrade, 3 to newly install, 0 to remove and 123 not to upgrade.Īfter this operation, 1,272 kB of additional disk space will be used. The following extra packages will be installed: The following packages were automatically installed and are no longer required: Unfortunately, this pulled down a version of Redis even older than the one I had available to me on Windows, 2.8.4: Reading package lists. I'll confess, it's so long since I installed WSL and Ubuntu I had to check what version of Ubuntu I had (which you can do by running the command lsb_release -a).
This means running: sudo apt install redis-serverįrom Ubuntu.
Having installed WSL along with Ubuntu (this was installed quite a while ago meaning these steps were tested against Ubuntu 14.04.4 LTS running on Windows 10 1809) the first thing to try is using the native Linux package management tools to install Redis. One of the options I thought worth giving a try is running it under the Windows Subsystem for Linux ( installation instructions). There's plenty of options for running later versions of Redis as a Windows developer, up to and including running a Linux virtual machine to host a copy of a more recent version of Redis. Whilst there's a Windows port of Redis server, the last stable release that was produced was 3.0.504 in July 2016. Wednesday, Octowindows, windows 10, redis, wsl, linux