So I run an internal CentOS server that contains a complete mirror of the CentOS repositories that we use for all our servers at work. This saves a lot of time/bandwidth as the local mirror syncs itself with the outside world once a day (around midnight) and all the local servers point at the local mirror for installs or updates. Well, we also have a lot of Ubuntu desktops so I wanted to use the same machine to also create a local Ubuntu repository. The tool of choice for this job is apt-mirror. I couldn’t find an RPM (and my initial attempt at downloading the source and building was missing some prerequisites and had issues) so I figured, why not use Ubuntu to create an Ubuntu repository. I didn’t want to have a machine dedicated to this purpose, so in comes my favorite tool for Debian/Ubuntu systems: debootstrap. Fortunately, there is an RPM for debootstrap for FC10, but since it only relies on Python it can be downloaded and installed directly into CentOS 5.2. So to get a base Ubuntu install created do the following steps (at this time the highest release in Fedora’s RPM is intrepid, but that will work for our purposes):
- Download debootstrap RPM it is the same for i386 and X86_64 systems.
- # rpm -ivh debootstrap-1.0.10-1.fc10.noarch.rpm
- # mkdir /chroot
- # deboostrap --arch (amd64 or i386) intrepid /chroot/ubuntu-8.10
- # chroot /chroot/ubuntu-8.10
- (inside-chroot)# apt-get update
- #apt-get install apt-mirror