728x90
CentOS 8 미러 서버용 repo(CentOS-Base.repo) 파일
- CentOS-Base.repo 편집
vim /etc/yum.repos.d/CentOS-Base.repo
# 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.
#
#
[BaseOS]
name=CentOS-$releasever - Base
#mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=BaseOS&infra=$infra
baseurl=https://vault.centos.org/$contentdir/$releasever/BaseOS/$basearch/os/
gpgcheck=1
enabled=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-centosofficial
- CentOS-AppStream.repo 편집
vim /etc/yum.repos.d/CentOS-AppStream.repo
# CentOS-AppStream.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.
#
#
[AppStream]
name=CentOS-$releasever - AppStream
#mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=AppStream&infra=$infra
baseurl=https://vault.centos.org/$contentdir/$releasever/AppStream/$basearch/os/
gpgcheck=1
enabled=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-centosofficial
파일을 저장한 후 yum을 업데이트하면 CentOS 8 미러 서버에서 패키지를 다운로드할 수 있습니다.
sed 명령어를 사용하여 편집하기
sed -i -E 's/^(#mirrorlist)/mirrorlist/g' /etc/yum.repos.d/CentOS-*
sed -i 's|#baseurl=http://mirror.centos.org|baseurl=https://vault.centos.org|g' /etc/yum.repos.d/CentOS-*
728x90
'리눅스' 카테고리의 다른 글
L4 로드 밸런서와 L7 로드 밸런서의 주요 기능 및 차이점 (0) | 2023.10.12 |
---|---|
프록시(Proxy)란 (0) | 2023.10.12 |
[draft] PHP의 공유 라이브러리와 정적 라이브러리의 차이점과 주요 사용 사례 (0) | 2023.10.10 |
MongoDB 클러스터를 Replica Set으로 구성하는 방법 (0) | 2023.10.07 |
RabbitMQ에서 관리자 계정을 초기화하고 재설정하는 방법 (0) | 2023.10.05 |