Install PEAR for php in Linux

It is very easy to install PEAR package for php. It lets you to install many many php extensions easily without compiling the source packages.

If you get

pear – command not found

then it means pear is not installed in your server. To install it just follow the steps below at the command prompt.

Download the installation php file from http://pear.php.net/go-pear.

wget http://pear.php.net/go-pear

Rename to php file

cp go-pear go-pear.php

Run the php script from commandline.

php go-pear.php

and you will see the installation begin. Once the binary is installed, you can install php various extensions using this command.

pear install package

Hope this helps!