命令行方式安装

Prerequisites

The following description requires the latest version of the PEAR package manager to be installed.

The command line installer is the easiest way to install PEAR packages on your system: It connects to the PEAR package server via a simple HTTP connection, loads the package on your system and installs it to the desired location.

Fully-automatic installation

Using the command line installer is pretty straightforward and easy to use. Simply run the following line on your shell:


$ pear install <package>
      

<package> has to be replaced with the name of the package you want to install (e.g. HTTP_Upload). To get a list of the available packages, you can point your browser to the PEAR package browser or you can run:


$ pear remote-list
      

This command returns a list of all packages that are available in PEAR at the moment.

Semi-automatic installation

If you have downloaded a package release from pear.php.net as a gzipped tar archive, you can also install it locally. To do this, run the following line on your shell:


$ pear install <file>.tgz
      

This command will automatically install the package and does not require an online connection. <file>.tgz has to be replaced with the name of the downloaded file.

Commands and Variables

Here's a list of commands available to the pear command line tool. Many of these commands may require root access to the server.

And here's a list of available PEAR configuration variables. Use the config-get, config-help, config-set, and config-show command options to use these configuration variables. While installing PEAR on the system, PEAR will attempt to replace the default values with values specific to the given server. Adjust accordingly.