Thursday, December 31, 2015

Oracle Linux - Install beanstalkd

When you have a requirement for the installation of beanstalkd you might find out that beanstalkd is not available in the mainstream repository for Oracle Linux.

Beanstalkd is a big to-do list for your distributed application. If there is a unit of work that you want to defer to later (say, sending an email, pushing some data to a slow external service, pulling data from a slow external service, generating high-quality image thumbnails) you put a description of that work, a “job”, into beanstalkd. Some processes (such as web request handlers), “producers”, put jobs into the queue. Other processes, “workers”, take jobs out of the queue and run them.

Looking at the beanstalkd website you will also learn that no RPM is available as such for a quick download and installation. This means that you will have to download the sourcecode and compile it yourself. Below you can find a quick instruction on how to download and compile beanstalkd on a Oracle Linux system. This will most likely not be that different from how you should do this on, for example, a Red Hat system.

First, we need to make sure we have a location to store the source. We will create a temporary directory for this in /tmp

  mkdir /tmp/build_beanstalkd

Download (clone) the sourcecode from github by executing a git clone command and make sure we put it in the temp directory we just created

  git clone git:// /tmp/build_beanstalkd/

We now have the sourcecode so we can go to the directory and compile and install beanstalkd

  cd /tmp/build_beanstalkd/
  make install

By now you should have a compiled and installed version of beanstalkd. It is good practice to ensure you cleanup after yourself so we will remove all the " junk"  we just created.

  rm -rf /tmp/build_beanstalkd/

No comments: