CentOS6にPHP5.5をyumでインストール

PHP 開発ツール

PHP5.5を試してみたかったのでyumで入れてみました
毎度おなじみremi-testでございます

remi-php55が追加されたのでこちらを使うと良いと思います!
New repository: remi-php55 – Les RPM de Remi – Blog

remiの導入

※さくらVPSの場合epelは最初から入っているので入れる必要ありません
~~~
$ sudo rpm -ivh http://ftp.jaist.ac.jp/pub/Linux/Fedora/epel/6/x86_64/epel-release-6-8.noarch.rpm
$ sudo rpm -ivh http://rpms.famillecollet.com/enterprise/remi-release-6.rpm
~~~

remi-php55が使えない場合

こんなログが出ます、
~~~
$ sudo yum install php –enablerepo=remi-php55
Loaded plugins: fastestmirror, security

Error getting repository data for remi-php55, repository not found
~~~

こんな時はremiをアップデートしましょう

~~~
$ sudo rpm -Uvh http://rpms.famillecollet.com/enterprise/remi-release-6.rpm
~~~

PHPのインストール

一度remi-testで入れたことが原因か?
php-gdで失敗
~~~
$ sudo yum –enablerepo=remi-php55 install php php-common php-mbstring php-pdo php-cli php-devel php-gd php-mysql

Loaded plugins: fastestmirror, security
Loading mirror speeds from cached hostfile
* base: ftp.iij.ad.jp
* epel: ftp.iij.ad.jp
* extras: ftp.iij.ad.jp
* remi-php55: mirror.smartmedia.net.id
* updates: ftp.iij.ad.jp
Setting up Install Process
Package php-mysql is obsoleted by php-mysqlnd, trying to install php-mysqlnd-5.5.5-2.el6.remi.x86_64 instead
Resolving Dependencies
–> Running transaction check
—> Package php.x86_64 0:5.5.5-2.el6.remi will be installed
—> Package php-cli.x86_64 0:5.5.5-2.el6.remi will be installed
—> Package php-common.x86_64 0:5.5.5-2.el6.remi will be installed
–> Processing Dependency: php-pecl-zip(x86-64) for package: php-common-5.5.5-2.el6.remi.x86_64
–> Processing Dependency: php-pecl-jsonc(x86-64) for package: php-common-5.5.5-2.el6.remi.x86_64
—> Package php-devel.x86_64 0:5.5.5-2.el6.remi will be installed
–> Processing Dependency: php-pecl-jsonc-devel(x86-64) for package: php-devel-5.5.5-2.el6.remi.x86_64
—> Package php-gd.x86_64 0:5.5.5-2.el6.remi will be installed
–> Processing Dependency: libvpx.so.0()(64bit) for package: php-gd-5.5.5-2.el6.remi.x86_64
–> Processing Dependency: libgd.so.3()(64bit) for package: php-gd-5.5.5-2.el6.remi.x86_64
—> Package php-mbstring.x86_64 0:5.5.5-2.el6.remi will be installed
—> Package php-mysqlnd.x86_64 0:5.5.5-2.el6.remi will be installed
—> Package php-pdo.x86_64 0:5.5.5-2.el6.remi will be installed
–> Running transaction check
—> Package libvpx.x86_64 0:0.9.0-8.el6_0 will be installed
—> Package php-gd.x86_64 0:5.5.5-2.el6.remi will be installed
–> Processing Dependency: libgd.so.3()(64bit) for package: php-gd-5.5.5-2.el6.remi.x86_64
—> Package php-pecl-jsonc.x86_64 0:1.3.2-2.el6.remi.1 will be installed
–> Processing Dependency: /usr/bin/pecl for package: php-pecl-jsonc-1.3.2-2.el6.remi.1.x86_64
–> Processing Dependency: /usr/bin/pecl for package: php-pecl-jsonc-1.3.2-2.el6.remi.1.x86_64
—> Package php-pecl-jsonc-devel.x86_64 0:1.3.2-2.el6.remi.1 will be installed
—> Package php-pecl-zip.x86_64 0:1.12.2-2.el6.remi.5.5 will be installed
–> Running transaction check
—> Package php-gd.x86_64 0:5.5.5-2.el6.remi will be installed
–> Processing Dependency: libgd.so.3()(64bit) for package: php-gd-5.5.5-2.el6.remi.x86_64
—> Package php-pear.noarch 1:1.9.4-20.el6.remi will be installed
–> Processing Dependency: php-xml for package: 1:php-pear-1.9.4-20.el6.remi.noarch
–> Processing Dependency: php-posix for package: 1:php-pear-1.9.4-20.el6.remi.noarch
–> Running transaction check
—> Package php-gd.x86_64 0:5.5.5-2.el6.remi will be installed
–> Processing Dependency: libgd.so.3()(64bit) for package: php-gd-5.5.5-2.el6.remi.x86_64
—> Package php-process.x86_64 0:5.5.5-2.el6.remi will be installed
—> Package php-xml.x86_64 0:5.5.5-2.el6.remi will be installed
–> Finished Dependency Resolution
Error: Package: php-gd-5.5.5-2.el6.remi.x86_64 (remi-php55)
Requires: libgd.so.3()(64bit)
You could try using –skip-broken to work around the problem
You could try running: rpm -Va –nofiles –nodigest
~~~

gd-lastをupdate

~~~
$ sudo yum install gd-last –enablerepo=remi
Loaded plugins: fastestmirror, security
Loading mirror speeds from cached hostfile
* base: ftp.iij.ad.jp
* epel: ftp.iij.ad.jp
* extras: ftp.iij.ad.jp
* remi: mirror.smartmedia.net.id
* updates: ftp.iij.ad.jp
Setting up Install Process
Resolving Dependencies
–> Running transaction check
—> Package gd-last.x86_64 0:2.1.0-1.el6.remi will be installed
–> Processing Dependency: libvpx.so.0()(64bit) for package: gd-last-2.1.0-1.el6.remi.x86_64
–> Running transaction check
—> Package libvpx.x86_64 0:0.9.0-8.el6_0 will be installed
–> Finished Dependency Resolution

Dependencies Resolved

=======================================================================================================================================
Package Arch Version Repository Size
=======================================================================================================================================
Installing:
gd-last x86_64 2.1.0-1.el6.remi remi 134 k
Installing for dependencies:
libvpx x86_64 0.9.0-8.el6_0 base 161 k

Transaction Summary
=======================================================================================================================================
Install 2 Package(s)

Total download size: 295 k
Installed size: 818 k
Is this ok [y/N]: y
Downloading Packages:
(1/2): gd-last-2.1.0-1.el6.remi.x86_64.rpm | 134 kB 00:01
(2/2): libvpx-0.9.0-8.el6_0.x86_64.rpm | 161 kB 00:00
—————————————————————————————————————————————
Total 180 kB/s | 295 kB 00:01
Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction
Installing : libvpx-0.9.0-8.el6_0.x86_64 1/2
Installing : gd-last-2.1.0-1.el6.remi.x86_64 2/2
Verifying : gd-last-2.1.0-1.el6.remi.x86_64 1/2
Verifying : libvpx-0.9.0-8.el6_0.x86_64 2/2

Installed:
gd-last.x86_64 0:2.1.0-1.el6.remi

Dependency Installed:
libvpx.x86_64 0:0.9.0-8.el6_0

Complete!
~~~

改めてPHPをインストール

入りました!
~~~
$ sudo yum –enablerepo=remi-php55 install php php-common php-mbstring php-pdo php-cli php-devel php-gd php-mysql
Loaded plugins: fastestmirror, security
Loading mirror speeds from cached hostfile
* base: ftp.iij.ad.jp
* epel: ftp.iij.ad.jp
* extras: ftp.iij.ad.jp
* remi-php55: mirror.smartmedia.net.id
* updates: ftp.iij.ad.jp
Setting up Install Process
Package php-mysql is obsoleted by php-mysqlnd, trying to install php-mysqlnd-5.5.5-2.el6.remi.x86_64 instead
Resolving Dependencies
–> Running transaction check
—> Package php.x86_64 0:5.5.5-2.el6.remi will be installed
—> Package php-cli.x86_64 0:5.5.5-2.el6.remi will be installed
—> Package php-common.x86_64 0:5.5.5-2.el6.remi will be installed
–> Processing Dependency: php-pecl-zip(x86-64) for package: php-common-5.5.5-2.el6.remi.x86_64
–> Processing Dependency: php-pecl-jsonc(x86-64) for package: php-common-5.5.5-2.el6.remi.x86_64
—> Package php-devel.x86_64 0:5.5.5-2.el6.remi will be installed
–> Processing Dependency: php-pecl-jsonc-devel(x86-64) for package: php-devel-5.5.5-2.el6.remi.x86_64
—> Package php-gd.x86_64 0:5.5.5-2.el6.remi will be installed
—> Package php-mbstring.x86_64 0:5.5.5-2.el6.remi will be installed
—> Package php-mysqlnd.x86_64 0:5.5.5-2.el6.remi will be installed
—> Package php-pdo.x86_64 0:5.5.5-2.el6.remi will be installed
–> Running transaction check
—> Package php-pecl-jsonc.x86_64 0:1.3.2-2.el6.remi.1 will be installed
–> Processing Dependency: /usr/bin/pecl for package: php-pecl-jsonc-1.3.2-2.el6.remi.1.x86_64
–> Processing Dependency: /usr/bin/pecl for package: php-pecl-jsonc-1.3.2-2.el6.remi.1.x86_64
—> Package php-pecl-jsonc-devel.x86_64 0:1.3.2-2.el6.remi.1 will be installed
—> Package php-pecl-zip.x86_64 0:1.12.2-2.el6.remi.5.5 will be installed
–> Running transaction check
—> Package php-pear.noarch 1:1.9.4-20.el6.remi will be installed
–> Processing Dependency: php-xml for package: 1:php-pear-1.9.4-20.el6.remi.noarch
–> Processing Dependency: php-posix for package: 1:php-pear-1.9.4-20.el6.remi.noarch
–> Running transaction check
—> Package php-process.x86_64 0:5.5.5-2.el6.remi will be installed
—> Package php-xml.x86_64 0:5.5.5-2.el6.remi will be installed
–> Finished Dependency Resolution

Dependencies Resolved

=======================================================================================================================================
Package Arch Version Repository Size
=======================================================================================================================================
Installing:
php x86_64 5.5.5-2.el6.remi remi-php55 2.5 M
php-cli x86_64 5.5.5-2.el6.remi remi-php55 2.4 M
php-common x86_64 5.5.5-2.el6.remi remi-php55 1.0 M
php-devel x86_64 5.5.5-2.el6.remi remi-php55 2.4 M
php-gd x86_64 5.5.5-2.el6.remi remi-php55 65 k
php-mbstring x86_64 5.5.5-2.el6.remi remi-php55 954 k
php-mysqlnd x86_64 5.5.5-2.el6.remi remi-php55 258 k
php-pdo x86_64 5.5.5-2.el6.remi remi-php55 105 k
Installing for dependencies:
php-pear noarch 1:1.9.4-20.el6.remi remi-php55 371 k
php-pecl-jsonc x86_64 1.3.2-2.el6.remi.1 remi-php55 45 k
php-pecl-jsonc-devel x86_64 1.3.2-2.el6.remi.1 remi-php55 4.8 k
php-pecl-zip x86_64 1.12.2-2.el6.remi.5.5 remi-php55 265 k
php-process x86_64 5.5.5-2.el6.remi remi-php55 50 k
php-xml x86_64 5.5.5-2.el6.remi remi-php55 202 k

Transaction Summary
=======================================================================================================================================
Install 14 Package(s)

Total download size: 11 M
Installed size: 43 M
Is this ok [y/N]: y
Downloading Packages:
(1/14): php-5.5.5-2.el6.remi.x86_64.rpm | 2.5 MB 00:15
(2/14): php-cli-5.5.5-2.el6.remi.x86_64.rpm | 2.4 MB 00:15
(3/14): php-common-5.5.5-2.el6.remi.x86_64.rpm | 1.0 MB 00:06
(4/14): php-devel-5.5.5-2.el6.remi.x86_64.rpm | 2.4 MB 00:15
(5/14): php-gd-5.5.5-2.el6.remi.x86_64.rpm | 65 kB 00:00
(6/14): php-mbstring-5.5.5-2.el6.remi.x86_64.rpm | 954 kB 00:06
(7/14): php-mysqlnd-5.5.5-2.el6.remi.x86_64.rpm | 258 kB 00:01
(8/14): php-pdo-5.5.5-2.el6.remi.x86_64.rpm | 105 kB 00:00
(9/14): php-pear-1.9.4-20.el6.remi.noarch.rpm | 371 kB 00:03
(10/14): php-pecl-jsonc-1.3.2-2.el6.remi.1.x86_64.rpm | 45 kB 00:00
(11/14): php-pecl-jsonc-devel-1.3.2-2.el6.remi.1.x86_64.rpm | 4.8 kB 00:00
(12/14): php-pecl-zip-1.12.2-2.el6.remi.5.5.x86_64.rpm | 265 kB 00:02
(13/14): php-process-5.5.5-2.el6.remi.x86_64.rpm | 50 kB 00:00
(14/14): php-xml-5.5.5-2.el6.remi.x86_64.rpm | 202 kB 00:01
—————————————————————————————————————————————
Total 149 kB/s | 11 MB 01:13
Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction
Installing : php-xml-5.5.5-2.el6.remi.x86_64 1/14
Installing : php-cli-5.5.5-2.el6.remi.x86_64 2/14
Installing : php-process-5.5.5-2.el6.remi.x86_64 3/14
Installing : php-common-5.5.5-2.el6.remi.x86_64 4/14

WARNING : These php-* RPM are not official Fedora / Red Hat build and
overrides the official ones. Don’t file bugs on Fedora Project nor Red Hat.

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

Installing : 1:php-pear-1.9.4-20.el6.remi.noarch 5/14
Installing : php-pecl-jsonc-1.3.2-2.el6.remi.1.x86_64 6/14
Installing : php-pecl-zip-1.12.2-2.el6.remi.5.5.x86_64 7/14
Installing : php-pecl-jsonc-devel-1.3.2-2.el6.remi.1.x86_64 8/14
Installing : php-devel-5.5.5-2.el6.remi.x86_64 9/14
Installing : php-pdo-5.5.5-2.el6.remi.x86_64 10/14
Installing : php-mysqlnd-5.5.5-2.el6.remi.x86_64 11/14
Installing : php-5.5.5-2.el6.remi.x86_64 12/14
Installing : php-gd-5.5.5-2.el6.remi.x86_64 13/14
Installing : php-mbstring-5.5.5-2.el6.remi.x86_64 14/14
Verifying : php-devel-5.5.5-2.el6.remi.x86_64 1/14
Verifying : php-5.5.5-2.el6.remi.x86_64 2/14
Verifying : php-process-5.5.5-2.el6.remi.x86_64 3/14
Verifying : php-mysqlnd-5.5.5-2.el6.remi.x86_64 4/14
Verifying : php-xml-5.5.5-2.el6.remi.x86_64 5/14
Verifying : 1:php-pear-1.9.4-20.el6.remi.noarch 6/14
Verifying : php-cli-5.5.5-2.el6.remi.x86_64 7/14
Verifying : php-pecl-zip-1.12.2-2.el6.remi.5.5.x86_64 8/14
Verifying : php-gd-5.5.5-2.el6.remi.x86_64 9/14
Verifying : php-pecl-jsonc-1.3.2-2.el6.remi.1.x86_64 10/14
Verifying : php-common-5.5.5-2.el6.remi.x86_64 11/14
Verifying : php-pdo-5.5.5-2.el6.remi.x86_64 12/14
Verifying : php-mbstring-5.5.5-2.el6.remi.x86_64 13/14
Verifying : php-pecl-jsonc-devel-1.3.2-2.el6.remi.1.x86_64 14/14

Installed:
php.x86_64 0:5.5.5-2.el6.remi php-cli.x86_64 0:5.5.5-2.el6.remi php-common.x86_64 0:5.5.5-2.el6.remi
php-devel.x86_64 0:5.5.5-2.el6.remi php-gd.x86_64 0:5.5.5-2.el6.remi php-mbstring.x86_64 0:5.5.5-2.el6.remi
php-mysqlnd.x86_64 0:5.5.5-2.el6.remi php-pdo.x86_64 0:5.5.5-2.el6.remi

Dependency Installed:
php-pear.noarch 1:1.9.4-20.el6.remi php-pecl-jsonc.x86_64 0:1.3.2-2.el6.remi.1
php-pecl-jsonc-devel.x86_64 0:1.3.2-2.el6.remi.1 php-pecl-zip.x86_64 0:1.12.2-2.el6.remi.5.5
php-process.x86_64 0:5.5.5-2.el6.remi php-xml.x86_64 0:5.5.5-2.el6.remi

Complete!
~~~

コメント

  1. PHP5.5をインストール | abeerforyou.com より:

    […] CentOS6にPHP5.5をyumでインストール […]

  2. CentOSにPHPをyumでインストール ‹ モノドンプロジェクト より:

    […] のぶろぐ – CentOS6にPHP5.5をyumでインストール 今回はphp-fpmを使用してnginxと連携させるので、上記のPHPインストールの手順に「php-fpm」を追加してyumを実行しました。 […]

タイトルとURLをコピーしました