Nathan Long
Nathan Long

Reputation: 126042

How can I run Redis in the background?

I need Redis running while I work on a particular codebase. I often open a new terminal and run it there. How can I run it in the background?

Upvotes: 31

Views: 24684

Answers (3)

Stan Sokolov
Stan Sokolov

Reputation: 2260

Or run the following

/usr/local/bin/redis-server --daemonize yes

Upvotes: 49

sadaf
sadaf

Reputation: 739

I know this is an old question but I am answering just for the reference.

You need to set daemonize yes from daemonize no in your redis.conf

Reference: https://blog.art-coder.com/2011/12/01/how-to-run-redis-server-as-daemon/

Upvotes: 17

Nathan Long
Nathan Long

Reputation: 126042

Use redis-server &

On Linus or OSX, an easy way to run a process in the background is to follow the command with &.

You can see that it's still running with ps -ef | grep redis (or pgrep redis-server) and stop it with pkill redis-server.

Upvotes: 35

Related Questions