Overriding redis-server config on the command line

1,799 views
Skip to first unread message

Mooky

unread,
Aug 31, 2012, 12:20:48 PM8/31/12
to Redis DB

From https://github.com/antirez/redis I read:
=====
It is possible to alter the Redis configuration passing parameters
directly
as options using the command line. Examples:

% ./redis-server --port 9999 --slaveof 127.0.0.1 6379
% ./redis-server /etc/redis/6379.conf --loglevel debug
=====
However, I cant seem to get this to work.

I get the following error if I try (Redis server version 2.4.17
(00000000:0))
=====
Usage: ./redis-server [/path/to/redis.conf]
./redis-server - (read config from stdin)
./redis-server --test-memory <megabytes>
=====

I have also read about using "echo XXXXXX | redis-server -" but that
doesnt seem to do what I want either as I am specifying a config file.

Basically, in my config file, I have
"daemonize no"

Which is what I want for most cases except when running on our server.
On our server, I would like to override this as follows:

"./redis-linux-x86_64-2.4.17/redis-server /path/to/conf/redis.conf --
daemonize yes"

I have read around a bit, but I havent been able to figure out how...

Salvatore Sanfilippo

unread,
Aug 31, 2012, 12:29:49 PM8/31/12
to redi...@googlegroups.com
Sorry this is >= 2.6 only.

Salvatore
> --
> You received this message because you are subscribed to the Google Groups "Redis DB" group.
> To post to this group, send email to redi...@googlegroups.com.
> To unsubscribe from this group, send email to redis-db+u...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/redis-db?hl=en.
>



--
Salvatore 'antirez' Sanfilippo
open source developer - VMware
http://invece.org

Beauty is more important in computing than anywhere else in technology
because software is so complicated. Beauty is the ultimate defence
against complexity.
— David Gelernter

Mooky

unread,
Aug 31, 2012, 12:34:22 PM8/31/12
to Redis DB
Aaah. Ok. That explains it.
Thanks for the quick reply!
I'll look forward to 2.6 ...

-Nick
Reply all
Reply to author
Forward
0 new messages