CentOS5.5にPHP5.3をインストールする方法

CentOS5.5に用意されているPHPは5.1なので、phpMyadmin等のプログラムの最新版が利用できません。

よってPHPのバージョンを5.3に今回はあげます。

今回epelのレポジトリが壊れていたりして、苦戦したので、後の人のために顛末を書いておきます。

では早速とりかかりましょう。


既存のPHPがyum等でインストールされている場合は、

#yum remove php

等をして削除しておきます。

まずはRPMのパッケージREMIを追加します。

wget http://download.fedora.redhat.com/pub/epel/5/x86_64/epel-release-5-4.noarch.rpm
wget http://rpms.famillecollet.com/enterprise/remi-release-5.rpm
rpm -Uvh remi-release-5.rpm epel-release-5-4.noarch.rpm

確認してみましょう。

# yum --enablerepo=remi list | grep php
php.x86_64                                 5.3.4-1.el5.remi            remi
phpMyAdmin.noarch                          3.3.9-1.el5.remi            remi

きちんとPHP5.3があります。同じくphpMyAdminについても3系統にあがっています。


勇み足で、remiのみを指定してインストールを行うと以下のエラーが出ます。
(後から来る人のため、踏んだ地雷を書いておきます。)


# yum --enablerepo=remi install php
Loaded plugins: downloadonly, fastestmirror
Loading mirror speeds from cached hostfile
 * addons: ftp.nara.wide.ad.jp
 * base: ftp.nara.wide.ad.jp
 * extras: ftp.nara.wide.ad.jp
 * remi: rpms.famillecollet.com
 * updates: ftp.nara.wide.ad.jp
Setting up Install Process
Resolving Dependencies
--> Running transaction check
---> Package php.x86_64 0:5.3.4-1.el5.remi set to be updated
--> Processing Dependency: httpd-mmn = 20051115 for package: php
--> Processing Dependency: php-cli = 5.3.4-1.el5.remi for package: php
--> Processing Dependency: php-common = 5.3.4-1.el5.remi for package: php
--> Processing Dependency: httpd for package: php
--> Running transaction check
---> Package httpd.x86_64 0:2.2.3-43.el5.centos.3 set to be updated
---> Package php-cli.x86_64 0:5.3.4-1.el5.remi set to be updated
--> Processing Dependency: libedit.so.0()(64bit) for package: php-cli
---> Package php-common.x86_64 0:5.3.4-1.el5.remi set to be updated
--> Finished Dependency Resolution
php-cli-5.3.4-1.el5.remi.x86_64 from remi has depsolving problems
  --> Missing Dependency: libedit.so.0()(64bit) is needed by package php-cli-5.3.4-1.el5.remi.x86_64 (remi)
Error: Missing Dependency: libedit.so.0()(64bit) is needed by package php-cli-5.3.4-1.el5.remi.x86_64 (remi)
 You could try using --skip-broken to work around the problem
 You could try running: package-cleanup --problems
                        package-cleanup --dupes
                        rpm -Va --nofiles --nodigest
The program package-cleanup is found in the yum-utils package.

epelがないから依存をクリアできないと出ています。
ではepelもくわえてみましょうか。

# yum --enablerepo=remi,epel install php
Loaded plugins: downloadonly, fastestmirror
Loading mirror speeds from cached hostfile
 * addons: ftp.nara.wide.ad.jp
 * base: ftp.nara.wide.ad.jp
 * epel: ftp.iij.ad.jp
 * extras: ftp.nara.wide.ad.jp
 * remi: iut-info.univ-reims.fr
 * updates: ftp.nara.wide.ad.jp
http://ftp.iij.ad.jp/pub/linux/fedora/epel/5/x86_64/repodata/63f2f883f0f8fbb28101ee10202c4574c65cbd0d-primary.sqlite.bz2: [Errno 14] HTTP Error 404: Not Found
Trying other mirror.
http://ftp.kddilabs.jp/Linux/packages/fedora/epel/5/x86_64/repodata/63f2f883f0f8fbb28101ee10202c4574c65cbd0d-primary.sqlite.bz2: [Errno 14] HTTP Error 404: Not Found
Trying other mirror.
http://ftp.jaist.ac.jp/pub/Linux/Fedora/epel/5/x86_64/repodata/63f2f883f0f8fbb28101ee10202c4574c65cbd0d-primary.sqlite.bz2: [Errno 14] HTTP Error 404: Not Found
Trying other mirror.
http://ftp.riken.jp/Linux/fedora/epel/5/x86_64/repodata/63f2f883f0f8fbb28101ee10202c4574c65cbd0d-primary.sqlite.bz2: [Errno 14] HTTP Error 404: Not Found
Trying other mirror.
http://ftp.tsukuba.wide.ad.jp/Linux/fedora/epel/5/x86_64/repodata/63f2f883f0f8fbb28101ee10202c4574c65cbd0d-primary.sqlite.bz2: [Errno 14] HTTP Error 404: Not Found
Trying other mirror.
http://ftp.yz.yamagata-u.ac.jp/pub/linux/fedora/epel/5/x86_64/repodata/63f2f883f0f8fbb28101ee10202c4574c65cbd0d-primary.sqlite.bz2: [Errno 14] HTTP Error 404: Not Found
Trying other mirror.
Error: failure: repodata/63f2f883f0f8fbb28101ee10202c4574c65cbd0d-primary.sqlite.bz2 from epel: [Errno 256] No more mirrors to try.

どうやらepelのレポジトリがうまく解決できないようです。困りました。

fastestmirrorを臨時的に一旦停止させます。


応急処置:

/etc/yum/pluginconf.d/fastestmirror.confの設定を変えて、更新しました。

[main]のenabledをenabled=0に設定します。次に/etc/yum.repos.d/epel.repoのbaseurlのコメントを外しました。

新しいレポジトリとPHPのバージョン

気を取り直してさぁレポジトリを見てみましょう。

# yum --enablerepo=remi list | grep php
graphviz-php.x86_64                        2.12-8.el5                  epel
mod_suphp.x86_64                           0.6.3-1.el5                 epel
nntpgrab-php.x86_64                        0.6.2-1.el5                 epel
php.x86_64                                 5.3.4-1.el5.remi            remi
php-IDNA_Convert.noarch                    0.6.3-2.el5                 epel
php-PHPMailer.noarch                       5.0.2-3.el5.remi            remi
php-Smarty.noarch                          2.6.26-1.el5                epel
php-ZendFramework.noarch                   1.11.0-1.el5.remi           remi
php-ZendFramework-Auth-Adapter-Ldap.noarch 1.11.0-1.el5.remi           remi
php-ZendFramework-Cache-Backend-Apc.noarch 1.11.0-1.el5.remi           remi
php-ZendFramework-Cache-Backend-Memcached.noarch
php-ZendFramework-Cache-Backend-Sqlite.noarch
php-ZendFramework-Captcha.noarch           1.11.0-1.el5.remi           remi
php-ZendFramework-Db-Adapter-Firebird.noarch
php-ZendFramework-Db-Adapter-Mysqli.noarch 1.11.0-1.el5.remi           remi
php-ZendFramework-Db-Adapter-Oracle.noarch 1.11.0-1.el5.remi           remi
php-ZendFramework-Dojo.noarch              1.11.0-1.el5.remi           remi
php-ZendFramework-Feed.noarch              1.11.0-1.el5.remi           remi
php-ZendFramework-Gdata.noarch             1.11.0-1.el5.remi           remi
php-ZendFramework-Ldap.noarch              1.11.0-1.el5.remi           remi
php-ZendFramework-Pdf.noarch               1.11.0-1.el5.remi           remi
php-ZendFramework-Search-Lucene.noarch     1.11.0-1.el5.remi           remi
php-ZendFramework-Services.noarch          1.11.0-1.el5.remi           remi
php-ZendFramework-Soap.noarch              1.11.0-1.el5.remi           remi
php-ZendFramework-demos.noarch             1.11.0-1.el5.remi           remi
php-ZendFramework-extras.noarch            1.11.0-1.el5.remi           remi
php-ZendFramework-tests.noarch             1.9.3-1.PL1.el5.remi        remi
php-adodb.noarch                           5.11-1.el5.remi             remi
php-bcmath.x86_64                          5.3.4-1.el5.remi            remi
php-captchaphp.noarch                      2.2-2.el5.remi              remi
php-channel-deepend.noarch                 1.3-2.el5.remi              remi
php-channel-doctrine.noarch                1.3-1.el5.remi              remi
php-channel-ezc.noarch                     1-1.el5.remi                remi
php-channel-htmlpurifier.noarch            1.0-2.el5                   epel
php-channel-pdepend.noarch                 1.3-4.el5.remi              remi
php-channel-phing.noarch                   1.0.0-6.el5.remi            remi
php-channel-phpdb.noarch                   1.0.0-5.el5.remi            remi
php-channel-phpmd.noarch                   1.3-3.el5.remi              remi
php-channel-phpunit.noarch                 1.3-2.el5.remi              remi
php-channel-swift.noarch                   1.3-2.el5.remi              remi
php-channel-symfony.noarch                 1.3-1.el5.remi              remi
php-cli.x86_64                             5.3.4-1.el5.remi            remi
php-common.x86_64                          5.3.4-1.el5.remi            remi
php-dba.x86_64                             5.3.4-1.el5.remi            remi
php-dbase.x86_64                           5.1.6-15.el5.centos.1       extras
php-deepend-Mockery.noarch                 0.6.3-2.el5.remi            remi
php-devel.x86_64                           5.3.4-1.el5.remi            remi
php-doctrine-Doctrine.noarch               1.2.3-1.el5.remi            remi
php-domxml-php4-php5.noarch                1.21.2-1.el5.remi           remi
php-eaccelerator.x86_64                    1:0.9.6.1-3.el5.remi        remi
php-email-address-validation.noarch        0-0.3.20090910svn.el5       epel
php-embedded.x86_64                        5.3.4-1.el5.remi            remi
php-enchant.x86_64                         5.3.4-1.el5.remi            remi
php-ezc-Archive.noarch                     1.4.1-2.el5.remi            remi
php-ezc-Authentication.noarch              1.3.1-1.el5.remi            remi
php-ezc-AuthenticationDatabaseTiein.noarch 1.1-1.el5.remi              remi
php-ezc-Base.noarch                        1.8-1.el5.remi              remi
php-ezc-Cache.noarch                       1.5-1.el5.remi              remi
php-ezc-Configuration.noarch               1.3.5-1.el5.remi            remi
php-ezc-ConsoleTools.noarch                1.6.1-1.el5.remi            remi
php-ezc-Database.noarch                    1.4.7-1.el5.remi            remi
php-ezc-DatabaseSchema.noarch              1.4.4-1.el5.remi            remi
php-ezc-EventLog.noarch                    1.4-1.el5.remi              remi
php-ezc-EventLogDatabaseTiein.noarch       1.0.2-1.el5.remi            remi
php-ezc-Feed.noarch                        1.3-1.el5.remi              remi
php-ezc-File.noarch                        1.2-2.el5.remi              remi
php-ezc-Graph.noarch                       1.5-1.el5.remi              remi
php-ezc-Mail.noarch                        1.7.1-1.el5.remi            remi
php-ezc-PersistentObject.noarch            1.7.1-1.el5.remi            remi
php-ezc-PersistentObjectDatabaseSchemaTiein.noarch
php-ezc-SystemInformation.noarch           1.0.8-1.el5.remi            remi
php-ezc-Template.noarch                    1.4.2-1.el5.remi            remi
php-ezc-Webdav.noarch                      1.1.4-1.el5.remi            remi
php-facedetect.x86_64                      1.0.0-2.el5                 epel
php-feedcreator.noarch                     1.7.2-3.el5                 epel
php-fpdf.noarch                            1.6-4.el5                   epel
php-fpdf-doc.noarch                        1.6-4.el5                   epel
php-fpm.x86_64                             5.3.4-1.el5.remi            remi
php-gd.x86_64                              5.3.4-1.el5.remi            remi
php-geshi.noarch                           1.0.8.8-1.el5.remi          remi
php-idn.x86_64                             1.2c-1.el5.remi             remi
php-igbinary.x86_64                        1.0.2-1                     remi
php-igbinary-devel.x86_64                  1.0.2-1                     remi
php-imap.x86_64                            5.3.4-1.el5.remi            remi
php-interbase.x86_64                       5.3.4-1.el5.remi            remi
php-intl.x86_64                            5.3.4-1.el5.remi            remi
php-layers-menu.noarch                     3.2.0-0.2.rc.el5            epel
php-ldap.x86_64                            5.3.4-1.el5.remi            remi
php-libdmtx.x86_64                         0.7.2-3.el5                 epel
php-libpuzzle.x86_64                       0.11-5.el5                  epel
php-magickwand.x86_64                      1.0.8-8.el5.remi            remi
php-magpierss.noarch                       0.72-3.el5                  epel
php-mapi.x86_64                            6.40.3-1.el5                epel
php-mapserver.x86_64                       4.10.5-1.el5                epel
php-markdown.noarch                        1.0.1n-1.el5.remi           remi
php-mbstring.x86_64                        5.3.4-1.el5.remi            remi
php-mcrypt.x86_64                          5.3.4-1.el5.remi            remi
php-mhash.x86_64                           5.2.10-1.el5.remi           remi
php-mssql.x86_64                           5.3.4-1.el5.remi            remi
php-mysql.x86_64                           5.3.4-1.el5.remi            remi
php-ncurses.x86_64                         5.2.10-1.el5.remi           remi
php-nusoap.noarch                          0.9.5-1.el5.remi            remi
php-oci8.x86_64                            5.3.4-1.el5.remi            remi
php-odbc.x86_64                            5.3.4-1.el5.remi            remi
php-pdepend-PHP-Depend.noarch              0.9.19-1.el5.remi           remi
php-pdo.x86_64                             5.3.4-1.el5.remi            remi
php-pear.noarch                            1:1.9.1-6.el5.remi          remi
php-pear-Auth.noarch                       1.6.2-1.el5.remi            remi
php-pear-Auth-RADIUS.noarch                1.0.7-1.el5.remi            remi
php-pear-Auth-SASL.noarch                  1.0.4-1.el5.remi            remi
php-pear-Auth-radius.noarch                1.6.2-1.el5.remi            remi
php-pear-Auth-samba.noarch                 1.6.2-1.el5.remi            remi
php-pear-Auth_HTTP.noarch                  2.1.6-3.el5.remi            remi
php-pear-Benchmark.noarch                  1.2.8-1.el5.remi            remi
php-pear-CAS.noarch                        1.1.3-1.el5.remi            remi
php-pear-Cache.noarch                      1.5.6-1.el5.remi            remi
php-pear-Cache-Lite.noarch                 1.7.8-1.el5.remi            remi
php-pear-CodeGen.noarch                    1.0.7-3.el5.remi            remi
php-pear-Config.noarch                     1.10.11-3.el5.remi          remi
php-pear-Console-Color.noarch              1.0.3-1.el5.remi            remi
php-pear-Console-CommandLine.noarch        1.1.3-3.el5.remi            remi
php-pear-Console-Getargs.noarch            1.3.5-1.el5.remi            remi
php-pear-Console-ProgressBar.noarch        0.5.2-0.2.beta.el5          epel
php-pear-Console-Table.noarch              1.1.4-1.el5.remi            remi
php-pear-Crypt-Blowfish.noarch             1.1.0-0.3.rc2.el5.remi      remi
php-pear-Crypt-CHAP.noarch                 1.5.0-1.el5.remi            remi
php-pear-DB.noarch                         1.7.13-1.el5.centos         extras
php-pear-DB-DataObject.noarch              1.9.5-1.el5.remi            remi
php-pear-DB-DataObject-FormBuilder.noarch  1.0.0-1.el5.remi            remi
php-pear-DB-QueryTool.noarch               1.1.2-1.el5                 epel
php-pear-Date.noarch                       1.4.7-2.el5.centos          extras
php-pear-Date-Holidays.noarch              0.21.4-1.el5.remi.1         remi
php-pear-Date-Holidays-USA.noarch          0.1.1-1.el5                 epel
php-pear-Event-Dispatcher.noarch           1.1.0-1.el5.remi            remi
php-pear-File.noarch                       1.3.0-2.el5.remi            remi
php-pear-File-Bittorrent2.noarch           1.3.1-4.el5.remi            remi
php-pear-File-Find.noarch                  1.3.1-1.el5.remi            remi
php-pear-File-Passwd.noarch                1.1.7-1.el5.remi            remi
php-pear-File-SMBPasswd.noarch             1.0.3-1.el5.remi            remi
php-pear-HTML-Common.noarch                1.2.5-1.el5                 epel
php-pear-HTML-QuickForm.noarch             3.2.12-1.el5.remi           remi
php-pear-HTML-QuickForm-ElementGrid.noarch 0.1.1-1.el5                 epel
php-pear-HTML-QuickForm-advmultiselect.noarch
php-pear-HTML-Table.noarch                 1.8.3-1.el5.remi            remi
php-pear-HTML-Template-IT.noarch           1.3.0-2.el5.remi            remi
php-pear-HTML_Javascript.noarch            1.1.1-4.el5.remi            remi
php-pear-HTML_Template_PHPLIB.noarch       1.4.0-2.el5                 epel
php-pear-HTTP.noarch                       1.4.1-3.el5.remi            remi
php-pear-HTTP-Client.noarch                1.2.1-2.el5.remi            remi
php-pear-HTTP-OAuth.noarch                 0.2.2-1.el5.remi            remi
php-pear-HTTP-Request.noarch               1.4.4-1.el5.remi            remi
php-pear-HTTP-Request2.noarch              0.5.2-1.el5.remi            remi
php-pear-HTTP-Upload.noarch                0.9.1-2.el5                 epel
php-pear-Image-Canvas.noarch               0.3.3-1.el5.remi            remi
php-pear-Image-Color.noarch                1.0.4-1.el5.remi            remi
php-pear-Image-Graph.noarch                0.8.0-1.el5.remi            remi
php-pear-Image-GraphViz.noarch             1.3.0-1.el5.remi            remi
php-pear-Log.noarch                        1.12.5-1.el5.remi           remi
php-pear-MDB2.noarch                       2.5.0-0.1.b3.el5.remi       remi
php-pear-MDB2-Driver-mysql.noarch          1.5.0-0.1.b3.el5.remi       remi
php-pear-MDB2-Driver-mysqli.noarch         1.5.0-0.1.b3.el5.remi       remi
php-pear-MDB2-Driver-pgsql.noarch          1.5.0-0.1.b3.el5.remi       remi
php-pear-Mail.noarch                       1.2.0-1.el5.remi            remi
php-pear-Mail-Mime.noarch                  1.8.1-1.el5.remi            remi
php-pear-Mail-mimeDecode.noarch            1.5.5-1.el5.remi            remi
php-pear-Math-Stats.noarch                 0.9.1-1.el5.remi            remi
php-pear-Net-Curl.noarch                   1.2.5-1.el5                 epel
php-pear-Net-DIME.noarch                   1.0.2-1.el5.remi            remi
php-pear-Net-DNS.noarch                    1.0.5-1.el5.remi            remi
php-pear-Net-FTP.noarch                    1.3.7-2.el5.remi            remi
php-pear-Net-IPv4.noarch                   1.3.0-3.el5.remi            remi
php-pear-Net-POP3.noarch                   1.3.8-1.el5.remi            remi
php-pear-Net-Ping.noarch                   2.4.5-1.el5.remi            remi
php-pear-Net-SMTP.noarch                   1.4.4-1.el5.remi            remi
php-pear-Net-Sieve.noarch                  1.3.0-1.el5.remi            remi
php-pear-Net-Socket.noarch                 1.0.10-1.el5.remi           remi
php-pear-Net-Traceroute.noarch             0.21.3-1.el5.remi           remi
php-pear-Net-URL.noarch                    1.0.15-1.el5.centos         extras
php-pear-Net-URL-Mapper.noarch             0.9.1-1.el5.remi            remi
php-pear-Net-URL2.noarch                   0.3.1-1.el5.remi            remi
php-pear-Net-UserAgent-Detect.noarch       2.5.2-1.el5.remi            remi
php-pear-Numbers-Roman.noarch              1.0.2-2.el5                 epel
php-pear-Numbers-Words.noarch              0.16.2-1.el5.remi           remi
php-pear-OLE.noarch                        1.0.0-0.4.rc1.el5.remi      remi
php-pear-PEAR-Command-Packaging.noarch     0.2.0-4.el5.remi            remi
php-pear-PHP-CodeSniffer.noarch            1.3.0-2.RC1.el5.remi        remi
php-pear-PHP-Compat.noarch                 1.5.0-1.el5                 epel
php-pear-PHP-CompatInfo.noarch             1.9.0-2.el5.remi            remi
php-pear-PHPUnit.noarch                    3.3.5-2.el5                 epel
php-pear-Pager.noarch                      2.4.8-1.el5.remi            remi
php-pear-Payment-Process.noarch            0.6.6-1.el5                 epel
php-pear-Phlickr.noarch                    0.2.7-2.el5                 epel
php-pear-PhpDocumentor.noarch              1.4.3-1.el5.remi            remi
php-pear-PhpDocumentor-docs.noarch         1.4.3-1.el5.remi            remi
php-pear-SOAP.noarch                       0.12.0-2.el5.remi           remi
php-pear-Services-Twitter.noarch           0.6.3-1.el5.remi            remi
php-pear-Services-Weather.noarch           1.4.5-1.el5.remi            remi
php-pear-Spreadsheet-Excel-Writer.noarch   0.9.2-2.el5.remi            remi
php-pear-Structures-DataGrid.noarch        0.9.0-4.el5.remi            remi
php-pear-Structures-DataGrid-DataSource-Array.noarch
php-pear-Structures-DataGrid-DataSource-DataObject.noarch
php-pear-Structures-DataGrid-DataSource-MDB2.noarch
php-pear-Structures-DataGrid-DataSource-RSS.noarch
php-pear-Structures-DataGrid-Renderer-Pager.noarch
php-pear-Structures-DataGrid-Renderer-Smarty.noarch
php-pear-Text-Diff.noarch                  1.1.1-1.el5.remi            remi
php-pear-Validate.noarch                   0.8.4-2.el5.remi            remi
php-pear-Validate-Finance-CreditCard.noarch
php-pear-Var-Dump.noarch                   1.0.4-1.el5.remi            remi
php-pear-XML-Beautifier.noarch             1.2.2-1.el5.remi            remi
php-pear-XML-Parser.noarch                 1.3.4-1.el5.remi            remi
php-pear-XML-RSS.noarch                    1.0.1-1.el5.remi            remi
php-pear-XML-Serializer.noarch             0.20.2-1.el5.remi           remi
php-pear-XML-Util.noarch                   1.1.4-3.el5                 epel
php-pear-creole.noarch                     1.1.0-6.el5.remi            remi
php-pear-pake.noarch                       1.1.4-4.el5.remi            remi
php-pear-phing.noarch                      2.4.4-1.el5.remi            remi
php-pear-propel_generator.noarch           1.3.0-2.el5.remi            remi
php-pear-propel_runtime.noarch             1.3.0-2.el5.remi            remi
php-pecl-Fileinfo.x86_64                   1.0.4-3.el5.remi            remi
php-pecl-apc.x86_64                        3.1.6-1.el5.remi            remi
php-pecl-geoip.x86_64                      1.0.7-3.el5.remi            remi
php-pecl-gmagick.x86_64                    1.0.8-0.2.b1.el5.remi       remi
php-pecl-imagick.x86_64                    3.0.1-1.el5.remi.1          remi
php-pecl-json.x86_64                       1.2.1-4.el5                 epel
php-pecl-lzf.x86_64                        1.5.2-4.el5.remi            remi
php-pecl-mailparse.x86_64                  2.1.5-2.el5.remi.1          remi
php-pecl-memcache.x86_64                   3.0.5-1.el5.remi            remi
php-pecl-memcached.x86_64                  1.0.2-3.el5.remi.1          remi
php-pecl-mongo.x86_64                      1.0.10-4.el5.remi           remi
php-pecl-ncurses.x86_64                    1.0.1-1.el5.remi            remi
php-pecl-pdflib.x86_64                     2.1.8-1.el5.remi            remi
php-pecl-phar.x86_64                       1.2.2-1.el5.remi            remi
php-pecl-radius.x86_64                     1.2.5-6.el5.remi            remi
php-pecl-runkit.x86_64                     0.9-12.CVS20090215.el5      epel
php-pecl-solr.x86_64                       0.9.11-1.el5.remi           remi
php-pecl-sphinx.x86_64                     1.0.4-1.el5.remi            remi
php-pecl-ssh2.x86_64                       0.11.0-3.el5.remi.1         remi
php-pecl-xdebug.x86_64                     2.1.0-1.el5.remi            remi
php-pecl-zip.x86_64                        1.8.10-2.el5                epel
php-pgsql.x86_64                           5.3.4-1.el5.remi            remi
php-phpSmug.noarch                         2.1-1.el5.remi              remi
php-phpmd-PHP-PMD.noarch                   0.2.7-1.el5.remi            remi
php-phpunit-DbUnit.noarch                  1.0.0-1.el5.remi            remi
php-phpunit-File-Iterator.noarch           1.2.3-1.el5.remi            remi
php-phpunit-PHP-CodeBrowser.noarch         1.0.0-1.el5.remi            remi
php-phpunit-PHP-CodeCoverage.noarch        1.0.3-1.el5.remi            remi
php-phpunit-PHP-Timer.noarch               1.0.0-1.el5.remi            remi
php-phpunit-PHP-TokenStream.noarch         1.0.1-1.el5.remi            remi
php-phpunit-PHPUnit.noarch                 3.5.6-1.el5.remi            remi
php-phpunit-PHPUnit-MockObject.noarch      1.0.3-1.el5.remi            remi
php-phpunit-PHPUnit-Selenium.noarch        1.0.1-1.el5.remi            remi
php-phpunit-Text-Template.noarch           1.1.0-1.el5.remi            remi
php-phpunit-bytekit.noarch                 1.1.1-1.el5.remi            remi
php-phpunit-phpcpd.noarch                  1.3.2-1.el5.remi            remi
php-phpunit-phpdcd.noarch                  0.9.2-1.el5.remi            remi
php-phpunit-phploc.noarch                  1.5.1-1.el5.remi            remi
php-process.x86_64                         5.3.4-1.el5.remi            remi
php-pspell.x86_64                          5.3.4-1.el5.remi            remi
php-readline.x86_64                        5.1.6-15.el5.centos.1       extras
php-recode.x86_64                          5.3.4-1.el5.remi            remi
php-simplepie.noarch                       1.1.3-3.el5                 epel
php-snmp.x86_64                            5.3.4-1.el5.remi            remi
php-soap.x86_64                            5.3.4-1.el5.remi            remi
php-spyc.noarch                            0.2.5-1.el5                 epel
php-sqlite.x86_64                          5.3.4-1.el5.remi            remi
php-suhosin.x86_64                         0.9.32.1-1.el5.remi         remi
php-swift-Swift.noarch                     4.0.6-1.el5.remi            remi
php-symfony-YAML.noarch                    1.0.4-1.el5.remi            remi
php-tidy.x86_64                            5.3.4-1.el5.remi            remi
php-xml.x86_64                             5.3.4-1.el5.remi            remi
php-xmlrpc.x86_64                          5.3.4-1.el5.remi            remi
php-xmpphp.noarch                          0.1-0.7.rc2_r77.el5.remi    remi
php-zts.x86_64                             5.3.4-1.el5.remi            remi
phpFlickr.noarch                           2.3.0.1-1.el5               epel
phpMyAdmin.noarch                          3.3.9-1.el5.remi            remi
phpPgAdmin.noarch                          4.2.3-1.el5                 epel
phpdoc.noarch                              1.4.3-1.el5.remi            remi
phpldapadmin.noarch                        1.0.1-1.el5                 epel
rrdtool-php.x86_64                         1.2.27-4.el5.remi           remi
syck-php.x86_64                            0.55-10.el5                 epel
uuid-php.x86_64                            1.5.1-3.el5                 epel

いっぱいあります。PHPは5.3.4-1.el5.remiが入っています。



続いて、以下のようにインストールしていきます。

# yum --enablerepo=remi,epel install php php-pear php-mbstring
Loaded plugins: downloadonly
Setting up Install Process
Resolving Dependencies
--> Running transaction check
---> Package php.x86_64 0:5.3.4-1.el5.remi set to be updated
--> Processing Dependency: httpd-mmn = 20051115 for package: php
--> Processing Dependency: php-cli = 5.3.4-1.el5.remi for package: php
--> Processing Dependency: php-common = 5.3.4-1.el5.remi for package: php
--> Processing Dependency: httpd for package: php
---> Package php-mbstring.x86_64 0:5.3.4-1.el5.remi set to be updated
---> Package php-pear.noarch 1:1.9.1-6.el5.remi set to be updated
--> Running transaction check
---> Package httpd.x86_64 0:2.2.3-43.el5.centos.3 set to be updated
addons/filelists                                                |  197 B     00:00
base/filelists_db                                               | 4.0 MB     00:00
epel/filelists_db                                               | 4.8 MB     00:01
extras/filelists_db                                             | 228 kB     00:00
updates/filelists_db                                            | 3.7 MB     00:00
---> Package php-cli.x86_64 0:5.3.4-1.el5.remi set to be updated
--> Processing Dependency: libedit.so.0()(64bit) for package: php-cli
---> Package php-common.x86_64 0:5.3.4-1.el5.remi set to be updated
--> Running transaction check
---> Package libedit.x86_64 0:2.11-2.20080712cvs.el5 set to be updated
--> Finished Dependency Resolution

Dependencies Resolved

=======================================================================================
 Package             Arch          Version                        Repository      Size
=======================================================================================
Installing:
 php                 x86_64        5.3.4-1.el5.remi               remi           1.4 M
 php-mbstring        x86_64        5.3.4-1.el5.remi               remi           2.3 M
 php-pear            noarch        1:1.9.1-6.el5.remi             remi           433 k
Installing for dependencies:
 httpd               x86_64        2.2.3-43.el5.centos.3          updates        1.2 M
 libedit             x86_64        2.11-2.20080712cvs.el5         epel            80 k
 php-cli             x86_64        5.3.4-1.el5.remi               remi           2.6 M
 php-common          x86_64        5.3.4-1.el5.remi               remi           968 k

Transaction Summary
=======================================================================================
Install       7 Package(s)
Upgrade       0 Package(s)

Total download size: 8.9 M
Is this ok [y/N]: y
Downloading Packages:
(1/7): libedit-2.11-2.20080712cvs.el5.x86_64.rpm                |  80 kB     00:00
(2/7): php-pear-1.9.1-6.el5.remi.noarch.rpm                     | 433 kB     00:02
(3/7): php-common-5.3.4-1.el5.remi.x86_64.rpm                   | 968 kB     00:02
(4/7): httpd-2.2.3-43.el5.centos.3.x86_64.rpm                   | 1.2 MB     00:00
(5/7): php-5.3.4-1.el5.remi.x86_64.rpm                          | 1.4 MB     00:03
(6/7): php-mbstring-5.3.4-1.el5.remi.x86_64.rpm                 | 2.3 MB     00:04
(7/7): php-cli-5.3.4-1.el5.remi.x86_64.rpm                      | 2.6 MB     00:04
---------------------------------------------------------------------------------------
Total                                                  430 kB/s | 8.9 MB     00:21
Running rpm_check_debug
Running Transaction Test
Finished Transaction Test
Transaction Test Succeeded
Running Transaction

WARNING : This php-* RPM are not official Fedora/Redhat build and
overrides the official ones. Don't file bugs on Fedora Project nor Redhat.

Use dedicated forums http://forums.famillecollet.com/

  Installing     : php-common                                                      1/7
  Installing     : httpd                                                           2/7
  Installing     : libedit                                                         3/7
  Installing     : php-cli                                                         4/7
  Installing     : php-pear                                                        5/7
  Installing     : php                                                             6/7
  Installing     : php-mbstring                                                    7/7

Installed:
  php.x86_64 0:5.3.4-1.el5.remi            php-mbstring.x86_64 0:5.3.4-1.el5.remi
  php-pear.noarch 1:1.9.1-6.el5.remi

Dependency Installed:
  httpd.x86_64 0:2.2.3-43.el5.centos.3     libedit.x86_64 0:2.11-2.20080712cvs.el5
  php-cli.x86_64 0:5.3.4-1.el5.remi        php-common.x86_64 0:5.3.4-1.el5.remi

Complete!

完成です。