Redhat7 에서 daum repository사용하기
Redhat은 등록하지 않으면 yum을 사용할 수 없다.
기본 repo를 다음(daum)으로 바꿔서 사용가능하다.
*아래 경로에 기본 redhat.repo를 지우거나 이름변경
[root@localhost yum.repos.d]# mv redhat.repo redhat.repo.org
[root@localhost yum.repos.d]# ls -sla
합계 16
0 drwxr-xr-x. 2 root root 29 2월 7 09:21 .
12 drwxr-xr-x. 144 root root 8192 2월 7 09:12 ..
4 -rw-r--r--. 1 root root 358 2월 8 2018 redhat.repo.org
*daum.repo 생성
[root@localhost yum.repos.d]# vi daum.repo
[base]
name=CentOS-$releasever - Base
baseurl=http://ftp.daum.net/centos/7/os/$basearch/
gpgcheck=1
gpgkey=http://ftp.daum.net/centos/RPM-GPG-KEY-CentOS-7
[updates]
name=CentOS-$releasever - Updates
baseurl=http://ftp.daum.net/centos/7/updates/$basearch/
gpgcheck=1
gpgkey=http://ftp.daum.net/centos/RPM-GPG-KEY-CentOS-7
[extras]
name=CentOS-$releasever - Extras
baseurl=http://ftp.daum.net/centos/7/extras/$basearch/
gpgcheck=1
gpgkey=http://ftp.daum.net/centos/RPM-GPG-KEY-CentOS-7
[centosplus]
name=CentOS-$releasever - Plus
baseurl=http://ftp.daum.net/centos/7/centosplus/$basearch/
gpgcheck=1
gpgkey=http://ftp.daum.net/centos/RPM-GPG-KEY-CentOS-7
*기존 repo clean
[root@localhost yum.repos.d]# yum clean all
Loaded plugins: langpacks, product-id, search-disabled-repos, subscription-manager
This system is not registered with an entitlement server. You can use subscription-manager to register.
Cleaning repos: base centosplus extras updates
Cleaning up everything
Maybe you want: rm -rf /var/cache/yum, to also free up space taken by orphaned data from disabled or removed repos
*repo 갱신
[root@localhost yum.repos.d]# yum repolist all
Loaded plugins: langpacks, product-id, search-disabled-repos, subscription-manager
This system is not registered with an entitlement server. You can use subscription-manager to register.
base | 3.6 kB 00:00:00
centosplus | 3.4 kB 00:00:00
extras | 3.4 kB 00:00:00
updates | 3.4 kB 00:00:00
(1/5): base/x86_64/group_gz | 166 kB 00:00:00
(2/5): extras/x86_64/primary_db | 156 kB 00:00:00
(3/5): centosplus/x86_64/primary_db | 1.2 MB 00:00:01
(4/5): base/x86_64/primary_db | 6.0 MB 00:00:01
(5/5): updates/x86_64/primary_db | 2.4 MB 00:00:02
repo id repo name status
base/x86_64 CentOS-7Server - Base enabled: 10,019
centosplus/x86_64 CentOS-7Server - Plus enabled: 37
extras/x86_64 CentOS-7Server - Extras enabled: 322
updates/x86_64 CentOS-7Server - Updates enabled: 1,057
repolist: 11,435
[root@localhost yum.repos.d]#
/etc/yum/pluginconf.d# vi subscription-manager.conf
[main]
enabled=0
/etc/yum/pluginconf.d# yum repolist all
Loaded plugins: langpacks, product-id, search-disabled-repos
repo id repo name status
base/x86_64 CentOS-7Server - Base enabled: 10,019
centosplus/x86_64 CentOS-7Server - Plus enabled: 37
extras/x86_64 CentOS-7Server - Extras enabled: 322
updates/x86_64 CentOS-7Server - Updates enabled: 1,057
repolist: 11,435
*추가로 필수인 EPEL 리포지터리도 추가해주자.
RHEL7 EPEL 리포지터리
rpm -Uvh https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
RHEL6 EPEL 리포지터리
rpm -Uvh http://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm
RHEL5 EPEL 리포지터리
rpm -Uvh http://dl.fedoraproject.org/pub/epel/5/x86_64/epel-release-5-4.noarch.rpm