ゼミのサーバにもPEARを導入した。その時のメモ
pearをいれるために、php-develを入れる必要があるらしいので。
php-devel-5.3.0-2.el5.remi.2.i386.rpmをダウロードして。
$ rpm -Uvh php-devel-5.3.0-2.el5.remi.2.i386.rpm
実行したら、依存性のエラーが出た・・・。autoconfとautomakeが必要らしいので。rpmを入手して、
$ rpm -Uvh rpm -Uvh autoconf-2.61-8.fc7.noarch.rpm
したら、また依存性のエラー。今度はimakeが必要らしい。なので、rpmを入手して、
$ rpm -Uvh imake-1.0.2-3.i386.rpm
をした。で、
$ rpm -Uvh automake-1.9.6-2.1.noarch.rpm $ rpm -Uvh autoconf-2.61-8.fc7.noarch.rpm $ rpm -Uvh php-devel-5.3.0-2.el5.remi.2.i386.rpm
で無事に入った。
でphp-develが入ったので、PEARを入れるために
■手順1 go-pear.php を用意
http://pear.php.net/go-pear
でソースをコピーしてgo-pear.phpとして保存。
■手順2 実行
$ php go-pear.php
そしてインストールするディレクトリを決めて、(ここでは/usr/share/pearとした)流れに沿って、/etc/php.iniにへのinclude_pathの追加を許可して、pearの導入終了。
しかし、このままじゃ、フルパスで実行しないといけないので、パスを通すために~/.bashrcに以下を追記。
export PATH="$PATH:/usr/share/pear/bin"
で.bashrcを再読み込みして、pearコマンドを実行してみると...
$ pear Commands: build Build an Extension From C Source bundle Unpacks a Pecl Package channel-add Add a Channel channel-alias Specify an alias to a channel name channel-delete Remove a Channel From the List channel-discover Initialize a Channel from its server channel-info Retrieve Information on a Channel channel-login Connects and authenticates to remote channel server channel-logout Logs out from the remote channel server channel-update Update an Existing Channel clear-cache Clear Web Services Cache config-create Create a Default configuration file config-get Show One Setting config-help Show Information About Setting config-set Change Setting config-show Show All Settings convert Convert a package.xml 1.0 to package.xml 2.0 format cvsdiff Run a "cvs diff" for all files in a package cvstag Set CVS Release Tag download Download Package download-all Downloads each available package from the default channel info Display information about a package install Install Package list List Installed Packages In The Default Channel list-all List All Packages list-categories List All Categories list-category List All Packages of a Category list-channels List Available Channels list-files List Files In Installed Package list-packages List All Packages of a Channel list-upgrades List Available Upgrades login Connects and authenticates to remote server [Deprecated in favor of channel-login] logout Logs out from the remote server [Deprecated in favor of channel-logout] makerpm Builds an RPM spec file from a PEAR package package Build Package package-dependencies Show package dependencies package-validate Validate Package Consistency pickle Build PECL Package remote-info Information About Remote Packages remote-list List Remote Packages run-scripts Run Post-Install Scripts bundled with a package run-tests Run Regression Tests search Search remote package database shell-test Shell Script Test sign Sign a package distribution file svntag Set SVN Release Tag uninstall Un-install Package update-channels Update the Channel List upgrade Upgrade Package upgrade-all Upgrade All Packages [Deprecated in favor of calling upgrade with no parameters] Usage: pear [options] command [command-options] <parameters> Type "pear help options" to list all options. Type "pear help shortcuts" to list all command shortcuts. Type "pear help <command>" to get the help for the specified command.
動いた・・・。どうにかインストール終了。
今回、phpのバージョンとインストールするrpmのphp-develのバージョンを一緒にしないとインストールできないことを再認識した。覚えておこう。
※気になった点
pearのインストール時に以下のような警告がたくさん出たが、
Deprecated: Function set_magic_quotes_runtime() is deprecated in /usr/share/pear/temp/PEAR/Registry.php on line ○○○
set_majic_quotes_runtime()などの非推奨の関数を使っているらしいので警告が出ているらしい。なんか警告が出るのは気持ち悪いが、解決法がわからなかったので、とりあえず動くので、現状維持。