Skip to content

meiry/redis5_compiled_for_windows10

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 

Repository files navigation

How to compile redis 5 for windows 10 using cygwin gcc.

This is for testing redis on windows 10 only. not for Production !!

use it on your own risk , your anti virus may detect it as a virus its not !

Motivation:

I was looking for redis windows build to test some redis c++ client and to my surprise i havent found one so quickly i complied one.

How to:

  1. Download cygwin
  2. Components to install which not install by default
    • gcc
    • readline
    • tcl (for redis tests)
    • make
  3. Download latest stable redis (currently redis-5.0.7)
  4. Open the file /redis-5.0.7/deps/hiredis/net.c and add on top of the file
    #define _POSIX_C_SOURCE 200112L
  1. Compile the /redis-5.0.7/deps first
cd /redis-5.0.7/deps:
make hiredis linenoise lua 
cd /redis-5.0.7/
make
  1. Execute redis-server inside cygwin shell
   cd /redis-5.0.7/src/
   ./redis-server.exe ../redis.conf

test basic conctivity on localhost

cd /redis-5.0.7/src/
$ ./redis-cli.exe -h localhost
localhost:6379> ping
PONG
localhost:6379>

deploy outside cygwin

All cygwin wrapper is inside : cygwin1.dll so we need it when we run our redis-server so deployment direcotry should look like this :

cygwin1.dll
redis.conf
redis-benchmark.exe
redis-check-aof.exe
redis-check-rdb.exe
redis-cli.exe
redis-sentinel.exe
redis-server.exe

troubleshooting:

some times on windows you will have networking problem to fix it try those configurations if you getting this error when you start pserver-cli.exe:

Could not connect to Redis at 127.0.0.1:6379: Name or service not known
Aborted (core dumped)

to fix it try :

  1. stop redis
  2. in redis.conf search for : bind 127.0.0.1 and comment it with #
  3. start redis server , and start redis-cli.exe like this :
./redis-cli.exe -h localhost

if this dosn't help

  1. stop redis server
  2. in redis.conf search for : bind 127.0.0.1 change it to :
bind 0.0.0.0
  1. start redis server , and start redis-cli.exe like this :
./redis-cli.exe -h localhost

or

./redis-cli.exe -h 0.0.0.0

About

redis 5 compiled for windows10 using cygwin

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published