jman12321
February 15th, 2008, 09:30 PM
The objective of this tutorial is to explain how to create a local mirror of the ubuntu repositories. Depending on how many repositories you mirror, you will need 10-50GB of free space.
Log in as root.
sudo su
Install apt-mirror. This will allow you to mirror the Ubuntu repositories.
apt-get install apt-mirror
Select which repositories you would like to mirror.
vim /etc/apt/mirror.list
Install apache2
apt-get install apache2
Create a link between your repository and apache
ln -s /var/spool/apt-mirror/mirror/archive.ubuntu.com/ubuntu/ /var/www/
Run apt-mirror. This will take a long time to finish, as you are downloading gigabytes of information.
apt-mirror
[Optional] If you would like your mirror to update daily, uncomment the line in cron
vim /etc/cron.d/apt-mirror
Edit source.list to use your new mirror
vim /etc/apt/sources.list
Entries will look similar to:
deb http://<hostname or IP>/ubuntu/ gutsy-updates main restricted
Log in as root.
sudo su
Install apt-mirror. This will allow you to mirror the Ubuntu repositories.
apt-get install apt-mirror
Select which repositories you would like to mirror.
vim /etc/apt/mirror.list
Install apache2
apt-get install apache2
Create a link between your repository and apache
ln -s /var/spool/apt-mirror/mirror/archive.ubuntu.com/ubuntu/ /var/www/
Run apt-mirror. This will take a long time to finish, as you are downloading gigabytes of information.
apt-mirror
[Optional] If you would like your mirror to update daily, uncomment the line in cron
vim /etc/cron.d/apt-mirror
Edit source.list to use your new mirror
vim /etc/apt/sources.list
Entries will look similar to:
deb http://<hostname or IP>/ubuntu/ gutsy-updates main restricted