Trying to do the above.
fab.sudo("redis-server")
I can see redis-server has started, but the fabric command line doesn't return for me to enter further commands. Suspect this is due to redis-server opening a terminal in default model. So:
fab.sudo("redis-server", pty=False)
No luck; same result; so
[confirmed that redis.conf has 'daemonize yes' set]
fab.sudo("nohup redis-server &> nohup.out")
No luck; same result.
:-(
I just compiled Redis from source on an Ubuntu EC2 box and ran this Fab task:
def run_redis_server():
with cd('~/redis-stable'):
run("./src/redis-server")
where redis-stable
is the Redis directory.
It started the server successfully. Opening a shell run("./src/redis-cli")
works as well.
redis-server
is started automatically when you apt-get install redis-server
. Additionally, it installs an init script to start the server in daemon-mode (backgrounded). Try executing ' service redis-server start
', but this will require root access on most systems.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.