ISO 파일을 이용하여 local repository 구성방법
— 이강우 2025/05/30 05:16
ISO 파일을 모두 /repo 디렉토리로 복제했다고 가정하면 아래와 같은 디렉토리 구성이 되어있을것이다.
root@test-ubuntu24:/repo# ll total 68 drwxr-xr-x 8 root root 4096 May 30 05:04 ./ drwxr-xr-x 24 root root 4096 May 30 05:04 ../ dr-xr-xr-x 3 root root 4096 Jan 27 13:56 boot/ -r--r--r-- 1 root root 2048 Feb 16 22:49 boot.catalog dr-xr-xr-x 2 root root 4096 Feb 16 22:49 casper/ dr-xr-xr-x 3 root root 4096 Feb 16 22:45 dists/ dr-xr-xr-x 3 root root 4096 Jan 27 13:56 EFI/ dr-xr-xr-x 2 root root 4096 Feb 16 22:45 install/ -r--r--r-- 1 root root 30615 Feb 16 22:49 md5sum.txt dr-xr-xr-x 4 root root 4096 Feb 16 22:46 pool/ lrwxrwxrwx 1 root root 1 Feb 16 22:45 ubuntu -> ./
여기서 pool디렉토리가 패키지가 들어있는 경로이다.
/etc/apt/source.list.d/local-repo.list 파일을 아래와 같은 내용으로 생성한다.
deb [trusted=yes] file:/repo/ noble main restricted
[trusted=yes] 는 GPG검증을 하지 않고 무조건 신뢰하는 옵션이다.
noble은 사용할 Ubuntu 코드네임이다. 보통 현재 버전 코드명을 입력한다.
main restricted는 사용하고자 하는 레포지토리 채널이름이다. ISO파일에는 기본적으로 이 2가지 채널이 존재한다.