Subscribe:

2010/10/02

PEARインストール(さくらVPSサーバー)





PEARインストール


[root@centos]# yum install php-pear*
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
* addons: rsync.atworks.co.jp
* base: rsync.atworks.co.jp
* extras: rsync.atworks.co.jp
* updates: rsync.atworks.co.jp
Setting up Install Process
Resolving Dependencies
--> Running transaction check
---> Package php-pear.noarch 1:1.4.9-6.el5 set to be updated
--> Processing Dependency: php-devel for package: php-pear
---> Package php-pear-Auth-SASL.noarch 0:1.0.2-4.el5.centos set to be updated
---> Package php-pear-DB.noarch 0:1.7.13-1.el5.centos set to be updated
---> Package php-pear-Date.noarch 0:1.4.7-2.el5.centos set to be updated
---> Package php-pear-File.noarch 0:1.2.2-1.el5.centos set to be updated
---> Package php-pear-HTTP-Request.noarch 0:1.4.2-1.el5.centos set to be updated
---> Package php-pear-Log.noarch 0:1.9.13-1.el5.centos set to be updated
---> Package php-pear-MDB2.noarch 0:2.4.1-2.el5.centos set to be updated
---> Package php-pear-MDB2-Driver-mysql.noarch 0:1.4.1-3.el5.centos set to be updated
---> Package php-pear-Mail.noarch 0:1.1.14-1.el5.centos set to be updated
---> Package php-pear-Mail-Mime.noarch 0:1.4.0-1.el5.centos set to be updated
---> Package php-pear-Net-SMTP.noarch 0:1.2.10-1.el5.centos set to be updated
---> Package php-pear-Net-Sieve.noarch 0:1.1.5-2.el5.centos set to be updated
---> Package php-pear-Net-Socket.noarch 0:1.0.8-1.el5.centos set to be updated
---> Package php-pear-Net-URL.noarch 0:1.0.15-1.el5.centos set to be updated
--> Running transaction check
---> Package php-devel.x86_64 0:5.1.6-27.el5 set to be updated
--> Finished Dependency Resolution
Dependencies Resolved
==========================================================================================
Package Arch Version Repository Size
==========================================================================================
Installing:
php-pear noarch 1:1.4.9-6.el5 base 344 k
php-pear-Auth-SASL noarch 1.0.2-4.el5.centos extras 11 k
php-pear-DB noarch 1.7.13-1.el5.centos extras 142 k
php-pear-Date noarch 1.4.7-2.el5.centos extras 62 k
php-pear-File noarch 1.2.2-1.el5.centos extras 23 k
php-pear-HTTP-Request noarch 1.4.2-1.el5.centos extras 21 k
php-pear-Log noarch 1.9.13-1.el5.centos extras 51 k
php-pear-MDB2 noarch 2.4.1-2.el5.centos extras 132 k
php-pear-MDB2-Driver-mysql noarch 1.4.1-3.el5.centos extras 41 k
php-pear-Mail noarch 1.1.14-1.el5.centos extras 26 k
php-pear-Mail-Mime noarch 1.4.0-1.el5.centos extras 39 k
php-pear-Net-SMTP noarch 1.2.10-1.el5.centos extras 18 k
php-pear-Net-Sieve noarch 1.1.5-2.el5.centos extras 17 k
php-pear-Net-Socket noarch 1.0.8-1.el5.centos extras 12 k
php-pear-Net-URL noarch 1.0.15-1.el5.centos extras 9.7 k
Installing for dependencies:
php-devel x86_64 5.1.6-27.el5 base 503 k
Transaction Summary
==========================================================================================
Install 16 Package(s)
Upgrade 0 Package(s)
Total download size: 1.4 M
Is this ok [y/N]: y
Downloading Packages:
(1/16): php-pear-Net-URL-1.0.15-1.el5.centos.noarch.rpm | 9.7 kB 00:00
(2/16): php-pear-Auth-SASL-1.0.2-4.el5.centos.noarch.rpm | 11 kB 00:00
(3/16): php-pear-Net-Socket-1.0.8-1.el5.centos.noarch.rpm | 12 kB 00:00
(4/16): php-pear-Net-Sieve-1.1.5-2.el5.centos.noarch.rpm | 17 kB 00:00
(5/16): php-pear-Net-SMTP-1.2.10-1.el5.centos.noarch.rpm | 18 kB 00:00
(6/16): php-pear-HTTP-Request-1.4.2-1.el5.centos.noarch.rpm | 21 kB 00:00
(7/16): php-pear-File-1.2.2-1.el5.centos.noarch.rpm | 23 kB 00:00
(8/16): php-pear-Mail-1.1.14-1.el5.centos.noarch.rpm | 26 kB 00:00
(9/16): php-pear-Mail-Mime-1.4.0-1.el5.centos.noarch.rpm | 39 kB 00:00
(10/16): php-pear-MDB2-Driver-mysql-1.4.1-3.el5.centos.noarch.rpm | 41 kB 00:00
(11/16): php-pear-Log-1.9.13-1.el5.centos.noarch.rpm | 51 kB 00:00
(12/16): php-pear-Date-1.4.7-2.el5.centos.noarch.rpm | 62 kB 00:00
(13/16): php-pear-MDB2-2.4.1-2.el5.centos.noarch.rpm | 132 kB 00:00
(14/16): php-pear-DB-1.7.13-1.el5.centos.noarch.rpm | 142 kB 00:00
(15/16): php-pear-1.4.9-6.el5.noarch.rpm | 344 kB 00:00
(16/16): php-devel-5.1.6-27.el5.x86_64.rpm | 503 kB 00:00
------------------------------------------------------------------------------------------
Total 2.8 MB/s | 1.4 MB 00:00
Running rpm_check_debug
Running Transaction Test
Finished Transaction Test
Transaction Test Succeeded
Running Transaction
Installing : php-devel 1/16
Installing : php-pear 2/16
Installing : php-pear-Net-Socket 3/16
Installing : php-pear-MDB2 4/16
Installing : php-pear-Net-URL 5/16
Installing : php-pear-Auth-SASL 6/16
Installing : php-pear-Net-SMTP 7/16
Installing : php-pear-DB 8/16
Installing : php-pear-Mail-Mime 9/16
Installing : php-pear-MDB2-Driver-mysql 10/16
Installing : php-pear-File 11/16
Installing : php-pear-Log 12/16
Installing : php-pear-Net-Sieve 13/16
Installing : php-pear-HTTP-Request 14/16
Installing : php-pear-Mail 15/16
Installing : php-pear-Date 16/16
Installed:
php-pear.noarch 1:1.4.9-6.el5
php-pear-Auth-SASL.noarch 0:1.0.2-4.el5.centos
php-pear-DB.noarch 0:1.7.13-1.el5.centos
php-pear-Date.noarch 0:1.4.7-2.el5.centos
php-pear-File.noarch 0:1.2.2-1.el5.centos
php-pear-HTTP-Request.noarch 0:1.4.2-1.el5.centos
php-pear-Log.noarch 0:1.9.13-1.el5.centos
php-pear-MDB2.noarch 0:2.4.1-2.el5.centos
php-pear-MDB2-Driver-mysql.noarch 0:1.4.1-3.el5.centos
php-pear-Mail.noarch 0:1.1.14-1.el5.centos
php-pear-Mail-Mime.noarch 0:1.4.0-1.el5.centos
php-pear-Net-SMTP.noarch 0:1.2.10-1.el5.centos
php-pear-Net-Sieve.noarch 0:1.1.5-2.el5.centos
php-pear-Net-Socket.noarch 0:1.0.8-1.el5.centos
php-pear-Net-URL.noarch 0:1.0.15-1.el5.centos
Dependency Installed:
php-devel.x86_64 0:5.1.6-27.el5
Complete!
[root@centos]#
PEAR管理用にPEAR_Infoをインストール
[root@centos]# pear install PEAR_Info
WARNING: channel "pear.php.net" has updated its protocols, use "channel-update pear.php.net" to update
チャンネルをアップデートしろとワーニング
Did not download optional dependencies: channel://pear.phpunit.de/PHPUnit, use --alldeps to download automatically
pear/PEAR_Info requires PEAR Installer (version >= 1.5.4), installed version is 1.4.9
pear/PEAR_Info can optionally use package "channel://pear.phpunit.de/PHPUnit" (version >= 3.1.4)
No valid packages found
install failed
インストーラーが古いからインストールできないとエラー
[root@centos]# pear channel-update pear.php.net チャンネルアップデート
Retrieving channel.xml from remote server
Channel pear.php.net channel.xml is up to date
[root@centos]# pear upgrade PEAR PEARアップグレード
pear/Archive_Tar requires PEAR Installer (version >= 1.5.4), installed version is 1.4.9
pear/PEAR dependency package "pear/Archive_Tar" installed version 1.3.1 is not the recommended version 1.3.7, but may be compatible, use --force to install
downloading Console_Getopt-1.2.3.tgz ...
Starting to download Console_Getopt-1.2.3.tgz (4,011 bytes)
....done: 4,011 bytes
upgrade ok: channel://pear.php.net/Console_Getopt-1.2.3
やっぱり失敗
Archive_Tarバージョンが1.3.1だけどたぶん1.3.7と互換性があるから強制的にインストール可能ですよって・・事かな?
[root@centos]# pear install --force Archive_Tar お言葉に甘えて強制インストール
warning: pear/pear dependency package "pear/Archive_Tar" installed version 1.3.7 is not the recommended version 1.3.1
warning: pear/Archive_Tar requires PEAR Installer (version >= 1.5.4), installed version is 1.4.9
downloading Archive_Tar-1.3.7.tgz ...
Starting to download Archive_Tar-1.3.7.tgz (17,610 bytes)
......done: 17,610 bytes
install ok: channel://pear.php.net/Archive_Tar-1.3.7
インストール成功
[root@centos]# pear upgrade PEAR PEARアップグレード
downloading PEAR-1.9.1.tgz ...
Starting to download PEAR-1.9.1.tgz (293,587 bytes)
.........................done: 293,587 bytes
upgrade ok: channel://pear.php.net/PEAR-1.9.1
PEAR: Optional feature webinstaller available (PEAR's web-based installer)
PEAR: Optional feature gtkinstaller available (PEAR's PHP-GTK-based installer)
PEAR: Optional feature gtk2installer available (PEAR's PHP-GTK2-based installer)
To install use "pear install pear/PEAR#featurename"
[root@centos]# pear install PEAR_Info PEAR_Infoインストール
Unknown remote channel: pear.phpunit.de
Did not download optional dependencies: channel://pear.phpunit.de/PHPUnit, use --alldeps to download automatically
pear/PEAR_Info can optionally use package "channel://pear.phpunit.de/PHPUnit" (version >= 3.1.4)
downloading PEAR_Info-1.9.2.tgz ...
Starting to download PEAR_Info-1.9.2.tgz (60,722 bytes)
...............done: 60,722 bytes
install ok: channel://pear.php.net/PEAR_Info-1.9.2

PEAR動作確認


[root@centos]# vi /var/www/html/pearinfo.php
<?php
require_once 'System.php';
require_once 'PEAR/Info.php';
$info = new PEAR_Info();
$info->show();
?>
:wq 上書き保存して終了
[root@centos]# chmod 755 /var/www/html/pearinfo.php 実行権限付与
ブラウザから http://自分のアドレス/pearinfo.php にアクセス
PEARバージョン等が表示されれば成功

1 件のコメント:

PHP+OAuth+Twitterのアカウントでログインする機能を作った時のまとめ « tech* さんのコメント...

[...] pearコマンドが使えないのでインストールが必要と。 PEARインストール(さくらVPSサーバー) – [...]