리눅스 환경 세팅할 때 항상 Yum 설치가 한번에 되지 않아서 정리해본다.
처음 리눅스를 설치하고
아래와 같이 yum을 사용하면
yum update
아래와 같은 메세지가 뜨면서 fix 코멘트가 나온다.
14: curl#6 - "Could not resolv host:mirrorlist.centos.org; 알 수 없는 오류"
...
1. Contact the upstream for the repository and get them to fix the problem
...
이때 딱 두가지만 설정하면 된다.
# vi /etc/resolv.conf
nameserver 8.8.8.8
해당파일에서
ONBOOT를 yes로 바꾸고
DNS 설정이 없는 경우 추가 해준다.
# vi /etc/sysconfig/network-script/ifcfg-enp0s3
...
ONBOOT=yes
DNS=8.8.8.8
# systemctl restart network
이제 다시 yum update 명령어를 수행하면 잘된다~!