Sunday, January 27, 2013

Installing Gearman on Amazon's EC2 Linux AMI

Steps below show how to install Gearman on Amazon Linux AMI. I assume you are logged in as root or you may want to use sudo. 

1. cd /var/tmp;
2. wget
3. yum install libevent-devel gcc-c++ boost-devel libuuid-devel memcached-devel gperf
4. tar xvzf gearmand-1.1.4.tar.gz
5. cd gearmand-1.1.4
6. ./configure --prefix=/usr
7. sudo make && sudo make install
8. adduser gearmand
9. /usr/sbin/gearmand -u gearmand
10.  pecl channel-update
11.  pecl install channel://
12.  php --ini
13.  echo "" >> /etc/php.ini
14.  /etc/rc.d/init.d/httpd restart

Some useful commands:

php --info | grep gear

You may find different versions here and replace it with the wget link above.

Thanks to:

344964_Post to 40+ Social Networks


  1. you also need **gperf** package to be available, for gearmand 1.1.9 at least

  2. for this command "yum install libevent-devel gcc-c++ boost-devel libuuid-devel memcached-devel gperf" i get i need root access, but i can't connect as root, just as ec2-user...

  3. I have gone through your blog in details. It is really very relevant and informative..... web design

  4. Thanks for the instructions, they were very helpful. I got an error during installation:

    libgearman-server/plugins/queue/mysql/ fatal error: mysql.h: No such file or directory

    The solution, according to was to install mysql-devel:

    yum install mysql-devel