GNU/Linux >> Linux Esercitazione >  >> Cent OS

CentOS / RHEL 7:come configurare il repository yum utilizzando un DVD montato localmente

yum è lo strumento principale per ottenere, installare, eliminare, interrogare e gestire i pacchetti software RPM di Red Hat Enterprise Linux dai repository software Red Hat ufficiali, nonché da altri repository di terze parti. Il post seguente descrive passo passo la procedura per utilizzare un DVD RHEL 7 iso montato localmente come repository yum.

1. Montare l'ISO del supporto di installazione di RHEL 7 in una directory. Ad esempio /mnt :

# mount -o loop rhel7.iso /mnt
Leggi anche :Linux / UNIX :Come montare un file ISO

2. Copia il media.repo file dalla directory montata /mnt /etc/yum.repos.d/ e chiamalo rhel7.repo .

# cp /mnt/media.repo /etc/yum.repos.d/rhel7.repo

3. Assegna le autorizzazioni appropriate al file del repository.

# chmod 644 /etc/yum.repos.d/rhel7.repo

4. Modifica il file repo e cambia il parametro gpgcheck=0 a gpgcheck=1 e aggiungi sotto 3 righe allo stesso file.

enabled=1
baseurl=file:///mnt/
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release

5. Una volta apportate tutte le modifiche, il file repo finale dovrebbe apparire come di seguito.( Nota che – media-id potrebbe essere diverso a seconda della versione di RHEL per cui viene utilizzato il DVD)

[InstallMedia]
name=DVD for Red Hat Enterprise Linux 7.3 Server
mediaid=9859238196.834790
metadata_expire=-1
gpgcheck=1
cost=500
enabled=1
baseurl=file:///mnt/
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release

6. Assicurati di svuotare le relative cache con yum clean all e gestore abbonamenti pulito una volta.

# yum clean all
# subscription-manager clean

Verifica

Verifica se riesci a elencare i pacchetti dal repository che hai appena creato.

# yum  --noplugins list
# yum repolist -v
    [snip]
    ISO-Server                                               | 4.1 kB     00:00     
    (1/2): ISO-Server/group_gz                                 | 134 kB   00:00     
    (2/2): ISO-Server/primary_db                               | 3.4 MB   00:00     
    Setting up Package Sacks
    pkgsack time: 0.001
    Repo-id      : ISO-Server
    Repo-name    : RHEL 7 Server DVD
    Repo-revision: 1424360184
    Repo-updated : Thu Feb 19 10:36:27 2017
    Repo-pkgs    : 4,371
    Repo-size    : 3.2 G
    Repo-baseurl : file:///mnt/
    Repo-expire  : 21,600 second(s) (last: Fri Jul 10 12:55:47 2017)
    Repo-filename: ///etc/yum.repos.d/rhel7.repo

    repolist: 4,371
CentOS / RHEL 6:come configurare il repository yum utilizzando un DVD montato localmente


Cent OS
  1. Come creare un repository YUM locale su CentOS 7 / RHEL 7 utilizzando DVD

  2. Come creare un repository YUM locale su RHEL 8 utilizzando DVD

  3. CentOS / RHEL:come creare e ospitare un repository yum su httpd

  4. Come creare un repository yum in CentOS/RHEL

  5. CentOS / RHEL 6:come configurare il repository yum utilizzando un DVD montato localmente

Come installare YUM su RHEL 8 / CentOS 8

Come configurare il repository Yum/DNF locale sul server RHEL 8 utilizzando DVD o file ISO

Come configurare il server NFS su CentOS 8 / RHEL 8

Come configurare Jenkins su CentOS 8 / RHEL 8

Come configurare Icinga Web 2 su CentOS 8 / RHEL 8

Come configurare uno Chef 12 su CentOS 7 / RHEL 7