Installing PEAR on Amazon EC2 or Ubuntu Linux Server

I will show you a fast way to check if Pear exists on your Linux server and if not, we will install it.

Does PEAR Exist?

Open a command prompt to see if PEAR exists. You can do so by simply typing:
which pear
at the command prompt. If you get a response that looks similar to:
/usr/bin/pear
then you have PEAR installed, but if you get something similar to:
/usr/bin/which: no pear in….
then you do not have PEAR installed so read on!

Installing PEAR

On Ubuntu, you can use the following command from the command line:

apt-get install php-pear

If u don’t have Ubuntu and are on a Linux server, use these two commands instead:

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

Leave a Reply

Your email address will not be published. Required fields are marked *