Subscribe:

2010/10/04

php5.2 インストール(さくらVPSサーバー)





インストール


CentOS5の公式レポジトリでは今のところphp5.1までしかインストールできないので
非公式のレポジトリを使用してアップグレードしてみる。

[root@centos]# php -v 現在のバージョン5.1.6
PHP 5.1.6 (cli) (built: Mar 31 2010 02:39:17)
Copyright (c) 1997-2006 The PHP Group
Zend Engine v2.1.0, Copyright (c) 1998-2006 Zend Technologies
[root@centos]# rpm --import http://www.jasonlitka.com/media/RPM-GPG-KEY-jlitka
[root@centos]# vi /etc/yum.repos.d/utterramblings.repo
↓以下を追加
[utterramblings]
name=Jason's Utter Ramblings Repo
baseurl=http://www.jasonlitka.com/media/EL$releasever/$basearch/
enabled=0 0 → 1 にすると常に非公式リポジトリを参照
gpgcheck=1
gpgkey=http://www.jasonlitka.com/media/RPM-GPG-KEY-jlitka
[root@centos]# yum --enablerepo=utterramblings update php リポジトリを指定してphpをアップグレード
Loaded plugins: 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
* updates: ftp.nara.wide.ad.jp
utterramblings | 951 B 00:00
utterramblings/primary | 31 kB 00:00
utterramblings 103/103
Setting up Update Process
Resolving Dependencies
--> Running transaction check
--> Processing Dependency: php = 5.1.6-27.el5 for package: php-devel
---> Package php.x86_64 0:5.2.14-jason.1 set to be updated
--> Processing Dependency: php-common = 5.2.14-jason.1 for package: php
--> Processing Dependency: php-cli = 5.2.14-jason.1 for package: php
--> Running transaction check
---> Package php-cli.x86_64 0:5.2.14-jason.1 set to be updated
--> Processing Dependency: php-common = 5.1.6-27.el5 for package: php-mbstring
--> Processing Dependency: php-common = 5.1.6-27.el5 for package: php-pdo
--> Processing Dependency: php-common = 5.1.6-27.el5 for package: php-mysql
---> Package php-common.x86_64 0:5.2.14-jason.1 set to be updated
---> Package php-devel.x86_64 0:5.2.14-jason.1 set to be updated
--> Running transaction check
---> Package php-mbstring.x86_64 0:5.2.14-jason.1 set to be updated
---> Package php-mysql.x86_64 0:5.2.14-jason.1 set to be updated
--> Processing Dependency: libmysqlclient.so.16(libmysqlclient_16)(64bit) for package: php-mysql
--> Processing Dependency: libmysqlclient.so.16()(64bit) for package: php-mysql
---> Package php-pdo.x86_64 0:5.2.14-jason.1 set to be updated
--> Running transaction check
--> Processing Dependency: libmysqlclient.so.15()(64bit) for package: dovecot
--> Processing Dependency: libmysqlclient.so.15()(64bit) for package: mysql-server
--> Processing Dependency: libmysqlclient.so.15()(64bit) for package: perl-DBD-MySQL
--> Processing Dependency: libmysqlclient.so.15(libmysqlclient_15)(64bit) for package: dovecot
--> Processing Dependency: libmysqlclient.so.15(libmysqlclient_15)(64bit) for package: mysql-server
--> Processing Dependency: libmysqlclient.so.15(libmysqlclient_15)(64bit) for package: perl-DBD-MySQL
--> Processing Dependency: libmysqlclient_r.so.15()(64bit) for package: mysql-server
--> Processing Dependency: libmysqlclient_r.so.15(libmysqlclient_15)(64bit) for package: mysql-server
--> Processing Dependency: mysql = 5.0.77-4.el5_5.3 for package: mysql-server
---> Package mysql.x86_64 0:5.1.50-jason.1 set to be updated
--> Running transaction check
---> Package mysql-server.x86_64 0:5.1.50-jason.1 set to be updated
---> Package mysqlclient15.x86_64 0:5.0.91-1.jason.1 set to be updated
--> Finished Dependency Resolution
Dependencies Resolved
==========================================================================================
Package Arch Version Repository Size
==========================================================================================
Updating:
php x86_64 5.2.14-jason.1 utterramblings 3.8 M
Installing for dependencies:
mysqlclient15 x86_64 5.0.91-1.jason.1 utterramblings 2.0 M
Updating for dependencies:
mysql x86_64 5.1.50-jason.1 utterramblings 3.5 M
mysql-server x86_64 5.1.50-jason.1 utterramblings 13 M
php-cli x86_64 5.2.14-jason.1 utterramblings 2.6 M
php-common x86_64 5.2.14-jason.1 utterramblings 521 k
php-devel x86_64 5.2.14-jason.1 utterramblings 557 k
php-mbstring x86_64 5.2.14-jason.1 utterramblings 1.4 M
php-mysql x86_64 5.2.14-jason.1 utterramblings 280 k
php-pdo x86_64 5.2.14-jason.1 utterramblings 169 k
Transaction Summary
==========================================================================================
Install 1 Package(s)
Upgrade 9 Package(s)
Total download size: 28 M
Is this ok [y/N]: y
Downloading Packages:
(1/10): php-pdo-5.2.14-jason.1.x86_64.rpm | 169 kB 00:00
(2/10): php-mysql-5.2.14-jason.1.x86_64.rpm | 280 kB 00:01
(3/10): php-common-5.2.14-jason.1.x86_64.rpm | 521 kB 00:01
(4/10): php-devel-5.2.14-jason.1.x86_64.rpm | 557 kB 00:01
(5/10): php-mbstring-5.2.14-jason.1.x86_64.rpm | 1.4 MB 00:02
(6/10): mysqlclient15-5.0.91-1.jason.1.x86_64.rpm | 2.0 MB 00:03
(7/10): php-cli-5.2.14-jason.1.x86_64.rpm | 2.6 MB 00:04
(8/10): mysql-5.1.50-jason.1.x86_64.rpm | 3.5 MB 00:05
(9/10): php-5.2.14-jason.1.x86_64.rpm | 3.8 MB 00:05
(10/10): mysql-server-5.1.50-jason.1.x86_64.rpm | 13 MB 00:12
------------------------------------------------------------------------------------------
Total 652 kB/s | 28 MB 00:43
Running rpm_check_debug
Running Transaction Test
Finished Transaction Test
Transaction Test Succeeded
Running Transaction
Updating : php-common 1/19
warning: /etc/php.ini created as /etc/php.ini.rpmnew
Installing : mysqlclient15 2/19
Updating : php-pdo 3/19
Updating : mysql 4/19
Updating : php-cli 5/19
Updating : php 6/19
******************************************************************************
* If this is a new installation you should run 'mysql_secure_installation'. *
* *
* If you are upgrading from a previous version of MySQL you should run the *
* 'mysql_upgrade' script to check your tables and update them to the newest *
* format. This command may take a long time to run if you have large tables. *
******************************************************************************
Updating : mysql-server 7/19
Updating : php-mysql 8/19
Updating : php-devel 9/19
Updating : php-mbstring 10/19
Cleanup : php-cli 11/19
Cleanup : mysql-server 12/19
Cleanup : php-mysql 13/19
Cleanup : php-devel 14/19
Cleanup : mysql 15/19
Cleanup : php 16/19
Cleanup : php-common 17/19
Cleanup : php-mbstring 18/19
Cleanup : php-pdo 19/19
Dependency Installed:
mysqlclient15.x86_64 0:5.0.91-1.jason.1
Updated:
php.x86_64 0:5.2.14-jason.1
Dependency Updated:
mysql.x86_64 0:5.1.50-jason.1 mysql-server.x86_64 0:5.1.50-jason.1
php-cli.x86_64 0:5.2.14-jason.1 php-common.x86_64 0:5.2.14-jason.1
php-devel.x86_64 0:5.2.14-jason.1 php-mbstring.x86_64 0:5.2.14-jason.1
php-mysql.x86_64 0:5.2.14-jason.1 php-pdo.x86_64 0:5.2.14-jason.1
Complete!
[root@centos]# php -v 現在のバージョン5.2.14
PHP Warning: PHP Startup: mcrypt: Unable to initialize module Warningが出た
Module compiled with module API=20050922, debug=0, thread-safety=0
PHP compiled with module API=20060613, debug=0, thread-safety=0
These options need to match in Unknown on line 0
PHP 5.2.14 (cli) (built: Aug 27 2010 16:44:17)
Copyright (c) 1997-2010 The PHP Group
Zend Engine v2.2.0, Copyright (c) 1998-2010 Zend Technologies
[root@centos]# yum --enablerepo=utterramblings info php-mcrypt yumに問い合わせ
Loaded plugins: 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
* updates: ftp.nara.wide.ad.jp
Installed Packages
Name : php-mcrypt
Arch : x86_64
Version : 5.1.6
Release : 15.el5.centos.1
Size : 37 k
Repo : installed
Summary : Standard PHP module provides mcrypt library support
URL : http://www.php.net/
License : The PHP License
Description: Standard PHP module provides mcrypt library support
Available Packages
Name : php-mcrypt
Arch : x86_64
Version : 5.2.14 このモジュールだけアップデートされなかった様子
Release : jason.1
Size : 50 k
Repo : utterramblings
Summary : Standard PHP module provides mcrypt library support
URL : http://www.php.net/
License : PHP
Description: The php-mcrypt package contains a dynamic shared object that will add
: support for using the mcrypt library to PHP.
[root@centos]# yum --enablerepo=utterramblings update php-mcrypt このモジュールだけアップデート
Loaded plugins: 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
* updates: ftp.nara.wide.ad.jp
Setting up Update Process
Resolving Dependencies
--> Running transaction check
---> Package php-mcrypt.x86_64 0:5.2.14-jason.1 set to be updated
--> Finished Dependency Resolution
Dependencies Resolved
==========================================================================================
Package Arch Version Repository Size
==========================================================================================
Updating:
php-mcrypt x86_64 5.2.14-jason.1 utterramblings 50 k
Transaction Summary
==========================================================================================
Install 0 Package(s)
Upgrade 1 Package(s)
Total download size: 50 k
Is this ok [y/N]: y
Downloading Packages:
php-mcrypt-5.2.14-jason.1.x86_64.rpm | 50 kB 00:00
Running rpm_check_debug
Running Transaction Test
Finished Transaction Test
Transaction Test Succeeded
Running Transaction
Updating : php-mcrypt 1/2
Cleanup : php-mcrypt 2/2
Updated:
php-mcrypt.x86_64 0:5.2.14-jason.1
Complete!
[root@centos]# php -v Warningが消えた
PHP 5.2.14 (cli) (built: Aug 27 2010 16:44:17)
Copyright (c) 1997-2010 The PHP Group
Zend Engine v2.2.0, Copyright (c) 1998-2010 Zend Technologies
[root@centos]#

0 件のコメント: