😀

外部リポジトリの追加(remi,epel)

2022/11/28に公開

最新のPHPを入れたい場合は大体この2つはyumのレポジトリが必要なのでメモ

環境
virtualbox centOS6.3(x86)

epel

#先にepelから入れないとremiの依存性でエラーになるので注意
rpm --import wget http://ftp.riken.jp/Linux/fedora/epel/RPM-GPG-KEY-EPEL-6 
vim /etc/yum.repos.d/epel.repo

epelの設定を新規で追加する

/etc/yum.repos.d/epel.repo
[epel]
name=EPEL RPM Repository for Red Hat Enterprise Linux
baseurl=http://ftp.riken.jp/Linux/fedora/epel/6/$basearch/
gpgcheck=1
enabled=0

epelを使ってインストールできるか確認する

yum --enablerepo=epel install php
#インストールする必要がない場合はNで抜ける

remi

rpm --import http://rpms.famillecollet.com/RPM-GPG-KEY-remi
vim /etc/yum.repos.d/remi.repo

remiの設定を新規で追加する

/etc/yum.repos.d/remi.repo
[remi]
name=Les RPM de remi pour Enterprise Linux 5 - $basearch
baseurl=http://rpms.famillecollet.com/el5.$basearch/
http://iut-info.univ-reims.fr/remirpms/el5.$basearch/
enabled=0
priority=1

yumでインストールできる確認する

yum --enablerepo=remi install php
#インストールする必要がない場合はNで抜ける

以上

Discussion