#author("2018-08-04T22:57:47+09:00","","")

[[コマンド]]

#author("2018-08-05T11:18:23+09:00","","")

[[CentOS7]]


*EPEL ELRepo Remi リポジトリインストール [#l62c9cab]
EPEL Remiとは、サードパーティ製のリポジトリです。
CentOS標準リポジトリで提供されていないパッケージをインストールできます。

**yum-prioritiesインストール [#mb3d159e]
yum-plugin-prioritiesとは、サードパーティ製のリポジトリを追加した際に優先順位をつけるプラグインです。
|BGCOLOR(black):COLOR(white):|c
|[root@centos ~]# yum -y install yum-plugin-priorities|

**CentOS-Base.repo編集 [#f480827c]
priorityとは優先度です。1~99まであり値が低くなるほど優先度は高くなります。(未設定の場合は99)
|BGCOLOR(black):COLOR(white):|c
|[root@centos ~]# vi /etc/yum.repos.d/CentOS-Base.repo|
|# CentOS-Base.repo &br; # &br; # The mirror system uses the connecting IP address of the client and the &br; # update status of each mirror to pick mirrors that are updated to and &br; # geographically close to the client.  You should use this for CentOS updates &br; # unless you are manually picking other mirrors. &br; # &br; # If the mirrorlist= does not work for you, as a fall back you can try the &br; # remarked out baseurl= line instead. &br; # &br; # &br; &br; [base] &br; priority=1 &color(lime){←追加}; &br; name=CentOS-$releasever - Base &br; mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=os &br; #baseurl=http://mirror.centos.org/centos/$releasever/os/$basearch/ &br; gpgcheck=1 &br; gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6 &br; &br; #released updates &br; [updates] &br; priority=1 &color(lime){←追加}; &br; name=CentOS-$releasever - Updates &br; mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=updates &br; #baseurl=http://mirror.centos.org/centos/$releasever/updates/$basearch/ &br; gpgcheck=1 &br; gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6 &br; &br; #additional packages that may be useful &br; [extras] &br; priority=1 &color(lime){←追加}; &br; name=CentOS-$releasever - Extras &br; mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=extras &br; #baseurl=http://mirror.centos.org/centos/$releasever/extras/$basearch/ &br; gpgcheck=1 &br; gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6 &br; &br; #additional packages that extend functionality of existing packages &br; [centosplus] &br; name=CentOS-$releasever - Plus &br; mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=centosplus &br;  #baseurl=http://mirror.centos.org/centos/$releasever/centosplus/$basearch/ &br; gpgcheck=1 &br; enabled=0 &br; gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6 &br; &br; #contrib - packages by Centos Users &br; [contrib] &br; name=CentOS-$releasever - Contrib &br; mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=contrib &br; #baseurl=http://mirror.centos.org/centos/$releasever/contrib/$basearch/ &br; gpgcheck=1 &br; enabled=0 &br; gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6|

**EPELリポジトリ追加 [#fd62b5a1]
|BGCOLOR(black):COLOR(white):|c
|[root@centos ~]# rpm -q epel-release &color(lime){←確認}; &br; パッケージ epel-release はインストールされていません。|
|[root@centos ~]# rpm --import http://dl.fedoraproject.org/pub/epel/RPM-GPG-KEY-EPEL-7|
|[root@centos ~]# rpm -ivh http://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm|
|[root@centos ~]# rpm -q epel-release &br; epel-release-7-10.noarch|

**ELRepoリポジトリ追加 [#s1104c4f]
|BGCOLOR(black):COLOR(white):|c
|[root@centos ~]# rpm -q elrepo-release &color(lime){←確認}; &br; パッケージ elrepo-release はインストールされていません。|
|[root@centos ~]# rpm --import http://elrepo.org/RPM-GPG-KEY-elrepo.org|
|[root@centos ~]# rpm -ivh http://www.elrepo.org/elrepo-release-7.0-2.el7.elrepo.noarch.rpm|
|[root@centos ~]# rpm -q elrepo-release &br; elrepo-release-7.0-2.el7.elrepo.noarch|

**Remiリポジトリ追加 [#d213a9ef]
remiレポジトリはEPELの補完的な立ち位置の外部リポジトリです。有志によって管理されているプロジェクトになります。

remiの目的ですが、最新バージョンのPHPモジュールをRHEL系のディストリビューションに提供することです。このレポジトリをインストールします。

|BGCOLOR(black):COLOR(white):|c
|[root@centos ~]# rpm -q remi-release &color(lime){←確認}; &br; パッケージ remi-release はインストールされていません。|
|[root@centos ~]# rpm --import http://rpms.famillecollet.com/RPM-GPG-KEY-remi|
|[root@centos ~]# rpm -ivh http://rpms.famillecollet.com/enterprise/remi-release-7.rpm|
|[root@centos ~]# rpm -q remi-release &br; remi-release-7.1-2.el7.remi.noarch|

**epel.repo確認 [#z450dbbc]
epel,elrepoは優先度を低く(priority未設定(99)に)して有効(enabled=1)に設定します。
|BGCOLOR(black):COLOR(white):|c
|[root@centos ~]# vi /etc/yum.repos.d/epel.repo|
|[epel] &br; name=Extra Packages for Enterprise Linux 6 - $basearch &br; #baseurl=http://download.fedoraproject.org/pub/epel/6/$basearch &br; mirrorlist=https://mirrors.fedoraproject.org/metalink?repo=epel-6&arch=$basearch &br; failovermethod=priority &br; enabled=1 &color(lime){←enabled=1を確認}; &br; gpgcheck=1 &br; gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-6 &br;  &br; [epel-debuginfo] &br; name=Extra Packages for Enterprise Linux 6 - $basearch - Debug &br; #baseurl=http://download.fedoraproject.org/pub/epel/6/$basearch/debug &br; mirrorlist=https://mirrors.fedoraproject.org/metalink?repo=epel-debug-6&arch=$basearch &br; failovermethod=priority &br; enabled=0 &br; gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-6 &br; gpgcheck=1 &br;  &br; [epel-source] &br; name=Extra Packages for Enterprise Linux 6 - $basearch - Source &br; #baseurl=http://download.fedoraproject.org/pub/epel/6/SRPMS &br; mirrorlist=https://mirrors.fedoraproject.org/metalink?repo=epel-source-6&arch=$basearch &br; failovermethod=priority &br; enabled=0 &br; gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-6 &br; gpgcheck=1|

**elrepo.repo確認 [#k4648226]
|BGCOLOR(black):COLOR(white):|c
|[root@centos ~]# vi /etc/yum.repos.d/elrepo.repo &br; ### Name: ELRepo.org Community Enterprise Linux Repository for el6 &br; ### URL: http://elrepo.org/ &br;  &br; [elrepo] &br; name=ELRepo.org Community Enterprise Linux Repository - el6 &br; baseurl=http://elrepo.org/linux/elrepo/el6/$basearch/ &br; mirrorlist=http://elrepo.org/mirrors-elrepo.el6 &br; enabled=1 &color(lime){←enabled=1を確認}; &br; gpgcheck=1 &br; gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-elrepo.org &br; protect=0 &br;  &br; [elrepo-testing] &br; name=ELRepo.org Community Enterprise Linux Testing Repository - el6 &br; baseurl=http://elrepo.org/linux/testing/el6/$basearch/ &br; mirrorlist=http://elrepo.org/mirrors-elrepo-testing.el6 &br; enabled=0 &br; gpgcheck=1 &br; gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-elrepo.org &br; protect=0 &br;  &br; [elrepo-kernel] &br; name=ELRepo.org Community Enterprise Linux Kernel Repository - el6 &br; baseurl=http://elrepo.org/linux/kernel/el6/$basearch/ &br; mirrorlist=http://elrepo.org/mirrors-elrepo-kernel.el6 &br; enabled=0 &br; gpgcheck=1 &br; gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-elrepo.org &br; protect=0 &br;  &br; [elrepo-extras] &br; name=ELRepo.org Community Enterprise Linux Repository - el6 &br; baseurl=http://elrepo.org/linux/extras/el6/$basearch/ &br; mirrorlist=http://elrepo.org/mirrors-elrepo-extras.el6 &br; enabled=0 &br; gpgcheck=1 &br; gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-elrepo.org &br; protect=0|

**remi.repo編集 [#l72e46da]
remiは必要なときだけ使用するので優先度を高く(priority=1に)して無効(enabled=0)に設定します。
|BGCOLOR(black):COLOR(white):|c
|[root@centos ~]# vi /etc/yum.repos.d/remi.repo &br; [remi] &br; priority=1 &color(lime){←追加}; &br; name=Les RPM de remi pour Enterprise Linux $releasever - $basearch &br; #baseurl=http://rpms.famillecollet.com/enterprise/$releasever/remi/$basearch/ &br; mirrorlist=http://rpms.famillecollet.com/enterprise/$releasever/remi/mirror &br; enabled=0 &color(lime){←enabled=0を確認}; &br; gpgcheck=1 &br; gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-remi &br; failovermethod=priority &br;  &br; [remi-test] &br; name=Les RPM de remi en test pour Enterprise Linux $releasever - $basearch &br; #baseurl=http://rpms.famillecollet.com/enterprise/$releasever/test/$basearch/ &br; mirrorlist=http://rpms.famillecollet.com/enterprise/$releasever/test/mirror &br; enabled=0 &br; gpgcheck=1 &br; gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-remi|

**アップデート [#qc10ce87]
|BGCOLOR(black):COLOR(white):|c
|[root@centos ~]# yum -y update epel-release|
|[root@centos ~]# yum -y update elrepo-release|
|[root@centos ~]# yum -y update remi-release|

**yum-plugin-versionlock [#ad31c26e]
|BGCOLOR(black):COLOR(white):|c
|[root@centos ~]# yum -y install yum-plugin-versionlock|

トップ   編集 差分 履歴 添付 複製 名前変更 リロード   新規 一覧 検索 最終更新   ヘルプ   最終更新のRSS