CentOS
YUM 또는 DNF Repository 추가 방법
AndrewJ
2022. 6. 22. 10:27
반응형
긴 설명보다는 아래 예제를 보면서 따라하는 것이 좋을 듯~~~
$ cd /etc/yum.repos.d/
$ cat << EOF > my-example.repo
[rhel-8-for-x86_64-baseos-rpms]
name=rhel-8-for-x86_64-baseos-rpms
baseurl=http://10.10.12.10:8080/8-4/rhel-8-for-x86_64-baseos-rpms
enabled=1
gpgcheck=0
[rhel-8-for-x86_64-appstream-rpms]
name=rhel-8-for-x86_64-appstream-rpms
baseurl=http://10.10.12.10:8080/8-4/rhel-8-for-x86_64-appstream-rpms
enabled=1
gpgcheck=0
EOF
##
## 위와 같이 repository를 추가했다면, 잘 추가되었는지 repository list를 출력해본다.
##
## Case: yum 명령을 사용하는 경우
$ yum repolist
... 중간 생략 ...
rhel-8-for-x86_64-baseos-rpms
rhel-8-for-x86_64-appstream-rpms
... 중간 생략 ...
## Case: dnf 명령을 사용하는 경우
$ dnf clean all
$ dnf repolist
...