This document describes how to setup a directory structure consisting of the base Fedora Core rpm's and some extra files that are found on the Fedora iso's, in such a way that the resulting 'repository' can be accessed both using the yum command (or up2date for that matter) and the Fedora installer (Anaconda) to perform a network installation.
update: there's a great tool called yam, written by Dag Wieers, that automates this procedure and more!
(from the website: "Yam builds a local APT/Yum RPM repository from local ISO files, downloaded updates, and extra packages from 3rd party repositories. It takes care of setting up the ISO files, downloading the RPMs, configuring HTTP access and providing PXE/TFTP resources for remote network installations.")
mkdir /mnt/tmp1 /mnt/tmp2 /mnt/tmp3
mount -o loop yarrow-i386-disc1.iso /mnt/tmp1 mount -o loop yarrow-i386-disc2.iso /mnt/tmp2 mount -o loop yarrow-i386-disc3.iso /mnt/tmp3
mkdir -p /var/www/html/fc1
cp -r /mnt/tmp1/Fedora /var/www/html/fc1 cp -r /mnt/tmp2/Fedora /var/www/html/fc1 cp -r /mnt/tmp3/Fedora /var/www/html/fc1 cp /mnt/tmp1/RELEASE-NOTES* /var/www/html/fc1
cp -r /mnt/tmp1/dosutils /var/www/html/fc1 cp -r /mnt/tmp1/images /var/www/html/fc1
find /var/www/html/fc1 -type d -exec chmod o=rx {} \; find /var/www/html/fc1 -type f -exec chmod o=r {} \;
yum-arch -dvvz /var/www/html/fc1/Fedora/RPMS
umount /mnt/tmp1 umount /mnt/tmp2 umount /mnt/tmp3 rmdir /mnt/tmp1 rmdir /mnt/tmp2 rmdir /mnt/tmp3
You might still need to configure your HTTP/FTP/NFS server, which I won't describe here. If you're using a default Apache configuration you can start it with:
service httpd start
Then make sure Apache starts automatically after a reboot:
chkconfig httpd on
The easiest way to check if the repository is accessible is to open up a browser and enter the URL of you repository. Just remember that in the URL the location of the repository is relative to the DocumentRoot directory of Apache (or your FTP/NFS server). Following the example above, the repository is located at:
/var/www/html/fc1
Assuming you're using a standard Apache configuration, the URL would be:
http://yourhost.yourdomain/fc1
Choose the HTTP, FTP or NFS during the installation process and enter the hostname and directory of the repository:
Website name: yourhost.yourdomain directory: fc1
To use yum, you first need to add your repository to /etc/yum.conf. For example:
[base] name=Fedora Core 1 - Base baseurl=http://myhost.mydomain/fc1 http://fedora.redhat.com/releases/fedora-core-1The example still lists the offical RedHat repository, which is now used as a backup repository, meaning that if your personal repository is unavailable you will still be able to install rpm's with yum. (Just make sure the second URL starts with a tab on a new line.)
Yes, just ignore all references to the second and third iso's and 'tmp' dirctories
I believe the procedure will work for all Red Hat Linux versions that support a network install and yum but I'd like this to be confirmed.
I personally don't use apt-get, but if you know how to implement support for apt-get please let me know and I'll update this howto accordingly.
If you have anything to contribute/suggest or just want to point out a typo, please email me.