Table of Contents
HOWTO: Set up a Debian repository on the LAN server
Download a set of Debian ISO files from the Internet. I use `jigdo` for this.
Copy your downloaded ISO files to the directory where you will store them on the server. In this example, I copied the ISOs into the following directory:
/home/idtm/DebianRepository/Debian12/
1. Setup to mount ISOs as loop devices
Make a copy of this mount script LINK_HERE and copy it to the .bin directory in the home folder. Rename it:
mount-Debian12-64bit-DVD-repo-local.sh
Make sure the script is executable. You can run the following command:
chmod u+x mount-Debian12-64bit-DVD-repo-local.sh
Modify the mount-Debian12-64bit-DVD-repo-local.sh script as follows:
- Change references to
/mediato/mnt - Set the
isopathvariable to point to the directory where your ISOs are stored.
Run this script using sudo and verify that it works by navigating to the /mnt folder in your file browser. You should see a folder for each of your ISOs.
2. Setup access via Apache webserver
In a terminal, change directory to the root directory of the web server:
cd /var/www/html
Next, create a directory called debian12:
sudo mkdir debian12
Change directory to debian12:
cd debian12
In this directory, we need to create a symbolic link to each mount point for our ISO files in /mnt.
Open a text editor and create a new document called makedirs.sh, and put the following lines in it:
#!/bin/bash
for value in {1..21}
do
ln -s /mnt/Deb-64bit-disc_$value Deb-64bit-disc_$value
done
Replace 21 with the actual number of ISO files you are using. Save the document and exit.
Make it executable with:
sudo chmod u+x makedirs.sh
Now, run the script to create the symbolic links:
sudo ./makedirs.sh
3. Connect the Clients
Once the Debian repository is set up on the server, set up each client computer to Connect to a Network Drive.
