apt-mirror: howto mirror repositories for offline access

Questions about applications and software
Forum rules
Before you post please read this

apt-mirror: howto mirror repositories for offline access

Postby grimdestripador on Fri Nov 21, 2008 5:51 pm

I now have a copy of Linux Mint 6 Felicia and would like 3d drivers and my scientific computing applications. Do to situations caused with dependencies I choose to mirror the ubuntu linuxmint and romeo repositories. Since I don't have a connection to the internet where I compute, but i haves access repositories, I want to setup a VM with apache server and the repository already setup. I would then use any other computer to run VBox server environment to host.

1) use http://www.virtualbox.org and create a machine with a 35+ GB dynamic expanding disk. Set guest to boot from LM6, use at least 512 megs for ram.
2) install LM6 on guest,
3) mount and Install guest additions for a pleasurable experience
Code: Select all
cd /media/cdrom
sudo ./VBoxLinexAdditions-x86.run

4)
Code: Select all
sudo apt-get update
sudo aptitude install apt-mirror
sudo aptitude install apache2


4) Edit the /etc/apt/mirror.list file. Comment out the src files. If you want to change the path where all the files are stored, change the line set base_path /var/spool/apt-mirror. But better yet is to replace the folder /var/spool/apt-mirror with a symbolic link your web folder (Apache share) or visa versa. Ubuntu's Repository is 25 GB.
Most importantly is to add the linuxmint repository and I have chosen to add virtualbox as well
Code: Select all
sudo gedit /etc/apt/mirror.list

My mirror.list file looks like
Code: Select all
############# config ##################
#
# set base_path    /var/spool/apt-mirror
#
# if you change the base path you must create the directories below with write privlages
#
# set mirror_path  $base_path/mirror
# set skel_path    $base_path/skel
# set var_path     $base_path/var
# set cleanscript $var_path/clean.sh
# set defaultarch  <running host architecture>
set nthreads     20
set _tilde 0
#
############# end config ##############

deb http://archive.ubuntu.com/ubuntu hardy main restricted universe multiverse
deb http://archive.ubuntu.com/ubuntu hardy-updates main restricted universe multiverse
#deb http://archive.ubuntu.com/ubuntu hardy-backports main restricted universe multiverse
deb http://archive.ubuntu.com/ubuntu hardy-security main restricted universe multiverse
#deb http://archive.ubuntu.com/ubuntu hardy-proposed main restricted universe multiverse

#deb-src http://archive.ubuntu.com/ubuntu hardy main restricted universe multiverse
#deb-src http://archive.ubuntu.com/ubuntu hardy-updates main restricted universe multiverse
#deb-src http://archive.ubuntu.com/ubuntu hardy-backports main restricted universe multiverse
#deb-src http://archive.ubuntu.com/ubuntu hardy-security main restricted universe multiverse
#deb-src http://archive.ubuntu.com/ubuntu hardy-proposed main restricted universe multiverse

## -----------------------
## LINUX MINT REPOSITORIES
## -----------------------
## +++ Linux Mint 6 Felicia (stable) +++
deb http://packages.linuxmint.com/ felicia main upstream import
## +++ Backports (not as stable) +++
# deb http://packages.linuxmint.com/ felicia backport
## +++ Community (not as stable) +++
# deb http://packages.linuxmint.com/ felicia community
## +++ Romeo (unstable) +++
# deb http://packages.linuxmint.com felicia romeo

## ----------
## VirtualBox with USB support 'apt-get install virtualbox-2.0'
## ----------
deb http://download.virtualbox.org/virtualbox/debian intrepid non-free


clean http://download.virtualbox.org/virtualbox/debian
clean http://archive.ubuntu.com/ubuntu
clean http://packages.linuxmint.com

5) Watch you internet connection eat away. LM's repository size really depends on whether you want backports and community.
[code]sudo apt-mirror /etc/apt/mirror.list[/code]

6) This step is done concurrently with step 5. Since the output of apt-mirror is minimal. It has been advantageous to me to read all 20 download logs symontainiously with
[code] tail -f 5 /var/spool/apt-mirror/var/archive* [/code]


7) Test apache. Goto on your own computer http://127.0.0.1 to verify that IT WORKS.
8) Now create those symbolic links
[code]
sudo ln -s /var/spool/apt-mirror/mirror/archive.ubuntu.com/ubuntu /var/www/ubuntu
sudo ln -s /var/spool/apt-mirror/mirror/download.virtualbox.org /var/www/download.virtualbox.org
sudo ln -s /var/spool/apt-mirror/mirror/packages.linuxmint.com/ /var/www/packages.linuxmint.com

User avatar
grimdestripador
Level 6
Level 6
 
Posts: 1069
Joined: Fri Feb 16, 2007 2:26 am

Linux Mint is funded by ads and donations.
 

Return to Software & Applications

Who is online

Users browsing this forum: No registered users and 17 guests