티스토리 뷰
안녕하세요!
CentOS 6 버전은 2020년 11월 30일 지원이 종료되었습니다.
yum을 사용하기 위해서는 CentOS-Base.repo 파일의 내용 수정이 필요합니다.
아래 두 가지 방법 중 한 가지 택하여 적용해 주시면 됩니다.
첫 번째 방법 : sed 명령어를 이용하여 간단하고 빠르게 쉘에서 적용하기
[root@toddle-toddle ~]# cp /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.old
[root@toddle-toddle ~]# sed -i s/mirrorlist=http/#mirrorlist=http/g /etc/yum.repos.d/CentOS-Base.repo
[root@toddle-toddle ~]# sed -i s/#baseurl=http/baseurl=http/g /etc/yum.repos.d/CentOS-Base.repo
[root@toddle-toddle ~]# sed -i s/mirror.centos.org/vault.centos.org/g /etc/yum.repos.d/CentOS-Base.repo
두 번째 방법 : 파일 안의 내용을 수정하여 적용하기
1.
[root@toddle-toddle ~]# cp /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.old
: 기존의 CentOS-Base.repo 파일의 원본을 CentOS-Base.repo.old로 변경해 줍니다.
2.
[root@toddle-toddle ~]# vi /etc/yum.repos.d/CentOS-Base.repo
: vi를 열어서 /etc/yum.repos.d/CentOS-Base.repo 파일에 아래 내용 전체를 덮어 씌어줍니다.
* vi 편집기를 열어서 gg를 눌러주시면 첫 줄로 이동하며 dG를 눌러주시면 내용이 전체 삭제가 됩니다.
------ vi /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.
#
#
[base]
name=CentOS-$releasever - Base
#mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=os&infra=$infra
baseurl=http://vault.centos.org/centos/$releasever/os/$basearch/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6
#released updates
[updates]
name=CentOS-$releasever - Updates
#mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=updates&infra=$infra
baseurl=http://vault.centos.org/centos/$releasever/updates/$basearch/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6
#additional packages that may be useful
[extras]
name=CentOS-$releasever - Extras
#mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=extras&infra=$infra
baseurl=http://vault.centos.org/centos/$releasever/extras/$basearch/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6
#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
baseurl=http://vault.centos.org/centos/$releasever/centosplus/$basearch/
gpgcheck=1
enabled=0
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6
#contrib - packages by Centos Users
[contrib]
name=CentOS-$releasever - Contrib
#mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=contrib&infra=$infra
baseurl=http://vault.centos.org/centos/$releasever/contrib/$basearch/
gpgcheck=1
enabled=0
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6
------ vi /etc/yum.repos.d/CentOS-Base.repo ------

'Linux' 카테고리의 다른 글
[UBUNTU 22.04] OpenSSL 3.0.7 설치 (0) | 2022.11.04 |
---|---|
USB 하나로 강력한 멀티 부팅 USB 만들어 OS 설치하기 [VENTOY] (0) | 2021.07.13 |
[CentOS7/리눅스] 잃어버린 패스워드 싱글모드 부팅하여 크랙 하기 (0) | 2021.06.21 |
[CentOS7 따라만 하세요] #3. 설치 후 기본 설정 세팅하기 (1) | 2021.06.11 |
[CentOS7 따라만 하세요] #2. 네트워크 설정 및 SSH 접속하기 (0) | 2021.06.11 |
- Total
- Today
- Yesterday
- 리그오브레전드
- putty
- 3.0.7
- 재미있는
- centos7
- xtables
- 롤
- 1.19.4
- 리눅스
- CVE-2022-3786
- mysql5.1
- 3.0.0
- 젠지
- cmatrix
- 재미
- ssh
- iptables
- LCK
- centos
- Linux
- CVE-2022-3602
- CentOS6
- 3.0.4
- asciiquarium
- drx
- php
- 해외차단
- xtables-addons-2.11
- T1
- tcping
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | ||||||
2 | 3 | 4 | 5 | 6 | 7 | 8 |
9 | 10 | 11 | 12 | 13 | 14 | 15 |
16 | 17 | 18 | 19 | 20 | 21 | 22 |
23 | 24 | 25 | 26 | 27 | 28 |