Instalación de Redis en Windows
Clase 40 de 48 • Curso de MongoDB y Redis 2017
El proyecto de Redis no soporta oficialmente Windows por lo tanto hay dos opciones:
1 - Si no tienes Windows 10 deberás utilizar una versión en Github modificada para funcionar en Windows, el enlace es https://github.com/ServiceStack/redis-windows. 2 - Si tienes Windows 10, utilizar Linux for Windows.
Linux for Windows
Desde la Windows Store o Tienda de Windows, buscar Ubuntu
e instalar, es gratis.
Una vez instalado hay que presionar la tecla Windows
, buscar Ubuntu
. Al abrir el programa por primera vez pedirá configurar un usuario y una contraseña.
Al configurar Ubuntu Bash podemos proceder a instalar redis con apt-get
que es el gestor de paquetes de Ubuntu y que también funciona en Windows con este método.
$ sudo apt-get update $ sudo apt-get install redis-server
En la misma consola una vez instalado Redis podrás ejecutarlo con el comando redis-server
.
$ redis-server 27572:C 19 Nov 19:31:12.954 # Warning: no config file specified, using the default config. In order to specify a config file use redis-server /path/to/redis.conf 27572:M 19 Nov 19:31:12.955 * Increased maximum number of open files to 10032 (it was originally set to 1024). _._ _.-``__ ''-._ _.-`` `. `_. ''-._ Redis 3.0.6 (00000000/0) 64 bit .-`` .-```. ```\/ _.,_ ''-._ ( ' , .-` | `, ) Running in standalone mode |`-._`-...-` __...-.``-._|'` _.-'| Port: 6379 | `-._ `._ / _.-' | PID: 27572 `-._ `-._ `-./ _.-' _.-' |`-._`-._ `-.__.-' _.-'_.-'| | `-._`-._ _.-'_.-' | http://redis.io `-._ `-._`-.__.-'_.-' _.-' |`-._`-._ `-.__.-' _.-'_.-'| | `-._`-._ _.-'_.-' | `-._ `-._`-.__.-'_.-' _.-' `-._ `-.__.-' _.-' `-._ _.-' `-.__.-' 27572:M 19 Nov 19:31:12.955 # WARNING: The TCP backlog setting of 511 cannot be enforced because /proc/sys/net/core/somaxconn is set to the lower value of 128. 27572:M 19 Nov 19:31:12.955 # Server started, Redis version 3.0.6 27572:M 19 Nov 19:31:12.955 # WARNING overcommit_memory is set to 0! Background save may fail under low memory condition. To fix this issue add 'vm.overcommit_memory = 1' to /etc/sysctl.conf and then reboot or run the command 'sysctl vm.overcommit_memory=1' for this to take effect. 27572:M 19 Nov 19:31:12.955 # WARNING you have Transparent Huge Pages (THP) support enabled in your kernel. This will create latency and memory usage issues with Redis. To fix this issue run the command 'echo never > /sys/kernel/mm/transparent_hugepage/enabled' as root, and add it to your /etc/rc.local in order to retain the setting after a reboot. Redis must be restarted after THP is disabled. 27572:M 19 Nov 19:31:12.955 * The server is now ready to accept connections on port 6379