본문 바로가기

LINUX

[리눅스] ISO파일을 이용한 Local Repository 생성





ISO파일을 이용한 Local Repository 생성


Local Repository 생성방법

1. ISO 마운트 - 이전 글 참조

2. repository 파일 생성 및 편집

   [root@localhost ~]# vi /etc/yum.repo.d/local.repo


    [localrepo]

    name=localrepo

    baseurl=file:///iso/mountdir/

    enabled=1

    gpgcheck=0


3. repo 정보 업데이트 - yum clean all, yum repolist

 

   [root@localhost ~]# yum clean all

    Loaded plugins: fastestmirror, langpacks

    Cleaning repos: base epel extras ius localrepo updates

    Cleaning up everything

    Maybe you want: rm -rf /var/cache/yum, to also free up space taken by orphaned data from disabled or removed repos

    Cleaning up list of fastest mirrors


   [root@localhost ~]# yum repolist

    Loaded plugins: fastestmirror, langpacks

    base                                                                                         | 3.6 kB  00:00:00

    epel/x86_64/metalink                                                                         | 4.8 kB  00:00:00

    epel                                                                                         | 4.7 kB  00:00:00

    extras                                                                                       | 3.4 kB  00:00:00

    ius                                                                                          | 2.3 kB  00:00:00

    localrepo                                                                                    | 3.6 kB  00:00:00

    updates                                                                                      | 3.4 kB  00:00:00

    (1/10): base/7/x86_64/group_gz                                                               | 166 kB  00:00:00

    (2/10): base/7/x86_64/primary_db                                                             | 5.9 MB  00:00:00

    (3/10): epel/x86_64/group_gz                                                                 |  88 kB  00:00:00

    (4/10): extras/7/x86_64/primary_db                                                           | 143 kB  00:00:00

    (5/10): localrepo/group_gz                                                                   | 156 kB  00:00:00

    (6/10): localrepo/primary_db                                                                 | 3.1 MB  00:00:00

    (7/10): updates/7/x86_64/primary_db                                                          | 2.0 MB  00:00:00

    (8/10): epel/x86_64/updateinfo                                                               | 927 kB  00:00:02

    (9/10): ius/x86_64/primary_db                                                                | 249 kB  00:00:03

    (10/10): epel/x86_64/primary_db                                                              | 6.4 MB  00:00:14

    Determining fastest mirrors

     * base: mirror.navercorp.com

     * epel: mirror01.idc.hinet.net

     * extras: mirror.navercorp.com

     * ius: archive.linux.duke.edu

     * updates: mirror.navercorp.com

    repo id                             repo name                                                                 status

    base/7/x86_64                       CentOS-7 - Base                                                            9,911

    epel/x86_64                         Extra Packages for Enterprise Linux 7 - x86_64                            12,561

    extras/7/x86_64                     CentOS-7 - Extras                                                            291

    ius/x86_64                          IUS Community Packages for Enterprise Linux 7 - x86_64                       467

    localrepo                           localrepo                                                                  3,894

    updates/7/x86_64                    CentOS-7 - Updates                                                           626

    repolist: 27,750