You can install pear in either of the following ways:
1. Add the pear configuration module when compiling PHP.
2. Go-pear mode.
I tried the go-pear method.
Download the go-pear script
wget http://pear.php.net/go-pear
Rename:
mv go-pear go-pear.php
Run the script:
php go-pear.php
Welcome to go-pear!Go-pear will install the 'pear' command and all the files needed byit. This command is your tool for PEAR installation and maintenance.Go-pear also lets you download and install the following optional PEARpackages: PEAR_Frontend_Web-beta, PEAR_Frontend_Gtk2, MDB2.If you wish to abort, press Control-C now, or press Enter to continue:
Press enter to confirm.
HTTP proxy (http://user:password@proxy.myhost.com:port), or Enter for none::
Enter Without proxy.
Below is a suggested file layout for your new PEAR installation. Tochange individual locations, type the number in front of thedirectory. Type 'all' to change all of them or simply press Enter toaccept these locations. 1. Installation prefix ($prefix) : /usr/local/ara 2. Temporary files directory : $prefix/temp 3. Binaries directory : $prefix/bin 4. PHP code directory ($php_dir) : $prefix/PEAR 5. Documentation base directory : $php_dir/docs 6. Data base directory : $php_dir/data 7. Tests base directory : $php_dir/tests1-7, 'all' or Enter to continue:
Install the configuration, select one to modify the default value, and press enter without modification. To change the installation directory, select 1 and press Enter.
Installation prefix ($prefix) [/usr/local/ara] :
Input directory:
/usr/loacl/pear
After installation, the system prompts you to modify the php. ini file and confirm the installation.
After the installation is completed, the following message is displayed:
The 'pear' command is now at your service at /usr/local/pear/bin/pear** The 'pear' command is not currently in your PATH, so you need to** use '/usr/local/pear/bin/pear' until you have added** '/usr/local/pear/bin' to your PATH environment variable.
You can add/usr/local/pear/bin/pear to the path environment variable, or directly use/usr/local/pear/bin/pear to run the pear command.
/usr/local/pear/bin/pear channel-update pear.php.net/usr/local/pear/bin/pear install HTML_Template_Sigma
Run OK for the two commands.
Reproduced from: http://www.lazylei.com /? P = 535