IdentifiantMot de passe
Loading...
Mot de passe oublié ?Je m'inscris ! (gratuit)
Navigation

Inscrivez-vous gratuitement
pour pouvoir participer, suivre les réponses en temps réel, voter pour les messages, poser vos propres questions et recevoir la newsletter

Administration système Discussion :

[CentOs] Depot local pour installation de RPM


Sujet :

Administration système

  1. #1
    Membre du Club
    Profil pro
    Inscrit en
    Août 2004
    Messages
    172
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Août 2004
    Messages : 172
    Points : 69
    Points
    69
    Par défaut [CentOs] Depot local pour installation de RPM
    Bonjour,

    Sur un Linux CentOS6, j'ai créé un depot local. Cela fonctionne bien avec yum install XXX, par contre cela ne fonctionne pas avec yum groupinstall XXX.

    Si quelqu'un peut me conseiller, par avance merci.

  2. #2
    Expert éminent Avatar de marsupial
    Homme Profil pro
    Retraité
    Inscrit en
    Mars 2014
    Messages
    1 764
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : Autre

    Informations professionnelles :
    Activité : Retraité

    Informations forums :
    Inscription : Mars 2014
    Messages : 1 764
    Points : 7 187
    Points
    7 187
    Par défaut
    Salut !

    Quel message retourne yum groupinstall ?

    yum grouplist dis quoi ?
    Repeat after me
    Le monsieur lutte pour la défense des libertés individuelles et collectives

    Repeat after me...

  3. #3
    Membre du Club
    Profil pro
    Inscrit en
    Août 2004
    Messages
    172
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Août 2004
    Messages : 172
    Points : 69
    Points
    69
    Par défaut
    Voici le résultat de la commande yum groupinstall :
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    [root@TEST ~]# yum groupinstall "X Window System"
    Loaded plugins: fastestmirror
    Loading mirror speeds from cached hostfile
    Setting up Group Process
    Loading mirror speeds from cached hostfile
    Warning: Group X Window System does not exist.
    No packages in any requested group available to install or update
    Et le résultat de la commande yum grouplist :
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    [root@TEST ~]# yum grouplist
    Loaded plugins: fastestmirror
    Setting up Group Process
    Loading mirror speeds from cached hostfile
    Done
    Mon problème vient probablement de la commande
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    createrepo -g /MonDepot/
    que je ne sais pas trop comment passer.

  4. #4
    Expert éminent Avatar de marsupial
    Homme Profil pro
    Retraité
    Inscrit en
    Mars 2014
    Messages
    1 764
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : Autre

    Informations professionnelles :
    Activité : Retraité

    Informations forums :
    Inscription : Mars 2014
    Messages : 1 764
    Points : 7 187
    Points
    7 187
    Par défaut
    Collect the packages together in one directory. You can make as many sub-directories as you want, but there needs to be a top level directory where they all live. That's where we're going to form our repository.

    Yum uses a digest of the information stored in each RPM to do its work. This information is created using the 'createrepo' program. If you don't have createrepo installed you can install it with:

    If you are generating your repository on a machine that doesn't use RPMs, you can download createrepo from http://createrepo.baseurl.org/ and build/install it manually.

    Once you have createrepo installed you need to run it. It only requires one argument which is the directory in which you would like to generate the repository data. So if the packages directory we made in step 1 is in /srv/my/repo then you would run:

    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    createrepo /srv/my/repo
    You should see a lot of things fly by but it should finish without an error. In the end you should have a directory named /srv/my/repo/repodata with at least 4 files in it. Maybe more.

    To make this repository known to yum you need to add a .repo file to your yum configuration. On the systems where you want to use this repo you need to make a new file in /etc/yum.repos.d/. The file can be named anything but the extension on the file has to be .repo. Let's call this one 'myrepo.repo'.

    In the file you just need to include the following:

    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
       [myrepo]
       name = This is my repo
       baseurl = url://to/get/to/srv/my/repo/
    That's all you need in that file. The 'baseurl' line is the path that machine uses to get to the repository. If the machine has direct access to it or mounts it as a filesystem you can use a baseurl line like:

    Code : Sélectionner tout - Visualiser dans une fenêtre à part
         baseurl = file:///srv/my/repo/
    NB: there are 3 slashes (/) following the file:, not 2. That is correct.

    If you access the file via an http or https server you would use something like:

    Code : Sélectionner tout - Visualiser dans une fenêtre à part
         baseurl = <a href="http://servername/my/repo" target="_blank">http://servername/my/repo</a>
    More details about client-side repo configuration can be found in the yum.conf man page.

    Now, every time you modify, remove or add a new RPM package to /srv/my/repo you need to recreate the repository metadata. You do that by running createrepo the same way you did in step 2.



    En résumé, après avoir installé yumrepo, il faut créer un fichier de configuration avec lextension .repo dans /etc/yum.repos.d/ contenat :

    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    [myrepo]
       name = This is my repo
       baseurl = url://to/get/to/srv/my/repo/
    Ensuite, procéder à
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    createrepo /chemin/vers/le/repertoire/
    Et le tour est joué.
    Repeat after me
    Le monsieur lutte pour la défense des libertés individuelles et collectives

    Repeat after me...

  5. #5
    Membre du Club
    Profil pro
    Inscrit en
    Août 2004
    Messages
    172
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Août 2004
    Messages : 172
    Points : 69
    Points
    69
    Par défaut
    Merci pour la réponse.

    Ceci correspond a ce que j'ai fait et mon depot fonctionne bien sur un yum install. De plus, yum list retourne bien tous les rpm disponnibles sur le depot.

    Je pense qu'il faut faire une manipulation complèmentaire pour définir les groupes d'installation. Probablement avec une commande du type createrepo -g repodata/comps.xml ., mais cette commande exige l'existance du fichier comps.xml pour le mettre à jour.

Discussions similaires

  1. Prérequis pour installer CentOS 6
    Par tunis71187 dans le forum RedHat / CentOS / Fedora
    Réponses: 6
    Dernier message: 10/01/2014, 19h35
  2. Installer la BDD GenBank en local pour y faire des exo en perl
    Par montis dans le forum Bioinformatique
    Réponses: 0
    Dernier message: 16/12/2013, 23h22
  3. BDD pour developpement local et installation distante
    Par fxbrg dans le forum Accès aux données
    Réponses: 1
    Dernier message: 17/04/2009, 10h43
  4. outils pour installer ASP en local
    Par Stéph utilisateur d'acces dans le forum ASP
    Réponses: 12
    Dernier message: 12/03/2009, 14h47
  5. X11 obligatoire pour install console ?
    Par ovh dans le forum Applications et environnements graphiques
    Réponses: 4
    Dernier message: 06/11/2003, 16h50

Partager

Partager
  • Envoyer la discussion sur Viadeo
  • Envoyer la discussion sur Twitter
  • Envoyer la discussion sur Google
  • Envoyer la discussion sur Facebook
  • Envoyer la discussion sur Digg
  • Envoyer la discussion sur Delicious
  • Envoyer la discussion sur MySpace
  • Envoyer la discussion sur Yahoo