稲沢市よりお届けしてます。

Perlをはじめとしたプログラミング周りのあれこれについて。Perl、最近書いてないなぁ。

CentOS 5.5のPHPをバージョン5.3.5 にアップグレードしてみた件。

CentOS 5.5のPHPをバージョン5.3.5 にアップグレードしてみたお。


探せばいるもので、CentOS 5.5のPHPをバージョン5.3.5 にアップグレードしてみました。

基本的には(というか1から10まで)Natzさんのブログの手順通りにやりました。
Natzさん、スペシャルサンクス!!

入力コマンド(1)

# rpm -qa | grep php | sort

出力結果(1)

php-5.2.16-jason.1
php-cli-5.2.16-jason.1
php-common-5.2.16-jason.1
php-ldap-5.2.16-jason.1

入力コマンド(2)

# rpm -qa | grep mysql | sort

出力結果(2)

mysql-5.0.77-4.el5_5.4

入力コマンド(3)

# rpm -ivh http://download.fedora.redhat.com/pub/epel/5/i386/epel-release-5-4.noarch.rpm

出力結果(3)

http://download.fedora.redhat.com/pub/epel/5/i386/epel-release-5-4.noarch.rpm を取得中
警告: /var/tmp/rpm-xfer.NA0dVL: ヘッダ V3 DSA signature: NOKEY, key ID 217521f6
準備中...                ########################################### [100%]
   1:epel-release           ########################################### [100%]

入力コマンド(4)

# rpm -ivh http://rpms.famillecollet.com/enterprise/remi-release-5.rpm

出力結果(4)

http://rpms.famillecollet.com/enterprise/remi-release-5.rpm を取得中
警告: /var/tmp/rpm-xfer.Hi6rXD: ヘッダ V4 DSA signature: NOKEY, key ID 00f97f56
準備中...                ########################################### [100%]
   1:remi-release           ########################################### [100%]

入力コマンド(5)

# yum info php --enablerepo=remi

出力結果(5)

Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
 * addons: rsync.atworks.co.jp
 * base: rsync.atworks.co.jp
 * epel: ftp.riken.jp
 * extras: rsync.atworks.co.jp
 * remi: iut-info.univ-reims.fr
 * updates: rsync.atworks.co.jp
epel                                                     | 3.7 kB     00:00     
epel/primary_db                                          | 3.0 MB     00:01     
remi                                                     | 2.6 kB     00:00     
remi/primary_db                                          | 253 kB     00:02     
Installed Packages
Name       : php
Arch       : i386
Version    : 5.2.16
Release    : jason.1
Size       : 9.4 M
Repo       : installed
Summary    : PHP HTML 埋め込みのスクリプト言語 (PHP: Hypertext Preprocessor)
URL        : http://www.php.net/
License    : PHP
Description: PHP is an HTML-embedded scripting language. PHP attempts to make it
           : easy for developers to write dynamically generated webpages. PHP
           : also offers built-in database integration for several commercial
           : and non-commercial database management systems, so writing a
           : database-enabled webpage with PHP is fairly simple. The most common
           : use of PHP coding is probably as a replacement for CGI scripts.
           : 
           : The php package contains the module which adds support for the PHP
           : language to Apache HTTP Server.

Available Packages
Name       : php
Arch       : i386
Version    : 5.3.5
Release    : 1.el5.remi.1
Size       : 1.3 M
Repo       : remi
Summary    : PHP scripting language for creating dynamic web sites
URL        : http://www.php.net/
License    : PHP
Description: PHP is an HTML-embedded scripting language. PHP attempts to make it
           : easy for developers to write dynamically generated web pages. PHP
           : also offers built-in database integration for several commercial
           : and non-commercial database management systems, so writing a
           : database-enabled webpage with PHP is fairly simple. The most common
           : use of PHP coding is probably as a replacement for CGI scripts.
           : 
           : The php package contains the module which adds support for the PHP
           : language to Apache HTTP Server.

入力コマンド(6)

# yum remove php php-* mysql

出力結果(6)

Loaded plugins: fastestmirror
Setting up Remove Process
Resolving Dependencies
--> Running transaction check
---> Package mysql.i386 0:5.0.77-4.el5_5.4 set to be erased
--> Processing Dependency: libmysqlclient.so.15 for package: dovecot
--> Processing Dependency: libmysqlclient.so.15(libmysqlclient_15) for package: dovecot
---> Package php.i386 0:5.2.16-jason.1 set to be erased
---> Package php-cli.i386 0:5.2.16-jason.1 set to be erased
---> Package php-common.i386 0:5.2.16-jason.1 set to be erased
---> Package php-ldap.i386 0:5.2.16-jason.1 set to be erased
--> Running transaction check
---> Package dovecot.i386 0:1.0.7-7.el5 set to be erased
--> Finished Dependency Resolution

Dependencies Resolved

================================================================================
 Package           Arch        Version                   Repository        Size
================================================================================
Removing:
 mysql             i386        5.0.77-4.el5_5.4          installed        7.9 M
 php               i386        5.2.16-jason.1            installed        9.4 M
 php-cli           i386        5.2.16-jason.1            installed        6.7 M
 php-common        i386        5.2.16-jason.1            installed        1.5 M
 php-ldap          i386        5.2.16-jason.1            installed        105 k
Removing for dependencies:
 dovecot           i386        1.0.7-7.el5               installed        3.6 M

Transaction Summary
================================================================================
Remove        6 Package(s)
Reinstall     0 Package(s)
Downgrade     0 Package(s)

Is this ok [y/N]: 

入力コマンド(7)

Is this ok [y/N]: y

出力結果(7)

Downloading Packages:
Running rpm_check_debug
Running Transaction Test
Finished Transaction Test
Transaction Test Succeeded
Running Transaction
  Erasing        : dovecot                                                  1/6 
警告: /etc/dovecot.conf は /etc/dovecot.conf.rpmsave として保存されました。
  Erasing        : php                                                      2/6 
  Erasing        : php-ldap                                                 3/6 
  Erasing        : php-common                                               4/6 
  Erasing        : mysql                                                    5/6 
  Erasing        : php-cli                                                  6/6 

Removed:
  mysql.i386 0:5.0.77-4.el5_5.4         php.i386 0:5.2.16-jason.1              
  php-cli.i386 0:5.2.16-jason.1         php-common.i386 0:5.2.16-jason.1       
  php-ldap.i386 0:5.2.16-jason.1       

Dependency Removed:
  dovecot.i386 0:1.0.7-7.el5                                                    

Complete!

入力コマンド(8)

# yum install php php-ldap php-cli php-common dovecot mysql --enablerepo=remi

出力結果(8)

Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
 * addons: rsync.atworks.co.jp
 * base: rsync.atworks.co.jp
 * epel: ftp.riken.jp
 * extras: rsync.atworks.co.jp
 * remi: rpms.famillecollet.com
 * updates: rsync.atworks.co.jp
Setting up Install Process
Resolving Dependencies
--> Running transaction check
---> Package dovecot.i386 0:1.0.7-7.el5 set to be updated
--> Processing Dependency: libmysqlclient.so.15 for package: dovecot
--> Processing Dependency: libmysqlclient.so.15(libmysqlclient_15) for package: dovecot
---> Package mysql.i386 0:5.1.55-1.el5.remi set to be updated
--> Processing Dependency: mysql-libs = 5.1.55-1.el5.remi for package: mysql
--> Processing Dependency: libmysqlclient.so.16(libmysqlclient_16) for package: mysql
--> Processing Dependency: libmysqlclient_r.so.16(libmysqlclient_16) for package: mysql
--> Processing Dependency: libmysqlclient_r.so.16 for package: mysql
--> Processing Dependency: libmysqlclient.so.16 for package: mysql
---> Package php.i386 0:5.3.5-1.el5.remi.1 set to be updated
---> Package php-cli.i386 0:5.3.5-1.el5.remi.1 set to be updated
--> Processing Dependency: libedit.so.0 for package: php-cli
---> Package php-common.i386 0:5.3.5-1.el5.remi.1 set to be updated
---> Package php-ldap.i386 0:5.3.5-1.el5.remi.1 set to be updated
--> Running transaction check
---> Package libedit.i386 0:2.11-2.20080712cvs.el5 set to be updated
---> Package mysql-libs.i386 0:5.1.55-1.el5.remi set to be updated
---> Package mysqlclient15.i386 0:5.0.67-1.el5.remi set to be updated
--> Finished Dependency Resolution

Dependencies Resolved

================================================================================
 Package             Arch       Version                        Repository  Size
================================================================================
Installing:
 dovecot             i386       1.0.7-7.el5                    base       1.6 M
 mysql               i386       5.1.55-1.el5.remi              remi       1.1 M
 php                 i386       5.3.5-1.el5.remi.1             remi       1.3 M
 php-cli             i386       5.3.5-1.el5.remi.1             remi       2.6 M
 php-common          i386       5.3.5-1.el5.remi.1             remi       966 k
 php-ldap            i386       5.3.5-1.el5.remi.1             remi        52 k
Installing for dependencies:
 libedit             i386       2.11-2.20080712cvs.el5         epel        79 k
 mysql-libs          i386       5.1.55-1.el5.remi              remi       1.7 M
 mysqlclient15       i386       5.0.67-1.el5.remi              remi       1.3 M

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

Total download size: 11 M
Is this ok [y/N]: y
Downloading Packages:
(1/9): php-ldap-5.3.5-1.el5.remi.1.i386.rpm              |  52 kB     00:01     
(2/9): libedit-2.11-2.20080712cvs.el5.i386.rpm           |  79 kB     00:00     
(3/9): php-common-5.3.5-1.el5.remi.1.i386.rpm            | 966 kB     00:02     
(4/9): mysql-5.1.55-1.el5.remi.i386.rpm                  | 1.1 MB     00:03     
(5/9): mysqlclient15-5.0.67-1.el5.remi.i386.rpm          | 1.3 MB     00:04     
(6/9): php-5.3.5-1.el5.remi.1.i386.rpm                   | 1.3 MB     00:04     
(7/9): dovecot-1.0.7-7.el5.i386.rpm                      | 1.6 MB     00:00     
(8/9): mysql-libs-5.1.55-1.el5.remi.i386.rpm             | 1.7 MB     00:04     
(9/9): php-cli-5.3.5-1.el5.remi.1.i386.rpm               | 2.6 MB     00:04     
--------------------------------------------------------------------------------
Total                                           351 kB/s |  11 MB     00:31     
警告: rpmts_HdrFromFdno: ヘッダ V4 DSA signature: NOKEY, key ID 00f97f56
remi/gpgkey                                              | 1.3 kB     00:00     
Importing GPG key 0x00F97F56 "Remi Collet <RPMS@FamilleCollet.com>" from /etc/pki/rpm-gpg/RPM-GPG-KEY-remi
Is this ok [y/N]: y
warning: rpmts_HdrFromFdno: Header V3 DSA signature: NOKEY, key ID 217521f6
epel/gpgkey                                              | 1.7 kB     00:00     
Importing GPG key 0x217521F6 "Fedora EPEL <epel@fedoraproject.org>" from /etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL
Is this ok [y/N]: y
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/9 

WARNING : This MySQL RPM is not an official Fedora/Redhat build and it
overrides the official one. Don't file bugs on Fedora Project nor Redhat.
Use dedicated forums http://forums.famillecollet.com/

  Installing     : mysql-libs                                               2/9 
  Installing     : libedit                                                  3/9 
  Installing     : php-cli                                                  4/9 
  Installing     : mysqlclient15                                            5/9 
  Installing     : dovecot                                                  6/9 
  Installing     : mysql                                                    7/9 
  Installing     : php                                                      8/9 
  Installing     : php-ldap                                                 9/9 

Installed:
  dovecot.i386 0:1.0.7-7.el5              mysql.i386 0:5.1.55-1.el5.remi       
  php.i386 0:5.3.5-1.el5.remi.1           php-cli.i386 0:5.3.5-1.el5.remi.1    
  php-common.i386 0:5.3.5-1.el5.remi.1    php-ldap.i386 0:5.3.5-1.el5.remi.1   

Dependency Installed:
  libedit.i386 0:2.11-2.20080712cvs.el5    mysql-libs.i386 0:5.1.55-1.el5.remi  
  mysqlclient15.i386 0:5.0.67-1.el5.remi  

Complete!

入力コマンド(9)

# php -v

出力結果(9)

PHP 5.3.5 (cli) (built: Jan 22 2011 10:11:01) 
Copyright (c) 1997-2010 The PHP Group
Zend Engine v2.3.0, Copyright (c) 1998-2010 Zend Technologies

よっしゃー!!PHP5.3.5 ゲッツ!!