위로
아래
이유
yum이 외국의 주소를 사용하고 있어 접속이 오래 걸려서 time out 때문에 접속이 끊긴다
CentOS 7버전
/etc/resolv.conf 파일에 한국의 DNS 서버 입력
Search com
nameserver 8.8.8.8
nameserver 168.126.63.1
nameserver 164.124.101.2
vi /etc/yum.repos.d/CentOS-Base.repo
내용 수정
내용 확정
mirrorlist를 주석처리
baseurl 에서 주석 삭제
mirror.centos.org -> mirror.navercorp.com 또는 mirror.kakao.com
# 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://mirror.navercorp.com/centos/$releasever/os/$basearch/
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
baseurl=http://mirror.navercorp.com/centos/$releasever/updates/$basearch/
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
baseurl=http://mirror.navercorp.com/centos/$releasever/extras/$basearch/
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
baseurl=http://mirror.navercorp.com/centos/$releasever/centosplus/$basearch/
gpgcheck=1
enabled=0
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7
reboot
yum 사용 가능
yum 업데이트 후 사용
yum update
안 될 때
가끔 resolv.conf를 수정해도 계속 초기화될 때가 있다
NetworkManager가 계속 수정하는 것.
그럴 때는 /etc/sysconfig/network-scripts/ifcfg-ens192 파일을 직접 수정해줄 것
맨 아래 추가
DNS1=8.8.8.8
DNS2=168.126.63.1
DNS3=164.124.101.2
그리고 네트워크 재기동
systemctl restart network
systemctl restart NetworkManager
그 후에 yum update 하면 잘 실행된다