Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

MSOpenTech Redis – Multiple instances on same machine

Tags:

windows

redis

I’m using the windows redis port form Microsoft (GitHub).
How can I run multiple instances of redis on the same machine?
Can I use the same binaries and configure a port per instance or do I need to install the binaries (in a different directory) for each instance?

like image 850
musium Avatar asked Mar 01 '16 14:03

musium


Video Answer


2 Answers

Ok this is how it works:

  • Make a copy of the existing config file "C:\Program Files\Redis\redis.windows-service.conf" named "C:\Program Files\Redis\redis.windows-service-new.conf"
  • Change the port and other settings like logfile and syslog-ident
  • Run the following command to create a new service:

Command:

sc create Redis2 obj= "NT AUTHORITY\NetworkService" start= auto DisplayName= "Redis2" binPath= "\"C:\Program Files\Redis\redis-server.exe\" --service-run \"C:\Program Files\Redis\redis.windows-service-new.conf\" 
like image 174
musium Avatar answered Oct 03 '22 08:10

musium


You can run the same executable multiple times starting redis-server with different configurations, either using a file or by giving parameters. Obviously, the ports must be also different.

like image 31
Matías Fidemraizer Avatar answered Oct 03 '22 07:10

Matías Fidemraizer