리눅스

Total 331
Today 0
profile_image
슈퍼아이피
17-11-20 10:32 0개 16회
일반문서
[Linux/Redhat] 리눅스 yum repository CentOS로 변경

Redhat 에서 yum 사용 시 인증이 필요하다.

인증이 불가능하다면 repository 경로를 CentOS 로 변경해서 사용해야 한다.


해당 내용은 Redhat 6 기준이며, 버전이 다른 경우 해당 버전에 맞게 변경하여 입력한다.

ex) http://mirror.centos.org/centos/5/os/$baserch

    http://mirror.centos.org/centos/7/os/x86_64/RPM-GPG-KEY-CentOS-7



repository 변경

 



   # cd /etc/yum.repos.d/


   # vi rhel-debuginfo.repo


   [bash]

   name=CentOS-$releaserver Base

   baseurl=http://mirror.centos.org/centos/6/os/$baserch 

   gpgcheck=1

 

   [update]

   name=CentOS-$releaserver Updates

   baseurl=http://mirror.centos.org/centos/6/update/$baserch/ 

   gpgcheck=1


 



repository 인증키 불러오기 bit 에 맞는 버전별 명령어 실행



   rpm --import http://mirror.centos.org/centos/6/os/i386/RPM-GPG-KEY-CentOS-6

   # rpm --import http://mirror.centos.org/centos/6/os/x86_64/RPM-GPG-KEY-CentOS-6

 



 

yum 사용 가능 확인



   # yum list

   resource-agents-sap-hana.x86_64                    3.9.5-34.el6_8.2                     updates

   rest.i686                                          0.7.92-2.el6                         base

   rest.x86_64                                        0.7.92-2.el6                         base

   rest-devel.i686                                    0.7.92-2.el6                         base

   rest-devel.x86_64                                  0.7.92-2.el6                         base

   rgmanager.x86_64                                   3.0.12.1-26.el6                      base

   rhdb-utils.x86_64                                  8.4.0-3.el6                          base


   # yum clean all

   Loaded plugins: fastestmirror, security

   Cleaning repos: base extras updates

   Cleaning up Everything

   Cleaning up list of fastest mirrors




 

yum list 미 출력 시



   # yum clean metadata

   Loaded plugins: fastestmirror, security

   Cleaning repos: base extras updates

   0 metadata files removed

   0 sqlite files removed

   0 metadata files removed


   # yum clean all

   Loaded plugins: fastestmirror, security

   Cleaning repos: base extras updates

   Cleaning up Everything


   # yum list

   resource-agents-sap-hana.x86_64                    3.9.5-34.el6_8.2                     updates

   rest.i686                                          0.7.92-2.el6                         base

   rest.x86_64                                        0.7.92-2.el6                         base

   rest-devel.i686                                    0.7.92-2.el6                         base

   rest-devel.x86_64                                  0.7.92-2.el6                         base

   rgmanager.x86_64                                   3.0.12.1-26.el6                      base

   rhdb-utils.x86_64                                  8.4.0-3.el6                          base



 


bash 업데이트 및 정보 확인

 


   # yum update bash

   # yum list | grep bash

   # bash --version





해당 오류 발생 시, 혹은 도메인이 nslookup 으로 찾아지나 wget or yum 에서 찾지 못하는 경우

/etc/nsswitch.conf 수정



   # yum list

   Loaded plugins: katello, product-id, security, subscription-manager

   Updating certificate-based repositories.

   Unable to read consumer identity

   http://ftp.daum.net/centos/6Server/os/x86_64/repodata/repomd.xml: [Errno 4] IOError: <urlopen error (-2, 'Name

   \xed\x98\xb9\xec\x9d\x80\xec\x84\x9c\xeb\xb9\x84\xec\x8a\xa4\xeb\xa5\xbc\xec\x95\x8c\xec\x88\x98\xec\x97\x86\xec

   \x8a\xb5\xeb\x8b\x88\xeb\x8b\xa4')>


   # vi /etc/

   hosts:     db files nisplus nis dns

   hosts:      files dns





yum 업데이트 없이 패치만 다운로드


   # yum --downloadonly --downloaddir=/root install bash

 

댓글목록

등록된 댓글이 없습니다.