OS 환경 : Oracle Linux 8.4 (64bit)
방법 : Oracle Linux 8에서 로컬 yum dnf repository 설정하기
본문에서는 Linux 8 버전에 로컬 repository 를 설정하는 방법을 설명함
cd 파일 서버에 마운트
cd 파일을 해당 디렉토리로 복사(선택)
(내 cd 파일 경로 /run/media/root/OL-8-4-0-BaseOS-x86_64)
1
|
# cp -r /run/media/root/OL-8-4-0-BaseOS-x86_64/* /localrepo/
|
기존 Online Repository 설정 파일 이름 변경
1
2
3
4
5
6
7
8
9
|
# cd /etc/yum.repos.d/
# ls -al
total 20
drwxr-xr-x. 2 root root 55 Oct 15 2021 .
drwxr-xr-x. 147 root root 8192 Oct 23 00:21 ..
-rw-r--r--. 1 root root 2251 May 19 2021 oracle-linux-ol8.repo
-rw-r--r--. 1 root root 470 May 20 2021 uek-ol8.repo
# mv oracle-linux-ol8.repo oracle-linux-ol8.repobak
# mv uek-ol8.repo uek-ol8.repobak
|
새로운 로컬 repository 설정
1
2
3
4
5
6
7
8
9
10
11
12
|
# vi /etc/yum.repos.d/local.repo
[OEL8DVD_BaseOS]
name=OEL8DVD_BaseOS
baseurl=file:///localrepo/BaseOS/
enabled=1
gpgcheck=0
[OEL8DVD_AppStream]
name=OEL8DVD_AppStream
baseurl=file:///localrepo/AppStream/
enabled=1
gpgcheck=0
|
또는
localrepo 폴더로 복제하지 않고, cd 마운트 경로를 입력해줘도됨
새로운 로컬 repository 설정
1
2
3
4
5
6
7
8
9
10
11
12
|
# vi /etc/yum.repos.d/local.repo
[OEL8DVD_BaseOS]
name=OEL8DVD_BaseOS
baseurl=file:///run/media/root/OL-8-4-0-BaseOS-x86_64/BaseOS/
enabled=1
gpgcheck=0
[OEL8DVD_AppStream]
name=OEL8DVD_AppStream
baseurl=file:///run/media/root/OL-8-4-0-BaseOS-x86_64/AppStream/
enabled=1
gpgcheck=0
|
dnf, yum 저장소 clean
1
2
3
4
|
# dnf clean all
0 files removed
# yum clean all
0 files removed
|
repo list 불러오기
1
2
3
4
|
# yum repolist
repo id repo name
OEL8DVD_AppStream OEL8DVD_AppStream
OEL8DVD_BaseOS OEL8DVD_BaseOS
|
dnf 패키지 설치 테스트
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
|
# dnf -y install ruby
OEL8DVD_BaseOS 187 MB/s | 3.3 MB 00:00
OEL8DVD_AppStream 206 MB/s | 6.8 MB 00:00
Last metadata expiration check: 0:00:01 ago on Wed 23 Oct 2024 12:58:23 AM KST.
Dependencies resolved.
=====================================================================================================================================================================
Package Architecture Version Repository Size
=====================================================================================================================================================================
Installing:
ruby x86_64 2.5.5-106.module+el8.3.0+7756+e45777e9 OEL8DVD_AppStream 86 k
Installing dependencies:
ruby-irb noarch 2.5.5-106.module+el8.3.0+7756+e45777e9 OEL8DVD_AppStream 102 k
ruby-libs x86_64 2.5.5-106.module+el8.3.0+7756+e45777e9 OEL8DVD_AppStream 2.9 M
rubygem-json x86_64 2.1.0-106.module+el8.3.0+7756+e45777e9 OEL8DVD_AppStream 90 k
rubygem-psych x86_64 3.0.2-106.module+el8.3.0+7756+e45777e9 OEL8DVD_AppStream 95 k
Installing weak dependencies:
rubygem-bigdecimal x86_64 1.3.4-106.module+el8.3.0+7756+e45777e9 OEL8DVD_AppStream 97 k
rubygem-did_you_mean noarch 1.2.0-106.module+el8.3.0+7756+e45777e9 OEL8DVD_AppStream 81 k
rubygem-io-console x86_64 0.4.6-106.module+el8.3.0+7756+e45777e9 OEL8DVD_AppStream 66 k
rubygem-openssl x86_64 2.1.2-106.module+el8.3.0+7756+e45777e9 OEL8DVD_AppStream 189 k
rubygem-rdoc noarch 6.0.1-106.module+el8.3.0+7756+e45777e9 OEL8DVD_AppStream 486 k
rubygems noarch 2.7.6.2-106.module+el8.3.0+7756+e45777e9 OEL8DVD_AppStream 308 k
Enabling module streams:
ruby 2.5
Transaction Summary
=====================================================================================================================================================================
Install 11 Packages
Total size: 4.5 M
Installed size: 14 M
Downloading Packages:
Running transaction check
Transaction check succeeded.
Running transaction test
Transaction test succeeded.
Running transaction
Preparing : 1/1
Installing : ruby-libs-2.5.5-106.module+el8.3.0+7756+e45777e9.x86_64 1/11
Installing : ruby-irb-2.5.5-106.module+el8.3.0+7756+e45777e9.noarch 2/11
Installing : rubygem-bigdecimal-1.3.4-106.module+el8.3.0+7756+e45777e9.x86_64 3/11
Installing : rubygem-did_you_mean-1.2.0-106.module+el8.3.0+7756+e45777e9.noarch 4/11
Installing : rubygem-io-console-0.4.6-106.module+el8.3.0+7756+e45777e9.x86_64 5/11
Installing : rubygem-json-2.1.0-106.module+el8.3.0+7756+e45777e9.x86_64 6/11
Installing : rubygem-openssl-2.1.2-106.module+el8.3.0+7756+e45777e9.x86_64 7/11
Installing : rubygem-psych-3.0.2-106.module+el8.3.0+7756+e45777e9.x86_64 8/11
Installing : rubygem-rdoc-6.0.1-106.module+el8.3.0+7756+e45777e9.noarch 9/11
Installing : rubygems-2.7.6.2-106.module+el8.3.0+7756+e45777e9.noarch 10/11
Installing : ruby-2.5.5-106.module+el8.3.0+7756+e45777e9.x86_64 11/11
Running scriptlet: ruby-2.5.5-106.module+el8.3.0+7756+e45777e9.x86_64 11/11
/sbin/ldconfig: /etc/ld.so.conf.d/kernel-5.4.17-2102.201.3.el8uek.x86_64.conf:6: hwcap directive ignored
Verifying : ruby-2.5.5-106.module+el8.3.0+7756+e45777e9.x86_64 1/11
Verifying : ruby-irb-2.5.5-106.module+el8.3.0+7756+e45777e9.noarch 2/11
Verifying : ruby-libs-2.5.5-106.module+el8.3.0+7756+e45777e9.x86_64 3/11
Verifying : rubygem-bigdecimal-1.3.4-106.module+el8.3.0+7756+e45777e9.x86_64 4/11
Verifying : rubygem-did_you_mean-1.2.0-106.module+el8.3.0+7756+e45777e9.noarch 5/11
Verifying : rubygem-io-console-0.4.6-106.module+el8.3.0+7756+e45777e9.x86_64 6/11
Verifying : rubygem-json-2.1.0-106.module+el8.3.0+7756+e45777e9.x86_64 7/11
Verifying : rubygem-openssl-2.1.2-106.module+el8.3.0+7756+e45777e9.x86_64 8/11
Verifying : rubygem-psych-3.0.2-106.module+el8.3.0+7756+e45777e9.x86_64 9/11
Verifying : rubygem-rdoc-6.0.1-106.module+el8.3.0+7756+e45777e9.noarch 10/11
Verifying : rubygems-2.7.6.2-106.module+el8.3.0+7756+e45777e9.noarch 11/11
Installed:
ruby-2.5.5-106.module+el8.3.0+7756+e45777e9.x86_64 ruby-irb-2.5.5-106.module+el8.3.0+7756+e45777e9.noarch
ruby-libs-2.5.5-106.module+el8.3.0+7756+e45777e9.x86_64 rubygem-bigdecimal-1.3.4-106.module+el8.3.0+7756+e45777e9.x86_64
rubygem-did_you_mean-1.2.0-106.module+el8.3.0+7756+e45777e9.noarch rubygem-io-console-0.4.6-106.module+el8.3.0+7756+e45777e9.x86_64
rubygem-json-2.1.0-106.module+el8.3.0+7756+e45777e9.x86_64 rubygem-openssl-2.1.2-106.module+el8.3.0+7756+e45777e9.x86_64
rubygem-psych-3.0.2-106.module+el8.3.0+7756+e45777e9.x86_64 rubygem-rdoc-6.0.1-106.module+el8.3.0+7756+e45777e9.noarch
rubygems-2.7.6.2-106.module+el8.3.0+7756+e45777e9.noarch
Complete!
|
정상적으로 동작함
참고
os 이미지 패키지 경로 중 BaseOS와 AppStream 차이
BaseOS: 운영 체제의 필수 구성 요소를 제공하며, 핵심 시스템 기능을 담당함
AppStream: 추가적인 애플리케이션과 도구들을 제공하며, 사용자가 선택적으로 설치하여 시스템을 확장할 수 있음
참조 :
https://positivemh.tistory.com/470
https://keungs.tistory.com/20
'Linux, Unix > Tip' 카테고리의 다른 글
Oracle Linux 8 nfs 서버 구축 가이드 (0) | 2024.11.26 |
---|---|
Oracle Linux 8 프로세스 강제 종료 스크립트 (0) | 2024.04.19 |
Oracle Linux 8 더미 파일 대량 생성 및 대량 삭제 (0) | 2024.03.14 |
Oracle Linux 6 서버 cpu, memory 사용량 확인 (0) | 2023.09.06 |
Oracle Linux 7 특정 날짜에 생성(수정)된 파일 개수 확인 (0) | 2023.07.05 |