want to run redis-server in background nonstop

Since Redis 2.6 it is possible to pass Redis configuration parameters using the command line directly. This is very useful for testing purposes.

redis-server --daemonize yes

Check if the process started or not:

ps aux | grep redis-server

Or you can simply run it as src/redis-server redis.conf&


I think the best way is to use Redis' config file:

# By default Redis does not run as a daemon. Use 'yes' if you need it.
# Note that Redis will write a pid file in /var/run/redis.pid when daemonized.
daemonize yes

Set daemonize to yes in the config file. Say the file is ~/.redis/redis.conf, then just run

$ redis-server ~/.redis/redis.conf

And it just works.