LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Server (https://www.linuxquestions.org/questions/linux-server-73/)
-   -   YUM through ISO files with grouplist/groupinstall options (https://www.linuxquestions.org/questions/linux-server-73/yum-through-iso-files-with-grouplist-groupinstall-options-4175471055/)

vikas027 07-26-2013 03:51 PM

YUM through ISO files with grouplist/groupinstall options
 
Dear All,

I have a CentOS 6.2 server and I am looking to have a way out to create a yum repository through ISO files for RHEL 5.X servers in which yum grouplist works.

There are numerous links/guides to create yum through ISO files, but I have not found any of them in which yum grouplist works OR repository is created through createrepo -g (where 'g' stands for group xml file)

Till date, I used to copy the contents of the ISO in some other directory (say /RPM). Now, I have a client's requirement to mount ISO files shared through CIFS and I am stuck.

Thankfully, this has been addressed in RHEL6.X, where you can directly use an ISO without using createrepo command.

Forgive my ignorance on this topic.

Linux MR 07-27-2013 10:13 AM

This one is actually from the archives
Source: http://www.linuxquestions.org/questi...sitory-571604/

Hope that helps

Quote:

This process is pretty easy, just two steps:

create a file in the groups format used by yum
tell createrepo to include that group file in your repository.
Step 1

You can either open a text editor and create the groups xml file manually or you can run the yum-groups-manager command from yum-utils.

Run the groups-create command like this:

yum-groups-manager -n "My Group" --id=mygroup --save=mygroups.xml --mandatory yum glibc rpm
And you'll end up with a file like this:

<!DOCTYPE comps PUBLIC "-//Red Hat, Inc.//DTD Comps info//EN" "comps.dtd">
<comps>
<group>
<id>mygroup</id>
<default>False</default>
<uservisible>True</uservisible>
<display_order>1024</display_order>
<name>My group</name>
<description></description>
<packagelist>
<packagereq type="mandatory">glibc</packagereq>
<packagereq type="mandatory">rpm</packagereq>
<packagereq type="mandatory">yum</packagereq>
</packagelist>
</group>
</comps>
Step 2

To include this in a repository, just tell createrepo to use it when making or remaking your repository.

createrepo -g /path/to/mygroups.xml /srv/my/repo

vikas027 07-27-2013 02:54 PM

Thanks Linux MR,

I solved the issue with an easier alternative. This is what I was missing.

On CentOS/RHEL 6.X machines, we have to use createrepo --checksum sha instead of only createrepo.

So these are my overall steps.

Code:

ln -s /path/to/mounted/iso/Server  /var/www/html/Server
createrepo --checksum sha -g /path/to/mounted/iso/Server/repodata/comps-*.xml /var/www/html/Server


Thanks all for your time and efforts.


All times are GMT -5. The time now is 01:11 PM.