Centos 6.4 のphpをyumで新しくしてみました
現状は
$ php -v
PHP 5.4.20 (cli) (built: Sep 18 2013 19:55:33)
Copyright (c) 1997-2013 The PHP Group
Zend Engine v2.4.0, Copyright (c) 1998-2013 Zend Technologies
$ yum info php
Installed Packages
Name : php
Arch : x86_64
Version : 5.4.20
Release : 1.el6.remi
Size : 9.1 M
Repo : installed
From repo : remi
Summary : PHP scripting language for creating dynamic web sites
URL : http://www.php.net/
License : PHP and Zend and BSD
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 (often referred to as mod_php)
: which adds support for the PHP language to Apache HTTP Server.
とremiリポジトリから入れてるようです
$ sudo yum upgrade
$ sudo yum update
なんてしても入らないのでremiリポジトリをアップデート
Remi’s RPM repository
からOSにあったリンクを探してきて
$ rpm -Uvh http://rpms.famillecollet.com/enterprise/remi-release-6.rpm
これでアップデートされました
$ yum repolist all
remi Remi's RPM repository for Enterprise Linux 6 - x86_64 disabled
remi-debuginfo Remi's RPM repository for Enterprise Linux 6 - x86_64 - debuginfo disabled
remi-php55 Remi's PHP 5.5 RPM repository for Enterprise Linux 6 - x86_64 disabled
remi-php55-debuginfo Remi's PHP 5.5 RPM repository for Enterprise Linux 6 - x86_64 - debuginfo disabled
remi-php56 Remi's PHP 5.6 RPM repository for Enterprise Linux 6 - x86_64 disabled
remi-php56-debuginfo Remi's PHP 5.6 RPM repository for Enterprise Linux 6 - x86_64 - debuginfo disabled
remi-php70 Remi's PHP 7.0 RPM repository for Enterprise Linux 6 - x86_64 disabled
remi-php70-debuginfo Remi's PHP 7.0 RPM repository for Enterprise Linux 6 - x86_64 - debuginfo disabled
remi-php70-test Remi's PHP 7.0 test RPM repository for Enterprise Linux 6 - x86_64 disabled
remi-php70-test-debuginfo Remi's PHP 7.0 test RPM repository for Enterprise Linux 6 - x86_64 - debuginfo disabled
とremiリポジトリが増えてます
phpで何が入っているか確認
$ rpm -aq | grep php
php-pecl-apc-3.1.15-0.3.svn329913.el6.remi.x86_64
php-bcmath-5.4.20-1.el6.remi.x86_64
php-xml-5.4.20-1.el6.remi.x86_64
php-pdo-5.4.20-1.el6.remi.x86_64
php-cli-5.4.20-1.el6.remi.x86_64
php-pear-1.9.4-12.el6.remi.1.noarch
php-mbstring-5.4.20-1.el6.remi.x86_64
php-gd-5.4.20-1.el6.remi.x86_64
newrelic-php5-common-5.2.0.141-1.noarch
newrelic-php5-5.2.0.141-1.x86_64
php-common-5.4.20-1.el6.remi.x86_64
php-mysql-5.4.20-1.el6.remi.x86_64
php-pgsql-5.4.20-1.el6.remi.x86_64
php-5.4.20-1.el6.remi.x86_64
強引にアップデート
$ sudo yum –enablerepo=remi,remi-php56 update
$ php -v
PHP 5.6.16 (cli) (built: Nov 26 2015 08:01:30)
Copyright (c) 1997-2015 The PHP Group
Zend Engine v2.6.0, Copyright (c) 1998-2015 Zend Technologies
できました