05 11 / 2011

Installing Pear and Drush on Mac Lion

Getting installation file from pear

sudo curl http://pear.php.net/go-pear.phar > go-pear.php

Start installation

sudo php -q go-pear.php

Change Installation Base

/usr/local

Proceed Install

Duplicate php.ini.default to php.ini

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

Edit /etc/php.ini

include_path=”.:/usr/local/share/pear”

Add /usr/local/bin to path in .profile (create the file if it doesn’t exist)

PATH=$PATH:/usr/local/bin

That completes the part of pear installation

Discover drush channel

sudo pear channel-discover pear.drush.org

Install drush

sudo install drush/drush

sudo was used here due to file access problem encountered when not using sudo as on drush project site (http://drupal.org/project/drush)