Last active
August 29, 2015 14:01
-
-
Save jeffsrepoaccount/8351f6b10fb4611e9805 to your computer and use it in GitHub Desktop.
Installing gearmand and Gearman Job Server/Client for PHP
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# For a long while now, you cannot rely on the ppa repository to install gearmand due to an old version of | |
# libgearman being present and causing havoc during the install process. Instead, gearmand must be compiled | |
# from source (replace 1.1.8 with the most current version of gearmand). | |
sudo apt-get install build-essential libboost-thread-dev libboost-program-options-dev libevent-dev libcloog-ppl0 libmysqld-dev uuid-dev gperf -y | |
wget https://launchpad.net/gearmand/1.2/1.1.8/+download/gearmand-1.1.8.tar.gz | |
mkdir ~/gearman-source | |
tar xzf gearmand-1.1.8.tar.gz -C ~/gearman-source | |
cd ~/gearman-source/gearmand-1.1.8 | |
./configure | |
make | |
sudo make install | |
sudo ldconfig | |
# The following command must then be issued in order to install the Gearman Client/Server library for PHP | |
sudo pecl install gearman | |
# Finally, the following line must be added to php.ini (cli, apache): | |
# extension=gearman.so | |
# Then restart Apache | |
# sudo service apache2 restart | |
# gearmand can be then started on the Job Server, with a specific port. Ideally this will be controlled via | |
# a daemon controller such as supervisord, but it can be manually run as well: | |
# sudo gearmand -p 4730 | |
# Port 4730 is the standard default, but any port can be used. The port must also be coordinated between | |
# the client/worker, and in my experience needs to be explicitly supplied to gearmand. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment