Command line installer

Command line installer


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.

Semi-automatic installation

If you have downloaded a package release from 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.

buildBuild the extension from source
bundle Download and unpack a PECL extension
channel-addAdd a Channel (PEAR 1.4+)
channel-aliasSpecify an alias to a channel name (PEAR 1.4+)
channel-deleteRemove a channel from the list (PEAR 1.4+)
channel-discoverInitialize a channel from its server name (PEAR 1.4+)
channel-infoRetrieve information on a channel (PEAR 1.4+)
channel-updateUpdate an existing channel (PEAR 1.4+)
clear-cacheClear the XML-RPC cache
config-createCreate a default configuration file (PEAR 1.4+)
config-getEcho a specific configuration setting
config-helpShow information about a setting
config-setSet a specific configuration setting value
config-showShow all configuration setting values
convertConvert a package.xml 1.0 format to package.xml 2.0 format (PEAR 1.4+)
cvsdiff Execute and display a "cvs diff -u" on all files within the package
cvstagSet a CVS release tag
downloadDownload a package but not install it
download-allDownloads every available package
infoDisplay information about a package
installInstall a package, will report with success or failure
listList installed packages
list-allList all packages, packaged and/or available
list-channelsList available channels (PEAR 1.4+)
list-filesList files in an installed package (PEAR 1.4+)
list-upgradesList available upgrades for the installed packages
loginConnects and authenticates to the remote PEAR server
logoutLogs out from the remote PEAR server
makerpmBuilds a RPM spec file from a PEAR package
packageBuild a package
package-dependenciesShow package dependencies
package-validateValidate package consistency
remote-infoInformation about remote packages
remote-listList remote packages
run-scriptsRun post-install scripts bundled with a package (PEAR 1.4+)
run-testsRun regression tests
searchSearch the remote package database
shell-testDo a shell script test
signSign a package distribution file
uninstallUninstall and remove a package
update-channelsUpdate the channel list (PEAR 1.4+)
upgrade Upgrade a package to the current version (see also: preferred_state)
upgrade-allUpgrade all packages (see also: list-upgrades)

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.

Variable NameDescriptionDefault Value
bin_dirDirectory where executables are installed/usr/bin
doc_dirDirectory where documentation is installed/usr/lib/php/docs
ext_dirDirectory where loadable extensions are installed./
php_dir Directory where PHP files are installed (like PEAR files) /usr/lib/php
cache_dirPEAR installer cache directory, and used by XMLRPC/tmp/pear/cache
data_dirDirectory where data files are installed/usr/lib/php/data
php_binThe PHP CLI or CGI binary for executing scripts/usr/bin/php
test_dirDirectory where regression tests are installed/usr/lib/php/tests
cache_ttk Number of seconds that the local cache is used, and not updated (Time To Kill) 3600
preferred_state Preferred package state: stable, beta, alpha, devel, or snapshot stable
umask umask used when creating files (Unix-like systems only) 22
verboseDebug log level: 0-3 where 3 is full debug mode.1
http_proxy The optional HTTP proxy address (host:port) used when downloading packages  
remote_config Remote configuration file, used to mirror a local installation on a remote server through ftp. (PEAR 1.4+)  
auto_discoverAuto-discover new channels from command line or dependencies0
default_channelDefault channel (PEAR 1.4+) ( if using the pecl command)
preferred_mirrorPreferred channel mirror (PEAR 1.4+) ( if using the pecl command)
master_serverPEAR server [deprecated in PEAR 1.4+]
passwordPEAR password (used by maintainers) 
sig_binSignature handling program/sw/bin/gpg
sig_keydirSignature key directory/etc/pearkeys
sig_keyidThe key used for signing 
sig_typePackage signature type (only gpg)gpg
usernamePEAR username (used by maintainers) 

© Copyright 2003-2014 The ultimate PHP Editor and PHP IDE site.