Installer Gearman sur OSX

installer gearman sur OSX

Prérequis: libevent

S'assurer que la libevent est présente

$ ls -l /usr/local/lib/libevent*

Le cas échéant, l'installer

$ curl -L -O
$ tar -xvzf libevent-1.4.12-stable.tar.gz
$ cd libevent-1.4.12-stable
$ ./configure
$ make
$ sudo make install

Installer libgearman

$ curl -L -O
$ tar -xvzf gearmand-0.9.tar.gz
$ cd gearmand-0.9
$ ./configure
$ make
$ sudo make install

Il installera aussi les 2 applications qui nous intéressent :


Assurez vous que tous les paths sont accessibles via PATH

$ echo $PATH

si /usr/local/bin ou /usr/local/sbin ne sont pas présent, les rajouter dans le path de l'utilisateur, ou mieux le path général (le fichier /etc/paths)

Commandes utiles

  • lancer gearmand pour la 1re fois

    $ gearmand -vv
     INFO Starting up
     INFO Listening on :::4730 (4)
     INFO Listening on (5)
     INFO Creating wakeup pipe
     INFO Creating IO thread wakeup pipe
     INFO Adding event for listening socket (4)
     INFO Adding event for listening socket (5)
     INFO Adding event for wakeup pipe
     INFO Entering main event loop
  • S'assurer que gearmand est entrain de tourner

    $ ps auxw | grep [g]earmand
    xavierbarbosa 21315   0.0  0,0    75664    452 s007  S+    4:57     0:00.00 gearmand -vv
  • Vérifier que gearman écoute le port 4730 pour les jobs en TCP

    $ sudo lsof -i tcp:4730
    gearmand 21315 xavierbarbosa    4u  IPv6 0x6e29258      0t0  TCP *:4730 (LISTEN)
    gearmand 21315 xavierbarbosa    5u  IPv4 0xa243a68      0t0  TCP *:4730 (LISTEN)
  • Lancer gearman en mode détaché !

    $ gearmand &

Installer Drizzle sur OSX

$ sudo port install bzr protobuf-c pcre
$ cd src
$ bzr branch lp:libdrizzle
$ cd libdrizzle
$ ./config/
$ ./configure --prefix=/opt/local && make && sudo make install
$ cd ..
$ bzr branch lp:drizzle
$ cd drizzle
$ ./config/
$ ./configure --with-lib-prefix=/opt/local --prefix=/opt/local &&  make && sudo make install

Un bon tuto:

Forcer le démarrage sur le CD


Un Mac peut-être booté sur le CD en cliquant sur la touche ALT lors du démarrage.

Using TextMate for editing Subversion import/commit messages


Q: Is there a way to use TextMate for editing Subversion (svn) import/commit messages? If I set editor-cmd=mate in the subversion config file, TextMate correctly loads the temporary submit-message when doing a svn import/commit from command line, but svn returns directly with error "Log message unchanged or not specified". Subversion is not 'waiting' for TextMate to save or close the file.

--Armin Dressler

A: Try setting editor-cmd=mate -w (or you can set your environment EDITOR variable). This waits until the file is closed in TextMate. See also 'mate -help'.

Subversion Global Ignores


If you’re a Mac OS X user running Subversion on the command line and mounting remote disks you may have run into instances where you want to globally ignore ._*, .AppleDouble, and *:2e_* files. To do this simply open your Terminal and edit your ~/.subversion/config file and look for the line below.

#global-ignores = *.o *.lo *.la #*# .*.rej *.rej .*~ *~ .#* .DS_Store

Uncomment it by removing the # and add the necessary additional exclusions and it will now look like this.

global-ignores = *.o *.lo *.la #*# .*.rej *.rej .*~ *~ .#* .DS_Store ._* .AppleDouble *:2e_*

Save it and you’re all set. Now you won’t need to edit your svn:ignore property for every project!

Mac OS X tab cycle

Here is a step by step guide on how to change your Mac OS X tabbing behavior:

  • Open up “System Preferences”. If you don’t have it in your Dock, it’ll be in the Apple menu in the upper left corner of your screen. *Click on the “Keyboard & Mouse” icon in the second row titled Hardware.
  • Click on the tab titled “Keyboard Shortcuts”
  • At the bottom you’ll see something that says: “Full keyboard access: In windows and dialogs, press Tab to move the keyboard focus between:”. Click on the “All controls” radio button.
  • Now enjoy your new tabbing freedom and tab to that Source List! Plus you can tab to more things in other Mac applications too. *Note that a shortcut to toggle this tab behavior globally is Control+F7.

Structure idéale de PHP sur Leopard


Installer PEAR



Vérifier la présence du php.ini. Pour le créer, faire

sudo cp /etc/php.ini.default /etc/php.ini

remplacer l'option extensions dir

extension_dir = "./"


extension_dir = "/usr/lib/php/extensions/no-debug-non-zts-20060613/"

remplacer la directive include_path

;include_path = ".:/php/includes"


include_path = ".:/usr/share/pear:/usr/lib/php/pear"

Install PEAR on OSX Leopard


Unlike previous version of OS X, Leopard doesn’t come with PHP’s PEAR repository installed by default. Luckily, installing is quick and painless. From a command line:

curl > go-pear.php
sudo php -q go-pear.php

Just press enter to select all the default choices except for the installation directory. For that, use /usr/local. (Thanks, Steve.)

Next we need to modify our php.ini file to include the new PEAR files:

sudo cp /etc/php.ini.default /etc/php.ini

Edit /etc/php.ini and change

;include_path = ".:/php/includes"

to read

include_path = ".:/usr/share/pear"

Restart Apache and you’re done!

How to install Lua 5 in Mac OS X Leopard


Open up terminal. Copy the link of the latest Lua version and download it:

Extract and compile:

tar -xzvf lua-5.1.4.tar.gz
cd lua-5.1.4
make macosx

Test and install (if test goes through)

make test
sudo make install
And you’re done!

Installer Sphinx sur OSX

Ce tuto utilise wget, qui n'est pas installé sur Leopard. Pour l'installer, la procédure est disponible ici.

# Download sphinx
tar zxvf sphinx-0.9.9-rc2.tar.gz

cd sphinx-0.9.9-rc2/

# Add stemming support
tar zxvf libstemmer_c.tgz

./configure --with-libstemmer

sudo make install

Installer LXML sur mac OS X 10.5


assuming your python is the mac os x default… make sure no traces of other pythons in your $PATH

télécharger et installer libxml2:

./configure --prefix=/usr/local/libxml2-2.7.0
sudo make install
cd /Library/Python/2.5/site-packages
sudo ln -s /usr/local/libxml2-2.7.0/lib/python2.5/site-packages/* .

télécharger et installer libxslt:

./configure --prefix=/usr/local/libxslt-1.1.24 --with-libxml-prefix=/usr/local/libxml2-2.7.0
sudo make install
cd /Library/Python/2.5/site-packages
sudo ln -s /usr/local/libxslt-1.1.24/lib/python2.5/site-packages/* .

télécharger et installer lxml:

sudo python install \
--with-xml2-config=/usr/local/libxml2-2.7.0/bin/xml2-config \

Installer MySQL Proxy sur Mac OSX (Leopard)

Les prérequis

Installer pkg-config

Télécharger l'archive, puis la décompresser

cd pkg-config-0.23
sudo make install

Installer lua

Télécharger l'archive, puis la décompresser

cd lua-5.1.4/
make macosx
sudo make install
sudo cp etc/lua.pc /usr/local/lib/pkgconfig/
sudo ranlib /usr/local/lib/liblua.a

Installer glib2


Cette librairie dépend de Gettext. L'installer si ce n'est pas déjà fait