3

I'm not new to linux, but I am to setting up a local repo. After doing some research on how to download and setup a local ubuntu repo, I decided to use apt-mirror to accomplish my mission. However, after the downloading process finished, I noticed that the clean.sh script didn't remove any files and the postmirror.sh couldn't be opened.

Here is what my mirror.list file looks like:

set base_path /home/userx/xenial_repo
set nthreads 30
set _tilde 0

deb-amd64 http://mirror.symnds.com/ubuntu xenial main restricted universe multiverse
deb-i386 http://mirror.symnds.com/ubuntu xenial main restricted universe multiverse
deb-src http://mirror.symnds.com/ubuntu xenial main restricted universe multiverse

clean http://mirror.symnds.com/ubuntu


I used the following command to execute apt-mirror and start the downloading process:

sudo apt-mirror /etc/apt/mirror.list


Here is the output after I executed the command above:

userx@machinex:~/xenial_repo$ sudo apt-mirror /etc/apt/mirror.list 
Downloading 104 index files using 30 threads...
Begin time: Fri Sep 16 23:12:25 2016
[30]... [29]... [28]... [27]... [26]... [25]... [24]... [23]... [22]... [21]... [20]... [19]... [18]... [17]... [16]... [15]... [14]... [13]... [12]... [11]... [10]... [9]... [8]... [7]... [6]... [5]... [4]... [3]... [2]... [1]... [0]... 
End time: Fri Sep 16 23:12:38 2016

Processing tranlation indexes: [TT]

Downloading 540 translation files using 30 threads...
Begin time: Fri Sep 16 23:12:38 2016
[30]... [29]... [28]... [27]... [26]... [25]... [24]... [23]... [22]... [21]... [20]... [19]... [18]... [17]... [16]... [15]... [14]... [13]... [12]... [11]... [10]... [9]... [8]... [7]... [6]... [5]... [4]... [3]... [2]... [1]... [0]... 
End time: Fri Sep 16 23:13:06 2016

Processing DEP-11 indexes: [DD]

Downloading 14 dep11 files using 14 threads...
Begin time: Fri Sep 16 23:13:06 2016
[14]... [13]... [12]... [11]... [10]... [9]... [8]... [7]... [6]... [5]... [4]... [3]... [2]... [1]... [0]... 
End time: Fri Sep 16 23:13:10 2016

Processing indexes: [SSPP]

168.6 GiB will be downloaded into archive.
Downloading 160330 archive files using 30 threads...
Begin time: Fri Sep 16 23:13:24 2016
[30]... [29]... [28]... [27]... [26]... [25]... [24]... [23]... [22]... [21]... [20]... [19]... [18]... [17]... [16]... [15]... [14]... [13]... [12]... [11]... [10]... [9]... [8]... [7]... [6]... [5]... [4]... [3]... [2]... [1]... [0]... 
End time: Sat Sep 17 04:08:46 2016

0 bytes in 0 files and 0 directories can be freed.
Run /home/userx/xenial_repo/var/clean.sh for this purpose.

Running the Post Mirror script ...
(/home/userx/xenial_repo/var/postmirror.sh)

/bin/sh: 0: Can't open /home/userx/xenial_repo/var/postmirror.sh

Post Mirror script has completed. See above output for any possible errors.


After it finished downloading, I looked in the /home/userx/xenial_repo directory to see what was inside and I found the following structure:

xenial_repo
├───mirror
│   ├───archive.ubuntu.com
│   │   └───ubuntu
│   │       ├───dists
│   │       │   └───xenial-updates
│   │       │       ├───main
│   │       │       ├───multiverse
│   │       │       ├───restricted
│   │       │       └───universe
│   │       └───pool
│   │           ├───main
│   │           ├───multiverse
│   │           └───universe
│   └───mirror.symnds.com
│       └───ubuntu
│           ├───dists
│           │   └───xenial
│           │       ├───main
│           │       ├───multiverse
│           │       ├───restricted
│           │       └───universe
│           └───pool
│               ├───main
│               ├───multiverse
│               ├───restricted
│               └───universe
├───skel
│   ├───archive.ubuntu.com
│   │   └───ubuntu
│   │       └───dists
│   │           └───xenial-updates
│   │               ├───main
│   │               ├───multiverse
│   │               ├───restricted
│   │               └───universe
│   └───mirror.symnds.com
│       └───ubuntu
│           └───dists
│               └───xenial
│                   ├───main
│                   ├───multiverse
│                   ├───restricted
│                   └───universe
└───var


I noticed that both mirror and skel directories as similar with the exception that skel does not contain the pool directories which contain the deb files. The var directory contains a bunch of log files.

I'm trying to figure out which files I only need for my local repo and what I need to do in order to update the repo at least once a month.

So I have a few questions:

  • Do I need the skel and var directories or can I remove them? It looks like the clean.sh script didn't remove anything, so I don't know what I should keep and what to delete.
  • How do I perform an update to the local xenial repo without downloading all of the files again?
  • Is it possible to change the ubuntu repo server location in the mirror.list file and still perform an update?
  • Can I merge the content in both mirror.symnds.com and archive.ubuntu.com in the mirror directory?

Thank you in advanced!

0

You will need to make the 'ubuntu' directory in the Apache document root as well as some soft links for package and metadata locations. If you navigate to http://archive.ubuntu.com/ubuntu, you will see the structure we are trying to accomplish.

mkdir -p /var/www/html/ubuntu

ln -s /mnt/usb/repos/debian/mirror/archive.ubuntu.com/ubuntu/pool /var/www/html/ubuntu/pool

ln -s /mnt/usb/repos/debian/skel/archive.ubuntu.com/ubuntu/dists /var/www/html/ubuntu/dists

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.