LoginSignup
55
57

More than 5 years have passed since last update.

Remiリポジトリを使って最新版のphp等をyumでインストールする

Last updated at Posted at 2014-01-06

root権限で作業する。

1. yumを最新にする

# yum install yum-fastestmirror
# yum upgrade
# yum update

2. リポジトリの取得と初期インストール済みパッケージのアップデート

GPGキーをインポートとリポジトリファイルを追加

# rpm –import http://rpms.famillecollet.com/RPM-GPG-KEY-remi
# cd /etc/yum.repos.d
# wget http://rpms.famillecollet.com/remi-enterprise.repo

3. remiの設定ファイルを編集する

# vim /etc/yum.repos.d/remi-enterprise.repo
[remi]
name=Les RPM de remi pour Enterprise Linux $releasever - $basearch
#baseurl=http://rpms.famillecollet.com/enterprise/$releasever/remi/$basearch/
mirrorlist=http://rpms.famillecollet.com/enterprise/$releasever/remi/mirror
enabled=0
gpgcheck=1
gpgkey=http://rpms.famillecollet.com/RPM-GPG-KEY-remi

[remi-php55]
name=Les RPM de remi de PHP 5.5 pour Enterprise Linux $releasever - $basearch
#baseurl=http://rpms.famillecollet.com/enterprise/$releasever/php55/$basearch/
mirrorlist=http://rpms.famillecollet.com/enterprise/$releasever/php55/mirror
# WARNING: If you enable this repository, you must also enable "remi"
enabled=0
gpgcheck=1
gpgkey=http://rpms.famillecollet.com/RPM-GPG-KEY-remi

remi-testは消しても良い。

enabledを1にすると、デフォルトのレポジトリがremiになるが、今回は0のままにしておく。

yumコマンドを実行するときに、レポジトリをremiに指定すれば良い。

# yum --enablerepo=remi update

Apacheのインストールはこうなる。

# yum -y --enablerepo=remi install php
55
57
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
55
57