728x90
반응형
redhat6.6에서 yum 안될때 하는 방법
[root@localhost yum.repos.d]# wget http://public-yum.oracle.com/public-yum-ol6.repo
--2015-12-03 20:17:32-- http://public-yum.oracle.com/public-yum-ol6.repo
Resolving public-yum.oracle.com... 23.67.53.113, 23.67.53.120
Connecting to public-yum.oracle.com|23.67.53.113|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 5772 (5.6K) [text/plain]
Saving to: “public-yum-ol6.repo”
100%[=====================================================================>] 5,772 --.-K/s in 0s
2015-12-03 20:17:33 (300 MB/s) - “public-yum-ol6.repo” saved [5772/5772]
[root@localhost yum.repos.d]# wget http://springdale.math.ias.edu/data/puias/6/x86_64/os/RPM-GPG-KEY-puias
--2015-12-03 21:07:22-- http://springdale.math.ias.edu/data/puias/6/x86_64/os/RPM-GPG-KEY-puias
Resolving springdale.math.ias.edu... 192.16.204.192
Connecting to springdale.math.ias.edu|192.16.204.192|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 1703 (1.7K) [text/plain]
Saving to: “RPM-GPG-KEY-puias”
yu
100%[=====================================================================>] 1,703 --.-K/s in 0s
2015-12-03 21:07:23 (135 MB/s) - “RPM-GPG-KEY-puias” saved [1703/1703]
yum 으로 패키지 설치 시 아래와같은 오류나올때.
GPG key retrieval failed: [Errno 14] Could not open/read file:///etc/pki/rpm-gpg/RPM-GPG-KEY-oracle
아래방법으로 해결( install -- nogpgcheck 입력)
yum install --nogpgcheck 패키지명 입력
cd /etc/pki/rpm-gpg
wget http://springdale.math.ias.edu/data/puias/6/x86_64/os/RPM-GPG-KEY-puias
--------------------------
기본 값으로 설치된 RHEL에서는 yum 기능을 사용할 수가 없음
Redhat 공식 repository에 접근할 수 없는 이유 때문
차선책으로 RHEL의 Clone 격인 CentOS의 repository를 사용할 수 있음
두 리눅스는 커널이 똑같기 때문에 rpm을 사용하는데 있어 문제를 야기시키지 않음
1. repository 정보 변경
<root@linux># cd /etc/yum.repos.d
<root@linux># mv rhel-debuginfo.repo rhel-debuginfo.repo.bak
<root@linux># vi rhel-debuginfo.repo
[base]
name=CentOS-$releasever - Base
baseurl=http://mirror.centos.org/centos/5/os/$basearch/
gpgcheck=1
#released updates
[update]
name=CentOS-$releasever - Updates
baseurl=http://mirror.centos.org/centos/5/updates/$basearch/
gpgcheck=1
:wq
2. repository 인증 key 불러오기
<root@linux>##rpm --import http://mirror.centos.org/centos/5/os/x86_64/RPM-GPG-KEY-CentOS-5
3. yum 사용 가능 확인
<root@linux># yum list
yum update / yum install 등을 사용 가능
redhat 에서 yum 사용 불가 상용 프로그램이니 돈내고 사용을 해야 지원
그렇지만 쌍둥이 centos 가 있다 이를 이용해서 yum을 사용
#cd /etc/yum.repos.d
#vi rhel-debuginfo.repo 수정후 안에 있는 데이터 삭제 아래내용으로 대체
[base]
name=CentOS-$releasever - Base
baseurl=http://mirror.centos.org/centos/5/os/$basearch/
gpgcheck=1
#released updates
[update]
name=CentOS-$releasever - Updates
baseurl=http://mirror.centos.org/centos/5/updates/$basearch/
gpgcheck=1
사용할 버전에 따라서
#rpm --import http://mirror.centos.org/centos/5/os/x86_64/RPM-GPG-KEY-CentOS-5 64bit
#rpm --import http://mirror.centos.org/centos/5/os/i386/RPM-GPG-KEY-CentOS-5 32bit
이와 같이 버전6으로 할려면 경로로 가서 key 값만 가져오게 해주면 된다.
#yum list
해주면 yum을 정상적으로 사용 가능하다.
error
# yum update
Loaded plugins: rhnplugin, security
This system is not registered with RHN.
RHN support will be disabled.
http://ftp.daum.net/centos/5Server/addons/x86_64/repodata/repomd.xml: [Errno 14] HTTP Error 404: Not Found
Trying other mirror.
Error: Cannot retrieve repository metadata (repomd.xml) for repository: addons. Please verify its path and try again
위와 같이 에러가 발생하게 되면
url 주소를 최신버전 5.6 or 6.4 이렇게 절대 값을 입력
baseurl=http://mirror.centos.org/centos/5.6/os/$basearch/
yum 설치시 에러나면 아래 명령어실행
rpm --import http://mirror.centos.org/centos/6/os/x86_64/RPM-GPG-KEY-CentOS-6
Error: database disk image is malformed
위와 같이 에러가 발생하면
#yum clean all
반응형
'와사비크래커 IT Tip > Linux' 카테고리의 다른 글
Linux Bonding 설정하기 (0) | 2017.11.28 |
---|---|
리눅스(Linux) 명령어 모음 (0) | 2017.11.28 |
hostname : 호스트 네임 (0) | 2017.11.19 |
netstat : 네트워크 관련 정보 (0) | 2017.11.19 |
nslookup : 도메인 네임서버 확인 (0) | 2017.11.19 |