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.
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.
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...
Voici le résultat de la commande yum groupinstall :
Et le résultat de la commande yum grouplist :
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
Mon problème vient probablement de la commande
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 Doneque je ne sais pas trop comment passer.
Code : Sélectionner tout - Visualiser dans une fenêtre à part createrepo -g /MonDepot/
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.
Code : Sélectionner tout - Visualiser dans une fenêtre à part yum install createrepo
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:
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.
Code : Sélectionner tout - Visualiser dans une fenêtre à part createrepo /srv/my/repo
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:
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
1
2
3 [myrepo] name = This is my repo baseurl = url://to/get/to/srv/my/repo/
NB: there are 3 slashes (/) following the file:, not 2. That is correct.
Code : Sélectionner tout - Visualiser dans une fenêtre à part baseurl = file:///srv/my/repo/
If you access the file via an http or https server you would use something like:
More details about client-side repo configuration can be found in the yum.conf man page.
Code : Sélectionner tout - Visualiser dans une fenêtre à part baseurl = <a href="http://servername/my/repo" target="_blank">http://servername/my/repo</a>
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 :
Ensuite, procéder à
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/Et le tour est joué.
Code : Sélectionner tout - Visualiser dans une fenêtre à part createrepo /chemin/vers/le/repertoire/
Repeat after me
Le monsieur lutte pour la défense des libertés individuelles et collectives
Repeat after me...
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.
Vous avez un bloqueur de publicités installé.
Le Club Developpez.com n'affiche que des publicités IT, discrètes et non intrusives.
Afin que nous puissions continuer à vous fournir gratuitement du contenu de qualité, merci de nous soutenir en désactivant votre bloqueur de publicités sur Developpez.com.
Partager