redis and resque in production
I want to get resque background processing working in production on my centos server for a rails 3 application.
I then want to monitor redis and resque with bluepill.
What is the best way to instal开发者_Python百科l redis in production for resque and also has anyone get a .pill file for redis and resque ?
Thanks Rick
The Linode Library has a nice article about installing Redis in CentOS 5, and Resque's Github page is an excellent resource for Resque.
Redis Bluepill:
Bluepill.application("app-name") do |app| app.process("redis") do |process| process.start_command = "redis-server /path/to/redis.conf" process.daemonize = true process.pid_file = "/tmp/redis.pid" process.start_grace_time = 3.seconds process.stop_grace_time = 5.seconds process.restart_grace_time = 8.seconds end
Bluepill's syntax is fairly straight-forward and I'll leave the .pill for Resque for you to try :)
A few of my notes on the linode Redis article:
https://www.linode.com/docs/databases/redis/redis-on-centos-5/
When wgetting redis:
You could link directly to the latest stable version of redis:
wget http://download.redis.io/redis-stable.tar.gz
tar xvzf redis-stable.tar.gz
cd redis-stable
make
- redis user needs to own the pid directory to write the pid, otherwise it'll silently fail in daemon mode:
mkdir /var/run/redis
chown redis:redis /var/run/redis
- then direct creation of pid to the new directoy in the
init.d
script as well as theredis.conf
file:
/var/run/redis/redis.pid
as opposed to /var/run/redis.pid
精彩评论