Posts filed under 'Linux'

Gearman, Memcached, PHP Gearman PECL

This a short Tutorial on Howto Install Gearman with libdrizzel, libmemcached and the Gearman PHP PECL Extension on Debian. It also works on Ubuntu, you just have to use the sudo wrapper.
I presume you have a complete LAMP Stack, gcc, g++ and make installed.

Installing required libs

apt-get install memcached php5-memcache php5-dev
apt-get install libevent-dev uuid-dev autoconf

Getting the Files you need

wget http://launchpad.net/gearmand/trunk/0.11/+download/gearmand-0.11.tar.gz
wget http://launchpad.net/libdrizzle/trunk/0.7/+download/libdrizzle-0.7.tar.gz
wget http://launchpad.net/libmemcached/1.0/0.38/+download/libmemcached-0.38.tar.gz

Note: I know that there is Gearman 0.12, but this currently doesn’t work with the PHP PECL Client.
See the Google Group Discussion here:
http://groups.google.com/group/gearman/browse_thread/thread/2af9ff7bfd613c2e

Installing libdrizzle

tar -xzvf libdrizzle-0.7.tar.gz
cd libdrizzle-0.7
./configure
make
make install

Installing libmemcached

tar -xzvf libmemcached-0.38.tar.gz
cd libmemcached-0.38
./configure
make
make install

Installing Gearmand

tar -xzvf gearmand-0.11.tar.gz
cd gearmand-0.11
./configure
make
make install

Installing PHP Gearman PECL Extension

pecl install --force gearman

Loading PECL Extension

nano /etc/php5/apache2/php.ini

Look for the Dynamic Extensions Section and add

extension=gearman.so

After that the Webserver must be restarted.

Starting the gearmand Deamon

/usr/local/sbin/gearmand --pid-file=/var/run/gearman.pid --log-file=/var/log/gearman.log --job-retries=3 -d -u root

Starting the gearmand Deamon (with libdrizzle)

/usr/local/sbin/gearmand --pid-file=/var/run/gearman.pid --log-file=/var/log/gearman.log --job-retries=3 -d -u root -q libdrizzle --libdrizzle-host=127.0.0.1 --libdrizzle-user=gearman --libdrizzle-password=mysqlpasswd --libdrizzle-db=gearman --libdrizzle-table=gearman_queue --libdrizzle-mysql

Note: If the MySQL settings are no correct, the Deamon will not start and also not throw an exception. So if you are using libdrizzle and the server does not start, check your mysql settings!

Troubleshooting
gearmand doesn’t start complaining about missing shared objects (.so)
Check your library include path.

nano /etc/ld.so.conf.d/libc.conf

this should look like this:

# libc default configuration
/usr/local/lib

Then try

libconf

fixed it for me :).

Add comment Februar 27th, 2010

Urlauben, Urlauben

Borkum

zurück am Montag 20.07.2009

Add comment Juli 12th, 2009

Wormux – ein freier Worms Clon

Also wir reden hier über das klassische Worms, nicht der neumodische 3D Unfug. Grafisch auch wirklich hübsch gemacht. Dem Just wird vermutlich das Herz aufgehen 😀

Erhältlich für: Windows, Linux, MaxOSX
Seite: http://www.wormux.org

2 comments Oktober 27th, 2008

Server Fortschritte

Jan und ich waren heute sehr fleissig. Wir haben Greylisting für Plesk installiert und automatische FTP Backups eingerichtet. Ich habe nämlich keinen Bock, dass sowas nochmal passiert.  Das Greylisting ist auf jeden Fall schonmal sehr hilfreich, ca 80% weniger Spam und geringere CPU Auslastung. Herrlich. 4,5 Stunden in denen wir gut was geschafft haben.

Nachtrag: Jetzt gibt es auch ein schönes neues Webmail Interface. Wir werden das jetzt erstmal nen Monat intern testen und dann für alle freischalten.
Der Spamfilter wirkt jetzt schon Wunder. Außerdem hat sich die generelle Performance des Servers stark verbessert, da der Mailserver nun viel weniger Mails zustellt. Herrlich. Wenn das stabil so weiterläuft ist alles gut 🙂

Add comment Oktober 4th, 2008


Random Wisdom

“Passwords are like underwear. You shouldn't leave them out where people can see them. You should change them regularly. And you shouldn't loan them out to strangers.”

Categories

Archiv