{"id":1761,"date":"2013-02-27T01:24:05","date_gmt":"2013-02-27T06:24:05","guid":{"rendered":"http:\/\/www.rexfeng.com\/blog\/?p=1761"},"modified":"2013-02-27T01:24:05","modified_gmt":"2013-02-27T06:24:05","slug":"setting-up-sidekiq-and-redis-on-vps","status":"publish","type":"post","link":"https:\/\/www.rexfeng.com\/blog\/2013\/02\/setting-up-sidekiq-and-redis-on-vps\/","title":{"rendered":"Setting up Sidekiq and Redis on VPS"},"content":{"rendered":"<p><a href=\"https:\/\/github.com\/mperham\/sidekiq\">Sidekiq<\/a> is useful for background Rails workers. Instead of tying up your rails server, it&#8217;s better to handle certain processes asynchronously.<\/p>\n<p>Setting up Sidekiq on your VPS is simple.<\/p>\n<h1>Install Redis<\/h1>\n<p>With <a href=\"http:\/\/library.linode.com\/databases\/redis\/ubuntu-10.04-lucid\">a Linode guide, install Redis<\/a>. Make sure to use the latest Redis version (2.6.9 for me) instead of 2.2.2 as the guide discusses. Run [cci]sudo make test[\/cci] to test your Redis setup. If all goes well, you should see [cci]\\o\/ All tests passed without errors![\/cci]. The Linode guide will also go over the Deploy Init Script so that your Redis starts up when you reboot your VPS.<\/p>\n<h1>Config Capistrano File<\/h1>\n<p>With <a href=\"https:\/\/github.com\/capistrano\/capistrano\">Capistrano<\/a>, you need to edit your [cci]config\/deploy.rb[\/cci] to include the line [cci]require &#8216;sidekiq\/capistrano'[\/cci]. [cci]For config\/sidekiq.yml[\/cci] options, see the <a href=\"https:\/\/github.com\/mperham\/sidekiq\/wiki\/Deployment\">Sidekiq wiki<\/a>.<\/p>\n<p>That&#8217;s it. Make sure to have your server rebooted so that Redis is running on the default port, and Sidekiq can access Redis upon your [cci]cap deploy[\/cci].<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Sidekiq is useful for background Rails workers. Instead of tying up your rails server, it&#8217;s better to handle certain processes asynchronously. Setting up Sidekiq on your VPS is simple. Install Redis With a Linode guide, install Redis. Make sure to use the latest Redis version (2.6.9 for me) instead of 2.2.2 as the guide discusses. [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1029],"tags":[],"class_list":["post-1761","post","type-post","status-publish","format-standard","hentry","category-programming"],"_links":{"self":[{"href":"https:\/\/www.rexfeng.com\/blog\/wp-json\/wp\/v2\/posts\/1761","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.rexfeng.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.rexfeng.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.rexfeng.com\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.rexfeng.com\/blog\/wp-json\/wp\/v2\/comments?post=1761"}],"version-history":[{"count":4,"href":"https:\/\/www.rexfeng.com\/blog\/wp-json\/wp\/v2\/posts\/1761\/revisions"}],"predecessor-version":[{"id":1765,"href":"https:\/\/www.rexfeng.com\/blog\/wp-json\/wp\/v2\/posts\/1761\/revisions\/1765"}],"wp:attachment":[{"href":"https:\/\/www.rexfeng.com\/blog\/wp-json\/wp\/v2\/media?parent=1761"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.rexfeng.com\/blog\/wp-json\/wp\/v2\/categories?post=1761"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.rexfeng.com\/blog\/wp-json\/wp\/v2\/tags?post=1761"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}