I basically want to have 2 instances of redis on Ubuntu. I looked at /etc/init.d/redis-server script and tried to create a new one (redis-server-dev) pointing to another config file (new port etc) but it didn't seem to work.

What is the correct procedure?

Thanks

link|improve this question
I found this debian.org/doc/debian-policy/ch-opersys.html#s-sysvinit that explains how those script work but I still have no clue how to create a new instance. – Dan Sep 23 '10 at 21:44
feedback

1 Answer

up vote 3 down vote accepted
  1. Create a new config file in /etc/redis/redis-new.conf (copied from redis.conf). Change the pidfile, port, logfile, dir (for the default db)

  2. Create a new file /etc/init.d/redis-server-new (copied from the file redis-server). Change the name, pidfile (same as in the config file in 1), deamon_args (the path to the config file in step 1).

  3. Make the new file executable: chmod +x /etc/init.d/redis-server-new

  4. Register the new deamon: update-rc.d redis-server-new defaults

link|improve this answer
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.