본문 바로가기

Server관련

CentOS6 Repo지원종료 설치 후 yum 문제해결

반응형

 

개인학습이나 소규모 서버로 아직은 충분!!!

 

100인이상 중소기업 전산서버를 많이 사용하는 기업은 보안관련되서 방화벽이나 최신 커널 업데이트를 신경 써야되서
리눅스서버 버전을 생각해야되지만 내부에서만 사용하는 리눅스 서버(파일서버나 내부 웹ESP서버등)는 크게 신경쓸게 없고 그냥 안전하게만
돌아가기 위해 예전버전을 사용해도 충분하다고 생각되기 때문에 예전 리눅스 버전 설치를 하면 더 이상 지원하지않아 변경(수정)을 해야하는 상황이 있기때문에

계속사용하지 않으면 잊어버리기 때문에 한번 더 상기 시키기 위해 포스팅을 합니다.

구글링 이나 검색으로 들어와서 보신다면 아!! 그래 이거지 하고 기억을 되살리면 그걸로 충분합니다 :)

 

CentOS 6 이하 로 설치 하고 오류들

 

CentOS 버전확인하는 방법


현재사용하는 버전은 6.10입니다.

[root@localhost /]# grep . /etc/*-release
/etc/centos-release:CentOS release 6.10 (Final)

윈도우도 마찬가지고 리눅스도 최초 운영체제를 설치 하면 드라이버나 설치 되어 있는 운영체제 및 기타 소프트웨어 업데이트를 해줘야합니다.

 

[root@localhost /]# yum update
Loaded plugins: fastestmirror, refresh-packagekit, security
Setting up Update Process
YumRepo Error: All mirror URLs are not using ftp, http[s] or file.
 Eg. Invalid release/repo/arch combination/
removing mirrorlist with no valid mirrors: /var/cache/yum/x86_64/6/base/mirrorlist.txt
Error: Cannot retrieve repository metadata (repomd.xml) for repository: base. Please verify its path and try again

YumRepo Error: All mirror URLs are not using ftp, http[s] or file.

다음과 같이 에러메시지가 출력됩니다.

 

CentOS 6 Update Repo(CentOS6 mirrorlist)
CentOS6 공식지원 종료, [종료일 2020년 11월 30일]
벌써 3년전쯤입니다.

 

지원이 종료되도 인간은 어떻게든 찾습니다. 방법을....
yum을 한번도 안했기 떄문에 저장소 생성해줍니다.

 

리눅스 Yum repolist

[root@localhost /]# yum repolist
Loaded plugins: fastestmirror, refresh-packagekit, security
Determining fastest mirrors
YumRepo Error: All mirror URLs are not using ftp, http[s] or file.
 Eg. Invalid release/repo/arch combination/
removing mirrorlist with no valid mirrors: /var/cache/yum/x86_64/6/base/mirrorlist.txt
YumRepo Error: All mirror URLs are not using ftp, http[s] or file.
 Eg. Invalid release/repo/arch combination/
removing mirrorlist with no valid mirrors: /var/cache/yum/x86_64/6/extras/mirrorlist.txt
YumRepo Error: All mirror URLs are not using ftp, http[s] or file.
 Eg. Invalid release/repo/arch combination/
removing mirrorlist with no valid mirrors: /var/cache/yum/x86_64/6/updates/mirrorlist.txt
repo id                                                    repo name                                                             status
base                                                       CentOS-6 - Base                                                       0
extras                                                     CentOS-6 - Extras                                                     0
updates                                                    CentOS-6 - Updates                                                    0
repolist: 0

 

하지만 역시나 에러가 나죠 종료가 되었기떄문에

YumRepo Error: All mirror URLs are not using ftp, http[s] or file.

 

 

웬만해선 64비트지만 그래도 한번 더 확인하면 좋으니

 

리눅스 비트 확인하기

[root@localhost /]# getconf LONG_BIT

 

설치된 리눅스가 32비트냐 64비트냐 확인

 

단순하게 64 라고 출력됩니다..

 

32비트라면

echo "https://vault.centos.org/6.10/os/i386/" > /var/cache/yum/i386/6/base/mirrorlist.txt
echo "http://vault.centos.org/6.10/extras/i386/" > /var/cache/yum/i386/6/extras/mirrorlist.txt
echo "http://vault.centos.org/6.10/updates/i386/" > /var/cache/yum/i386/6/updates/mirrorlist.txt

 

 

오늘의 핵심

CentOS6 공식지원 종료된 저장소 변경하기

64비트라면

echo "https://vault.centos.org/6.10/os/x86_64/" > /var/cache/yum/x86_64/6/base/mirrorlist.txt
echo "http://vault.centos.org/6.10/extras/x86_64/" > /var/cache/yum/x86_64/6/extras/mirrorlist.txt
echo "http://vault.centos.org/6.10/updates/x86_64/" > /var/cache/yum/x86_64/6/updates/mirrorlist.txt

 

위에서 64비트로 확인 되었기 때문에

한줄씩 총 3개를 복사 붙혀넣기 해서 엔터 치고 입력합니다.

비트에 맞게 한줄씩 입력해줍니다.

 

입력해도 반응은 없어요...

3줄입력하고 다시 repolist 불러옵니다.

 

yum 캐시삭제
# yum clean all 해도 됩니다. 생략해도 되고
설치를 하고 yum 사용을 하지 않은 리눅스는 굳이 clean all 할 필요가 없기때문에

 

 

[root@localhost /]# yum repolist
Loaded plugins: fastestmirror, refresh-packagekit, security
Loading mirror speeds from cached hostfile
base                                                                                                                      | 3.7 kB
base/primary_db                                                                                                           | 4.7 MB
extras                                                                                                                    | 3.4 kB
extras/primary_db                                                                                                         |  29 kB
updates                                                                                                                   | 3.4 kB
updates/primary_db                                                                                                        |  12 MB
repo id                                                         repo name
base                                                            CentOS-6 - Base
extras                                                          CentOS-6 - Extras
updates                                                         CentOS-6 - Updates
repolist: 7,953

몇분전에 했던 에러메세지는 출력 안되고 뭔가 정상적으로 된 것 같네요

에러메시지 빨간색 폰트가 없어 깔끔합니다.

 

이제 목표였던 yum update를 해줍니다.

 

[root@localhost /]# yum update
Loaded plugins: fastestmirror, refresh-packagekit, security
Setting up Update Process
Loading mirror speeds from cached hostfile
Resolving Dependencies

 

중간중간에 설치 할거냐 라고 물어볼땐 y 로 대답해주면 됩니다.

 

하지만 마지막

Failed:
  java-1.7.0-openjdk.x86_64 1:1.7.0.181-2.6.14.10.el6                               java-1.7.0-openjdk.x86_64 1:1.7.0.261-2.6.22.1.el6_

 

java-1.7.0-openjdk.x86_64 1:1.7.0.181-2.6.14.10.el6 라는 놈이 정상적으로 업데이트 되질 않네요

 

여러가지 문제가 있겠죠

 

java에서 더이상 업데이트 지원을 안하던지.....등등

 

그냥 제일 단순하게 java-1.7.0-openjdk를 제거 해주고 더 높은버전을 설치 해줍니다.

 

서버를 운영하다가 java 를 사용하게 될때 또 다른 방법등으로(수동설치) 업데이트 또 해주면 되니깐

 

[root@localhost /]# yum remove java-1.7.0-openjdk
Loaded plugins: fastestmirror, refresh-packagekit, security
Setting up Remove Process
Resolving Dependencies
--> Running transaction check
---> Package java-1.7.0-openjdk.x86_64 1:1.7.0.181-2.6.14.10.el6 will be erased
--> Finished Dependency Resolution

Running Transaction
  Erasing    : 1:java-1.7.0-openjdk-1.7.0.181-2.6.14.10.el6.x86_64                                                                 1/1
  Verifying  : 1:java-1.7.0-openjdk-1.7.0.181-2.6.14.10.el6.x86_64                                                                 1/1

Removed:
  java-1.7.0-openjdk.x86_64 1:1.7.0.181-2.6.14.10.el6

Complete!

 

 

정상적으로 제거 해주고

 

  java-1.7.0-openjdk 보다 한단계 높은 버전 java-1.8.0-openjdk 으로 수동 설치해 줍니다.

 

 

[root@localhost /]# yum install -y java-1.8.0-openjdk
Loaded plugins: fastestmirror, refresh-packagekit, security
Setting up Install Process
Loading mirror speeds from cached hostfile
Resolving Dependencies
--> Running transaction check
---> Package java-1.8.0-openjdk.x86_64 1:1.8.0.275.b01-0.el6_10 will be installed
--> Processing Dependency: java-1.8.0-openjdk-headless = 1:1.8.0.275.b01-0.el6_10 for package: 1:java-1.8.0-openjdk-1.8.0.275.b01-0.el6_10.x86_64
--> Running transaction check
---> Package java-1.8.0-openjdk-headless.x86_64 1:1.8.0.275.b01-0.el6_10 will be installed
--> Finished Dependency Resolution

 

 

 

서버 명령어를 넣을때 언제나 기분 좋은 저 Complete!

 

 

 

이제 최종적으로 다시 yum update 해봅시다!!

 

[root@localhost /]# yum update
Loaded plugins: fastestmirror, refresh-packagekit, security
Setting up Update Process
Loading mirror speeds from cached hostfile
No Packages marked for Update

더이상 업데이트 할게 없다!!

 

이제 yum 업데이트 해도 업데이트 할거 없다 즉 모두가 최신버전이다 라고 합니다.

 

이렇게 해서

 

CentOS 6 Update Repo(CentOS6 mirrorlist) 공식 지원 종료가 되었는데

그럼 사용 못하나에 관련되어서 수동으로 변경 해주고 계속 사용해줄수 있도록 알아봤습니다.

 

 

반응형

'Server관련' 카테고리의 다른 글

Windows Server 2019 설치 오류  (0) 2023.10.17
CentOS 8 repo 오류  (2) 2023.04.26
CentOS 6 CentOS 7 명령어차이  (2) 2023.04.12