Setting up pear, PHING on mac OSX 10.7.2
Friday, July 22nd, 2011These instructions are for:
Computer/OS: Mac 10.6.8
Install pear in home directory or use command line “cd” to change directory using terminal:
$ cd ~ ( hit enter )
You need to change permissions on a few folders ( maybe create them ) to allow write access:
If the folders do not exist, from command line you create them:
$ mkdir /usr/local $ mkdir /tmp/pear $ mkdir /usr/bin/pear
Now via command line change the permissions:
$ sudo chmod -R 777 /usr/local/ $ sudo chmod -R 777 /tmp/pear $ sudo chmod -R 777 /usr/lib/php $ sudo chmod -R 777 /usr/bin/pear
(The instructions came straight from http://pear.php.net/manual/en/installation.getting.php)
Now using terminal run the following:
$ wget http://pear.php.net/go-pear.phar $ sudo php -d detect_unicode=0 go-pear.phar
make sure you change the Installation Base: ( should be option 1 ) to /usr/bin/pear
As well as #5 the PHP code directory!
Change #1 and #5 to:
1. Installation base ($prefix) : /usr/bin/pear 5. PHP code direcotry($php_dir) : /usr/lib/php ( *** NOTE the other numbers/options can be left alone with whatever is set during installation *** )
Symbolic link to use “pear” from command line:
$ sudo ln /usr/bin/pear/bin/pear /usr/local/bin
PHING:
From the command line:
$ pear channel-discover pear.phing.info
Now you can install phing
$ pear install phing/phing
That should be it!