Amazon LinuxにPostgreSQL 9.0をインストールする(2ページ目)
/etc/yum.repos.d/pgdg-90-centos.repoの書き換え例
[pgdg90]
$releasever
#name=PostgreSQL 9.0 $releasever - $basearch
name=PostgreSQL 9.0 6 - $basearch ★← $releaseverを6に書き換え
#baseurl=http://yum.postgresql.org/9.0/redhat/rhel-$releasever-$basearch
baseurl=http://yum.postgresql.org/9.0/redhat/rhel-6-$basearch
7. 標準リポジトリからPostgreSQL関連パッケージを除外
/etc/yum.repos.d/amzn-main.repoと/etc/yum.repos.d/amzn-updates.repoに「exclude=postgresql*」の設定を記述する。これにより、標準のyumリポジトリからはPostgreSQL関連パッケージがインストールされなくなる。
amzn-main.repoの記述例
# cat amzn-main.repo
[amzn-main]
name=amzn-main-Base
mirrorlist=http://repo.ap-northeast-1.amazonaws.com/$releasever/main/mirror.list
mirror_expire=300
metadata_expire=300
priority=1
failovermethod=priority
fastestmirror_enabled=0
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-amazon-ga
enabled=1
exclude=postgresql* ★← 1行追加
[amzn-main-debuginfo]
name=amzn-main-debuginfo
mirrorlist=http://repo.ap-northeast-1.amazonaws.com/$releasever/main/debuginfo-mirror.list
mirror_expire=300
metadata_expire=300
priority=1
failovermethod=priority
fastestmirror_enabled=0
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-amazon-ga
enabled=0
retries=5
timeout=10
amzn-updates.repoの記述例
# cat amzn-updates.repo
[amzn-updates]
name=amzn-updates-Base
mirrorlist=http://repo.ap-northeast-1.amazonaws.com/$releasever/updates/mirror.list
mirror_expire=300
metadata_expire=300
priority=1
failovermethod=priority
fastestmirror_enabled=0
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-amazon-ga
enabled=1
exclude=postgresql* ★← 1行追加
[amzn-updates-debuginfo]
name=amzn-updates-debuginfo
mirrorlist=http://repo.ap-northeast-1.amazonaws.com/$releasever/updates/debuginfo-mirror.list
mirror_expire=300
metadata_expire=300
priority=1
failovermethod=priority
fastestmirror_enabled=0
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-amazon-ga
enabled=0
retries=5
timeout=10
- この記事のキーワード