Configuring your PEAR setup

PEAR has a number of configuration options that you can change. Getting an overview about them is as easy as issuing a

$ pear config-show

The default settings suffice for novice users, there is rarely a need to change them when getting started. You can go on with installing packages.

Reading single values is accomplished by using config-get. The following command will show you where all the .php files of your installed pear packages reside.

$ pear config-get php_dir
/usr/share/pear

Changing a value is as easy as retrieving it:

$ pear config-set preferred_state beta
config-set succeeded

When changing a config setting, it does not immediately get applied to already installed packages. This is especially true when changing variables like data_dir. Use $ pear upgrade --force to reinstall all packages in such cases.

Config options

Variable Name Описание Default Value
bin_dir Directory where executables are installed /usr/bin
doc_dir Directory where documentation is installed /usr/lib/php/docs
ext_dir Directory where loadable extensions are installed ./
php_dir Directory where PHP files are installed (like PEAR files) /usr/lib/php
cache_dir PEAR installer cache directory, and used by XMLRPC /tmp/pear/cache
data_dir Directory where data files are installed /usr/lib/php/data
php_bin The PHP CLI or CGI binary for executing scripts /usr/bin/php
test_dir Directory 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
verbose Debug 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_discover Auto-discover new channels from command line or dependencies 0
default_channel Default channel (PEAR 1.4+) pear.php.net (pecl.php.net if using the pecl command)
preferred_mirror Preferred channel mirror (PEAR 1.4+) pear.php.net (pecl.php.net if using the pecl command)
master_server PEAR server [deprecated in PEAR 1.4+] pear.php.net
password PEAR password (used by maintainers)  
sig_bin Signature handling program /sw/bin/gpg
sig_keydir Signature key directory /etc/pearkeys
sig_keyid The key used for signing  
sig_type Package signature type (only gpg) gpg
username PEAR username (used by maintainers)  
    Поддержать сайт на родительском проекте КГБ