0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

CentOS 7 の標準リポジトリの更新

Posted at

バックアップ

cp -p /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.bak

♯ 変更

# CentOS-Base.repo
#
# The mirror system uses the connecting IP address of the client and the
# update status of each mirror to pick mirrors that are updated to and
# geographically close to the client. You should use this for CentOS updates
# unless you are manually picking other mirrors.
#
# If the mirrorlist= does not work for you, as a fall back you can try the
# remarked out baseurl= line instead.
#
#
[base]
name=CentOS-$releasever - Base
#mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=os&infra=$infra
    ※ 冒頭に # を記載し、mirrorlist 行をコメントアウトします。
baseurl=http://vault.centos.org/centos/$releasever/os/$basearch/
    ※ 冒頭の # を削除のうえ、参照先サーバーを vault.centos.org に変更します。
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7

#released updates
[updates]
name=CentOS-$releasever - Updates
#mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=updates&infra=$infra
    ※ 冒頭に # を記載し、mirrorlist 行をコメントアウトします。
baseurl=http://vault.centos.org/centos/$releasever/updates/$basearch/
    ※ 冒頭の # を削除のうえ、参照先サーバーを vault.centos.org に変更します。
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7

#additional packages that may be useful
[extras]
name=CentOS-$releasever - Extras
#mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=extras&infra=$infra
    ※ 冒頭に # を記載し、mirrorlist 行をコメントアウトします。
baseurl=http://vault.centos.org/centos/$releasever/extras/$basearch/
    ※ 冒頭の # を削除のうえ、参照先サーバーを vault.centos.org に変更します。
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7

#additional packages that extend functionality of existing packages
[centosplus]
name=CentOS-$releasever - Plus
#mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=centosplus&infra=$infra
    ※ 冒頭に # を記載し、mirrorlist 行をコメントアウトします。
baseurl=http://vault.centos.org/centos/$releasever/centosplus/$basearch/
    ※ 冒頭の # を削除のうえ、参照先サーバーを vault.centos.org に変更します。
gpgcheck=1
enabled=0
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7

キャッシュクリア

yum clean all

確認

yum repolist

エラーが出なければOK

0
0
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
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?