Home > Mac > LeopardにPEARをインストールする

LeopardにPEARをインストールする

2008年9月11日 1 Comment »

昨日の続き。Mac OS X 10.5.4 に標準でインストール済みのPHP 5.2.6PEARを使えるように、インストーラをダウンロードしてからインストールします。

$ curl http://pear.php.net/go-pear > go-pear.php
$ sudo php -q go-pear.php

質問事項には基本的にenterもしくはreturnキーを押して進みますが、インストールの場所を確認してくるので、今回は1番目の項目だけ下記のように変更してインストールました。

1. Installation prefix ($prefix) : /usr/share/pear
2. Temporary files directory : $prefix/temp
3. Binaries directory : $prefix/bin
4. PHP code directory ($php_dir) : $prefix/php
5. Documentation base directory : $php_dir/docs
6. Data base directory : $php_dir/data
7. Tests base directory : $php_dir/tests

MDB2をインストールするか聞いてきたら、Y(=Yes)とします。

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

/user/share/pear/binにパスを通すため、Jedit Xで.bashrcに書き込む。

export PATH=/opt/local/bin:/opt/local/sbin/:/usr/share/pear/bin:$PATH

うまくインストールできたか試すため、「list」オプションを付けて、インストール済みのパッケージを表示させてみます。

$ pear list

パッケージとそのバージョンが表示されれば成功です。

参考:OS X Leopard My Setting (PHP)
参考:Mac 環境構築 : その 5 : PHP

This post was read 36 times until now

Tags:

Comments:0

Leave my own

コメントをどうぞ

メールアドレスが公開されることはありません。 * が付いている欄は必須項目です

*

次のHTML タグと属性が使えます: <a href="" title="" ktai=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> <img localsrc="" alt="">

Trackbacks:1

Listed below are links to weblogs that reference LeopardにPEARをインストールする

pingback from LeopardにPDO MySQL Driverをインストール » Wing World 2008年9月11日

[...] This post was read 0 times until now先ほどの続き。Mac OS X 10.5.4 に標準でインストール済みのPHP 5.2.6とMySQL 5.0.67を連携して使えるように、PDO MySQL Driverインストールする必要があるのですが、MacPorts [...]