気ままなDevLog

webとかプログラミングについての雑記帳

go-pearでのpearインストール

pearインストール

curlでgo-pearを取得。もしくはwgetで。

# curl http://pear.php.net/go-pear > pear.php
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100 87099  100 87099    0     0  29743      0  0:00:02  0:00:02 --:--:-- 53998


# php -q pear.php
Welcome to go-pear!

Go-pear will install the 'pear' command and all the files needed by
it.  This command is your tool for PEAR installation and maintenance.

Go-pear also lets you download and install the following optional PEAR
packages: PEAR_Frontend_Web-beta, PEAR_Frontend_Gtk2, MDB2.


If you wish to abort, press Control-C now, or press Enter to continue:

HTTP proxy (http://user:password@proxy.myhost.com:port), or Enter for none::

Below is a suggested file layout for your new PEAR installation.  To
change individual locations, type the number in front of the
directory.  Type 'all' to change all of them or simply press Enter to
accept these locations.

(↓このように変更)
 1. Installation prefix ($prefix) : /usr/local/share
 2. Temporary files directory     : $prefix/temp
 3. Binaries directory            : /usr/local/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/tests

1-7, 'all' or Enter to continue:

The following PEAR packages are bundled with PHP: PEAR_Frontend_Web-beta,
PEAR_Frontend_Gtk2, MDB2.
Would you like to install these as well? [Y/n] : Y

Would you like to alter php.ini </usr/local/php/lib/php.ini>? [Y/n] : Y

php.ini </usr/local/php/lib/php.ini> include_path updated.

Current include path           : .:/usr/local/php/lib/php
Configured directory           : /usr/local/share/PEAR
Currently used php.ini (guess) : /usr/local/php/etc/php.ini
Press Enter to continue:

The 'pear' command is now at your service at /usr/bin/pear
pearの設定を確認

pear config-showコマンドで現在の設定を確認。

$ pear config-show
CONFIGURATION (CHANNEL PEAR.PHP.NET):
=====================================
Auto-discover new Channels     auto_discover    <not set>
Default Channel                default_channel  pear.php.net
HTTP Proxy Server Address      http_proxy       <not set>
PEAR server [DEPRECATED]       master_server    pear.php.net
Default Channel Mirror         preferred_mirror pear.php.net
Remote Configuration File      remote_config    <not set>
PEAR executables directory     bin_dir          /usr/local/php/bin
PEAR documentation directory   doc_dir          /usr/local/php/lib/php/pear/docs
PHP extension directory        ext_dir          ./
PEAR directory                 php_dir          /usr/local/php/lib/php/pear
PEAR Installer cache directory cache_dir        /tmp/pear/cache
PEAR configuration file        cfg_dir          /usr/local/php/lib/php/pear/cfg
directory
PEAR data directory            data_dir         /usr/local/php/lib/php/pear/data
PEAR Installer download        download_dir     /tmp/pear/download
directory
PHP CLI/CGI binary             php_bin          /usr/local/php/bin/php
php.ini location               php_ini          <not set>
PEAR Installer temp directory  temp_dir         /tmp/pear/temp
PEAR test directory            test_dir         /usr/local/php/lib/php/pear/tests
PEAR www files directory       www_dir          /usr/local/php/lib/php/pear/www
Cache TimeToLive               cache_ttl        3600
Preferred Package State        preferred_state  stable
Unix file mask                 umask            2
Debug Log Level                verbose          1
PEAR password (for             password         <not set>
maintainers)
Signature Handling Program     sig_bin          /usr/bin/gpg
Signature Key Directory        sig_keydir       /usr/local/etc/pearkeys
Signature Key Id               sig_keyid        <not set>
Package Signature Type         sig_type         gpg
PEAR username (for             username         <not set>
maintainers)
User Configuration File        Filename         /home/myuser/.pearrc
System Configuration File      Filename         /usr/local/php/etc/pear.conf
pearの設定変更

pear config-setで設定値を変更できる。

$ pear config-set bin_dir /usr/local/bin
config-set succeeded