rodrigosantosbr

installing Redis on wsl

Nov 5th, 2019
108
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!

Install and Test Redis

Launch the installed distro from your Windows Store and then install redis-server. The following example works with Ubuntu (you’ll need to wait for initialization and create a login upon first use):

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

Restart the Redis server to make sure it is running:

sudo service redis-server restart

Execute a simple Redis command to verify your Redis server is running and available:

redis-cli 
127.0.0.1:6379> set user:1 "Jane"
127.0.0.1:6379> get user:1
"Jane"

To stop your Redis server:

sudo service redis-server stop

5.3.3. Configure a Redis Password

sudo nano /etc/redis/redis.conf

Scroll to the SECURITY section and look for a commented directive that reads:

# requirepass foobared

Uncomment it by removing the #, and change foobared to a secure password.

To generate a strong password for Redis-server:

openssl rand 60 | openssl base64 -A

https://medium.com/@RedisLabs/windows-subsystem-for-linux-wsl-10e3ca4d434e

Add Comment
Please, Sign In to add comment