Following are the instruction on how to install PEAR on OSX 10.11 El Capitan..
Pear is a PHP package manager and sad news is that it doesn’t come by as default application in OS X, in the following tutorial i’ll tell you how to install PEAR on OSX 10.11 El Capitan.
How To install PEAR on OSX 10.11 El Capitan:
- First open Terminal on your Mac.
- Now enter the following commands as mentioned.
- Move into your home directory.
cd
Check version
pear version
- If pear is not installed then use the following command.
curl -O http://pear.php.net/go-pear.phar
- Once its downloaded, use the following command to install it.
php -d detect_unicode=0 go-pear.phar
- Now wait for process to start and when you see beginning installation. Press Enter.
- Once installation is completed, now you have to add pear to your shell path. Use the following command.
cd
nano .bash_profile
- Use the following command to add to your path.
/Users/USERNAME/pear/bin
- After adding the path you’ll following line in result.
export PATH=”/usr/local/mysql/bin:/Users/USERNAME/pear/share/pear/:$PATH”
- Now you have to refresh the file and check pear version.
source .bash_profile
pear version
Now that Pear is installed on your OSX El Capitan, lets add the Pear path to your PHP install.
- First let us locate PHP on your OSX. Type the following command.
php –ini
- Once you got the path, now all you have to do is add into php.ini file.
include_path = “.:/Users/YOURUSERNAME/pear/share/pear/”
- Now to check pear packages list.
pear list
All done…..