LoginSignup
3
3

More than 5 years have passed since last update.

CentOS6.6に php5.5をインストールしてみる、違う方法①

Posted at

前の投稿より簡単にインストールできたのでこっちの方法も投稿します。

参考にさせてもらったサイト
http://blog.ybbo.net/2014/01/22/%E3%80%90%E3%82%B7%E3%83%B3%E3%83%97%E3%83%AB%E3%80%91centos6%E3%81%ABphp5-5%E3%82%92yum%E3%81%A7%E7%B0%A1%E5%8D%98%E3%81%AB%E3%82%A4%E3%83%B3%E3%82%B9%E3%83%88%E3%83%BC%E3%83%AB%E3%81%99%E3%82%8B/

環境
CentOS:6.6 (64bit)

リポジトリを追加する

まずepelのリポジトリを追加します。

sudo rpm -Uvh http://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm

次にremiのリポジトリを追加します。

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

これでレポジトリの追加は完了です。

php5.5をインストールする

では php5.5をインストールしていきましょう。

yum install php --enablerepo=remi-php55

上記でphp5.5がインストールできます。

phpのバージョンを確認

php -v
PHP 5.5.22 (cli) (built: Feb 18 2015 17:54:45)
Copyright (c) 1997-2015 The PHP Group
Zend Engine v2.5.0, Copyright (c) 1998-2015 Zend Technologies
3
3
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
3
3