2009年12月2日水曜日

CentOS 5.4 上の MySQL と php をアップデート

 CentOS 5.4 上で php の 5.3 系を利用する必要があったので、アップデートを試みた。

1. yum にプロキシ設定
 /etc/yum.conf に proxy, proxy_username, proxy_password を追記した。

2. レポジトリ情報を追加
# wget http://download.fedora.redhat.com/pub/epel/5/i386/epel-release-5-3.noarch.rpm
# wget http://dag.wieers.com/rpm/packages/rpmforge-release/rpmforge-release-0.3.6-1.el5.rf.i386.rpm
# wget http://rpms.famillecollet.com/el5.i386/remi-release-5-6.el5.remi.noarch.rpm
# rpm -Uvh remi-release-5*.rpm epel-release-5*.rpm

3. php パッケージの確認
# yum --enablerepo remi list php*
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
* epel: ftp.iij.ad.jp
* remi: iut-info.univ-reims.fr
* rpmforge: apt.sw.be
Installed Packages
php.i386 5.1.6-23.2.el5_3 installed
php-cli.i386 5.1.6-23.2.el5_3 installed
php-common.i386 5.1.6-23.2.el5_3 installed
php-mbstring.i386 5.1.6-23.2.el5_3 installed
php-mysql.i386 5.1.6-23.2.el5_3 installed
php-pdo.i386 5.1.6-23.2.el5_3 installed
Available Packages
php.i386 5.3.1-1.el5.remi remi
php-IDNA_Convert.noarch 0.6.3-2.el5 epel
...

 php 5.3.1 発見!

4. php パッケージの更新
# yum update php -y
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
* epel: ftp.iij.ad.jp
* remi: iut-info.univ-reims.fr
* rpmforge: apt.sw.be
Setting up Update Process
Resolving Dependencies
--> Running transaction check
...
Dependencies Resolved

================================================================================
Package Arch Version Repository Size
================================================================================
Updating:
php i386 5.3.1-1.el5.remi remi 1.3 M
Installing for dependencies:
libedit i386 2.11-2.20080712cvs.el5 epel 79 k
mysql-libs i386 5.1.41-1.el5.remi remi 2.1 M
sqlite2 i386 2.8.17-2.el5.remi remi 170 k
Updating for dependencies:
php-cli i386 5.3.1-1.el5.remi remi 2.5 M
php-common i386 5.3.1-1.el5.remi remi 945 k
php-mbstring i386 5.3.1-1.el5.remi remi 2.1 M
php-mysql i386 5.3.1-1.el5.remi remi 140 k
php-pdo i386 5.3.1-1.el5.remi remi 162 k

Transaction Summary
================================================================================
Install 3 Package(s)
Update 6 Package(s)
Remove 0 Package(s)

Total download size: 9.5 M
Downloading Packages:
(1/9): libedit-2.11-2.20080712cvs.el5.i386.rpm 79 kB 00:00
(2/9): php-mysql-5.3.1-1.el5.remi.i386.rpm 140 kB 00:00
(3/9): php-pdo-5.3.1-1.el5.remi.i386.rpm 162 kB 00:01
(4/9): sqlite2-2.8.17-2.el5.remi.i386.rpm 170 kB 00:02
(5/9): php-common-5.3.1-1.el5.remi.i386.rpm 945 kB 00:05
(6/9): php-5.3.1-1.el5.remi.i386.rpm 1.3 MB 00:02
(7/9): php-mbstring-5.3.1-1.el5.remi.i386.rpm 2.1 MB 00:00
(8/9): mysql-libs-5.1.41-1.el5.remi.i386.rpm 2.1 MB 00:03
(9/9): php-cli-5.3.1-1.el5.remi.i386.rpm 2.5 MB 00:04
--------------------------------------------------------------------------------
Total 243 kB/s 9.5 MB 00:39

Running rpm_check_debug
Running Transaction Test
Finished Transaction Test


Transaction Check Error:
file /etc/my.cnf from install of mysql-libs-5.1.41-1.el5.remi.i386 conflicts with file from package mysql-5.0.77-3.el5.i386
...
Error Summary
-------------

 MySQL もアップデートしなくてはいけないようだと分かった。

5. MySQL パッケージの確認
# yum --enablerepo remi list mysql*
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
* epel: ftp.iij.ad.jp
* remi: iut-info.univ-reims.fr
* rpmforge: apt.sw.be
Installed Packages
mysql.i386 5.0.77-3.el5 installed
mysql-devel.i386 5.0.77-3.el5 installed
mysql-server.i386 5.0.77-3.el5 installed
mysql-test.i386 5.0.77-3.el5 installed
Available Packages
MySQL-zrm.noarch 2.1.1-5.el5 epel
mysql.i386 5.1.41-1.el5.remi remi
mysql++.i386 3.0.9-1.el5.remi remi
mysql++-devel.i386 3.0.9-1.el5.remi remi
mysql++-manuals.i386 3.0.9-1.el5.remi remi
mysql-bench.i386 5.1.41-1.el5.remi remi
mysql-cluster.i386 5.1.41-1.el5.remi remi
mysql-devel.i386 5.1.41-1.el5.remi remi
mysql-embedded.i386 5.1.41-1.el5.remi remi
mysql-embedded-devel.i386 5.1.41-1.el5.remi remi
mysql-libs.i386 5.1.41-1.el5.remi remi
mysql-manual.i386 5.1.38-1.el5.remi remi
mysql-proxy.i386 0.5.1-1.el5 epel
mysql-server.i386 5.1.41-1.el5.remi remi
mysql-test.i386 5.1.41-1.el5.remi remi
mysqlclient15.i386 5.0.67-1.el5.remi remi
mysqlclient15-devel.i386 5.0.67-1.el5.remi remi
mysqlclient16.i386 5.1.30-1.el5.remi remi-test
mysqlclient16-devel.i386 5.1.30-1.el5.remi remi-test
mysqlreport.noarch 3.5-2.el5 epel
mysqltuner.noarch 0.9.8-2.el5 epel

 MySQL 5.1.41 を発見!

6. MySQL パッケージの更新
# yum update mysql -y
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
* epel: ftp.iij.ad.jp
* remi: iut-info.univ-reims.fr
* rpmforge: apt.sw.be
Setting up Update Process
Resolving Dependencies
--> Running transaction check
...
Dependencies Resolved

================================================================================
Package Arch Version Repository Size
================================================================================
Installing:
perl-DBD-mysql i386 4.012-1.el5.rf rpmforge 224 k
replacing perl-DBD-MySQL.i386 3.0007-2.el5

Updating:
mysql i386 5.1.41-1.el5.remi remi 3.9 M
Installing for dependencies:
libedit i386 2.11-2.20080712cvs.el5 epel 79 k
mysql-libs i386 5.1.41-1.el5.remi remi 2.1 M
mysqlclient15 i386 5.0.67-1.el5.remi remi 1.3 M
sqlite2 i386 2.8.17-2.el5.remi remi 170 k
Updating for dependencies:
mysql-devel i386 5.1.41-1.el5.remi remi 3.2 M
mysql-server i386 5.1.41-1.el5.remi remi 11 M
mysql-test i386 5.1.41-1.el5.remi remi 5.9 M
php i386 5.3.1-1.el5.remi remi 1.3 M
php-cli i386 5.3.1-1.el5.remi remi 2.5 M
php-common i386 5.3.1-1.el5.remi remi 945 k
php-mbstring i386 5.3.1-1.el5.remi remi 2.1 M
php-mysql i386 5.3.1-1.el5.remi remi 140 k
php-pdo i386 5.3.1-1.el5.remi remi 162 k

Transaction Summary
================================================================================
Install 5 Package(s)
Update 10 Package(s)
Remove 0 Package(s)

Total size: 35 M
Total download size: 26 M
Downloading Packages:
(1/6): perl-DBD-mysql-4.012-1.el5.rf.i386.rpm 224 kB 00:01
(2/6): mysqlclient15-5.0.67-1.el5.remi.i386.rpm 1.3 MB 38:35
(3/6): mysql-devel-5.1.41-1.el5.remi.i386.rpm 3.2 MB 00:40
(4/6): mysql-5.1.41-1.el5.remi.i386.rpm 3.9 MB 00:35
(5/6): mysql-test-5.1.41-1.el5.remi.i386.rpm 5.9 MB 00:58
(6/6): mysql-server-5.1.41-1.el5.remi.i386.rpm 11 MB 01:57
...
Running rpm_check_debug
Running Transaction Test
Finished Transaction Test
Transaction Test Succeeded
Running Transaction
Installing : mysqlclient15 1/26

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

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

Updating : php-common 2/26
warning: /etc/php.ini created as /etc/php.ini.rpmnew

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

Installing : mysql-libs 3/26
Updating : mysql 4/26
Installing : perl-DBD-mysql 5/26
Updating : mysql-server 6/26
Installing : libedit 7/26
Updating : php-cli 8/26
Installing : sqlite2 9/26
Updating : php-pdo 10/26
Updating : mysql-test 11/26
Updating : php 12/26
Updating : php-mbstring 13/26
Updating : mysql-devel 14/26
Updating : php-mysql 15/26
Cleanup : mysql-test 16/26
Cleanup : php 17/26
Cleanup : mysql-server 18/26
Cleanup : php-mbstring 19/26
Erasing : perl-DBD-MySQL 20/26
Cleanup : mysql-devel 21/26
Cleanup : mysql 22/26
Cleanup : php-pdo 23/26
Cleanup : php-common 24/26
Cleanup : php-cli 25/26
Cleanup : php-mysql 26/26

Installed:
perl-DBD-mysql.i386 0:4.012-1.el5.rf

Dependency Installed:
libedit.i386 0:2.11-2.20080712cvs.el5 mysql-libs.i386 0:5.1.41-1.el5.remi
mysqlclient15.i386 0:5.0.67-1.el5.remi sqlite2.i386 0:2.8.17-2.el5.remi

Updated:
mysql.i386 0:5.1.41-1.el5.remi

Dependency Updated:
mysql-devel.i386 0:5.1.41-1.el5.remi mysql-server.i386 0:5.1.41-1.el5.remi
mysql-test.i386 0:5.1.41-1.el5.remi php.i386 0:5.3.1-1.el5.remi
php-cli.i386 0:5.3.1-1.el5.remi php-common.i386 0:5.3.1-1.el5.remi
php-mbstring.i386 0:5.3.1-1.el5.remi php-mysql.i386 0:5.3.1-1.el5.remi
php-pdo.i386 0:5.3.1-1.el5.remi

Replaced:
perl-DBD-MySQL.i386 0:3.0007-2.el5

Complete!

 php と MySQL が同時にインストールされたようだ。

7. 更新の確認
# php -v
PHP 5.3.1 (cli) (built: Nov 20 2009 17:51:14)
Copyright (c) 1997-2009 The PHP Group
Zend Engine v2.3.0, Copyright (c) 1998-2009 Zend Technologies

# mysql
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 3
Server version: 5.1.41 MySQL Community Server (GPL) by Remi

 既存サービスが動作することを確認できた。

0 件のコメント:

コメントを投稿