システムレベルでPEARをインストールしないで、アプリケーションごとにPEARをインストールするメモです。
(システムレベルでPEARが入っている場合は、試していないので、うまくいかないかも・・・)
PEARコマンドに渡す設定ファイルを作成
1. PEARのインストール。
2. デフォルトのPEARの設定を確認。
後で設定する値の参考にします。
$ pear config-show
3. pearコマンドに渡す設定ファイル(pear.conf)を作成。
$ pear config-create /PATH/pear pear.conf
/PATH/pearは、PEARをインストールしたディレクトリを指定しています。
ただ、作成されるpear.confの設定値は、後で確認をして、変更する必要があると思います。
4. pear.confに設定されている値を確認。
$ pear -c pear.conf config-show
5. pear.confの設定値を更新。
bin_dir(PEARコマンドを配置したディレクトリ)の設定例です。
「-c pear.conf」のようにして、設定値を更新する対象の設定ファイルを指定しています。
$ pear -c pear.conf config-set bin_dir /PATH/pear/bin
config-showで表示されるサンプルです。
$ pear -c pear.conf 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 /PATH/pear/bin
PEAR documentation directory doc_dir /PATH/pear/PEAR/docs
PHP extension directory ext_dir ./
PEAR directory php_dir /PATH/pear/PEAR
PEAR Installer cache directory cache_dir /tmp/pear/cache
PEAR data directory data_dir /PATH/pear/PEAR/data
PEAR Installer download download_dir /PATH/pear/temp/download
directory
PHP CLI/CGI binary php_bin /usr/local/bin/php
php.ini location php_ini <not set>
PEAR Installer temp directory temp_dir /PATH/pear/temp
PEAR test directory test_dir /PATH/pear/PEAR/tests
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 pear.conf
System Configuration File Filename /usr/local/etc/pear.conf
PEARパッケージのインストール
設定ファイルを指定して、パッケージをインストールします。
$ pear -c pear.conf install [パッケージ]
追記(2008/03/12)
- PEARのインストールのリンクを修正