PEAR Installation Notes

PHP Requirements

PHP 5, including the mcrypt, sockets, and gettext extensions
Framework and Smarty via the MerchBox PEAR channel

PEAR's HTML_QuickForm
PEAR's Crypt_Blowfish
PEAR's Net_Vpopmaild

PHP5 / PEAR installation on Debian Sarge (old stable)

Add the following two lines to /etc/apt/sources.list for access to PHP5 packages via the dotdeb repository:

deb http://dotdeb.pimpmylinux.org/ sarge all
deb-src http://dotdeb.pimpmylinux.org/ sarge all

Now update, and install the relevant packages (just this step should work for Etch):

apt-get update
apt-get install libapache2-mod-php5 php5-mcrypt php-pear

PEAR Manual Installation

Most distributions come with pear installed. If not, the easiest way to install it is with go-pear:

wget http://pear.php.net/go-pear
php go-pear
(follow prompts from here)

Manual installation on a shared host

If you do not have root access, you can install PEAR locally. The official instructions are located here.

NOTE The above link neglects to mention that your download_dir and temp_dir configuration settings might collide with the system ones (which are owned by root, and will break installation). The solution, for PEAR 1.4+ users is to use the PEAR 1.3.5 and lower instructions for creating the config .pearrc file, but add those two configuration options.

So the whole local installation procedure for PEAR 1.4+ users would be:

pear -s -c ~/.pearrc             \
    -d doc_dir=~/pear/docs       \
    -d ext_dir=~/pear/ext        \
    -d php_dir=~/pear/lib        \
    -d data_dir=~/pear/data      \
    -d test_dir=~/pear/tests     \
    -d cache_dir=~/pear/cache    \
    -d bin_dir=~/pear/bin        \
    -d download_dir=~/pear/cache \
    -d temp_dir=~/pear/temp
pear install -o PEAR
export PATH=~/pear/bin:$PATH
pear channel-discover pear.merchbox.com
pear install -a merchbox/Framework-alpha
pear install -a Net_Vpopmaild-alpha
pear install -a HTML_QuickForm
pear install -a Crypt_Blowfish

ToasterAdmin PEAR Dependency Installation

Lastly, setup PEAR. If you have root access to the system and can work with the system-wide PEAR install, follow these steps:

pear upgrade-all
pear channel-discover pear.merchbox.com
pear install -a merchbox/Framework-alpha
pear install -a Net_Vpopmaild-alpha
pear install -a HTML_QuickForm
pear install -a Crypt_Blowfish

At this point, your PEAR installation should look something like this (via pear -a):

# pear list -a
Installed packages, channel pear.merchbox.com:
==============================================
Package   Version State
Framework 0.2.4.1 alpha
Smarty    2.6.18  stable
Installed packages, channel pear.php.net:
=========================================
Package          Version State
Archive_Tar      1.3.2   stable
Console_Getopt   1.2.3   stable
DB               1.7.12  stable
Date             1.4.7   stable
HTML_Common      1.2.4   stable
HTML_QuickForm   3.2.9   stable
I18Nv2           0.11.4  beta
Log              1.9.11  stable
MDB2             2.4.1   stable
Mail             1.1.14  stable
Net_Socket       1.0.8   stable
Net_Vpopmaild    0.1.0   alpha
PEAR             1.6.1   stable
Structures_Graph 1.0.2   stable
Validate         0.7.0   beta
XML_Parser       1.2.8   stable
XML_Serializer   0.18.0  beta
XML_Util         1.1.4   stable

If you do not have root access, you can install PEAR locally. The official instructions are located here.

NOTE The above link neglects to mention that your download_dir and temp_dir configuration settings might collide with the system ones (which are owned by root, and will break installation). The solution, for PEAR 1.4+ users is to use the PEAR 1.3.5 and lower instructions for creating the config .pearrc file, but add those two configuration options.

So the whole local installation procedure for PEAR 1.4+ users would be:

pear -s -c ~/.pearrc             \
    -d doc_dir=~/pear/docs       \
    -d ext_dir=~/pear/ext        \
    -d php_dir=~/pear/lib        \
    -d data_dir=~/pear/data      \
    -d test_dir=~/pear/tests     \
    -d cache_dir=~/pear/cache    \
    -d bin_dir=~/pear/bin        \
    -d download_dir=~/pear/cache \
    -d temp_dir=~/pear/temp
pear install -o PEAR
export PATH=~/pear/bin:$PATH
pear channel-discover pear.merchbox.com
pear install -a merchbox/Framework-alpha
pear install -a Net_Vpopmaild-alpha
pear install -a HTML_QuickForm
pear install -a Crypt_Blowfish