If you do not have Administrator access on your windows machine but want to run redis server locally then follow this guide and get started with installation of redis server and client using command line. If you are linux users then check how to install redis without root access.
- Create new directory to hold Redis native binaries
cd C:\Users\techmonger\Documents md Programs cd Programs
- Download Redis binary files from following url and extract it inside
Program
directoryhttps://github.com/ServiceStack/redis-windows/raw/master/downloads/redis-latest.zip
- Start Redis server from
Program
directorycd C:\Users\techmonger\Documents\Programs redis-server.exe redis.windows.conf _._ _.-``__ ''-._ _.-`` `. `_. ''-._ Redis 3.0.503 (00000000/0) 64 bit .-`` .-```. ```\/ _.,_ ''-._ ( ' , .-` | `, ) Running in standalone mode |`-._`-...-` __...-.``-._|'` _.-'| Port: 6379 | `-._ `._ / _.-' | PID: 53522 `-._ `-._ `-./ _.-' _.-' |`-._`-._ `-.__.-' _.-'_.-'| | `-._`-._ _.-'_.-' | http://redis.io `-._ `-._`-.__.-'_.-' _.-' |`-._`-._ `-.__.-' _.-'_.-'| | `-._`-._ _.-'_.-' | `-._ `-._`-.__.-'_.-' _.-' `-._ `-.__.-' _.-' `-._ _.-' `-.__.-' [10488] 13 Jan 16:48:24.849 # Server started, Redis version 3.0.503 [10488] 13 Jan 16:48:24.850 * The server is now ready to accept connections on port 6379 [10488] 13 Jan 10:03:25.000 * 1 changes in 900 seconds. Saving... [10488] 13 Jan 10:03:25.013 * Background saving started by pid 53522 [10488] 13 Jan 10:03:25.213 # fork operation complete [10488] 13 Jan 10:03:25.289 * Background saving terminated with success
Above will start redis server locally on the port
6379
. Configuration to start the server is stored insideredis.windows.conf
in the same directory. You can modify this file to change configuration values. For example to change port on which redis would run can be achieved by modifying following line.# Accept connections on the specified port, default is 6379. # If port 0 is specified Redis will not listen on a TCP socket. port 6379
- Start Redis client from
Program
directoryredis-cli.exe 127.0.0.1:6379 > ping PONG
Conclusion
Using above method you can setup both redis client and server on the windows machine. Since default ephemeral port no 6379
is used by redis server there wont be need to configure firewall which otherwise would have been required.