PEAR install on Linux by a n00b for n00bs

Okay, I must admit: I’m a programmer and I know some commands. Because I want to use PEAR packages, I needed to install it. The installing command is quite easy to find, but I had a hard time determining the directory structure. Some searching on the internet and an IRC conversation (EFNet #pear, thanks davidc_!) later I was able to install PEAR in a quite reasonable directory structure.

Now that all is done it sounds logical. This blogpost is meant for people who want to install PEAR, but are not sure how to do it or about the directories which need to be specified.

Starting install

Log on to your server on the command line (as root). The install acan then be started as follows:

lynx -source | php


After some questions (which in 99% of the cases just get the default answer), you’ll get the prompt for the directories. After adjustment, my structure looks as follows:

1. Installation prefix ($prefix) : /usr
2. Temporary files directory     : $prefix/temp
3. Binaries directory            : $prefix/bin
4. PHP code directory ($php_dir) : $prefix/share/PEAR
5. Documentation base directory  : $php_dir/docs
6. Data base directory           : $php_dir/data
7. Tests base directory          : $php_dir/tests

Finishing installation

When the installation is done, the config (php.ini) file can automatically be adjusted. Note that you have to restart apache to load this new config.

The full overview

A complete overview from my PEAR install in- and output is given below.

Getagged , , ,

Geef een reactie

Het e-mailadres wordt niet gepubliceerd. Vereiste velden zijn gemarkeerd met *