Table of Contents
If you want to send us your comments, please do so. Thanks
More on comments
Setting up package repositories
Sometimes it can be usefull to have a package repository which is used to store .deb files which are not incorporated in any external repository. We explain how to set up such a repository on the local machine, on the local network and on the Internet. The same for a repository of ISO files.
In the contents field on the top right you can choose the one which suits your needs.
General
General items used in the howto's.
user: is your username with which you login to Debian
wheezy: is the name of the Debian version used in this howto. If your version of Debian has a different name replace wheezy with that name.
We use log in as root if we need root previleges. Using sudo is fine too.
overwrite file
When setting out the repositories an overwrite file can be used. This can be avoided. In case you need it use the link
Local package repository
Use the deb file to accomplish this is local-apt-repository.deb. Do as root
- dpkg -i local-apt-repository.deb
- A symlink is created. It points from
- /etc/systemd/paths.target/wants/local-apt-repository.path
- to
- /lib/systemd/system/local-apt-repository.path
- /lib/systemd/system/local-apt-repository.path contains the path to the actual repository directory:
- /srv/local-apt-repository
- Create the directory: /srv/local-apt-repository
- Put the .deb files you want in your local repository in /srv/local-apt-repository
- Run aptitude
- Do u
- Do U
- Do gg (if you pause after the first g you can see what is going to happen)
- Alternative for “Run aptitude”
- aptitude update
- aptitude upgrade
Issues
If a new package does not show up in aptitude reinstall local-apt-repository.deb : dpkg -i local-apt-repository.deb and try again
Old school
Without local-apt-repository.deb
Make a folder to hold the Packages.gz file
mkdir -p /home/user/deb_files/dists/wheezy/main/binary-i386 (binary-amd64 for 64 bit PC's)
Copy or move your .deb files to
/home/user/deb_files/
and to
/home/user/deb_files/dists/wheezy/main/binary-i386 (binary-amd64 for 64 bit PC's)
Open sources.list
sudo nano /etc/apt/sources.list
And add
deb file:/home/user/deb_files wheezy main
Check if you have dpkg-scanpackages with
which dpkg-scanpackages
If not install
sudo apt-get install dpkg-dev
and check again.
Generate the packages information file
cd /home/user/deb_files/dists/wheezy/main/binary-i386 (binary-amd64 for 64 bit PC's) dpkg-scanpackages ./ /dev/null | gzip -c --best > Packages.gz
If there are problems you may want to replace /dev/null with overwritefile.txt after you created an overwrite file.
Update the packagelist
sudo apt-get update
You are now ready to install the packages with apt-get install or a packagemanager like aptitude. Keep in mind that when you add new .deb files you have to update Packages.gz and run apt-get update.
Local CD/DVD repository
Work in progress
Download the iso's from The Debian CD repository and put them in
/home/user/ISO/Debian
Create the folders where the ISO's will be mounted. If you have DVD's replace CD with DVD. One folder for every CD / DVD
for (( i=1; $i<6; i++ )); do sudo mkdir /mnt/ISO/Debian/CD-$i; done Replace 6 with the number you need sudo mkdir /mnt/ISO/Debian/CD-1 sudo mkdir /mnt/ISO/Debian/CD-2 sudo mkdir /mnt/ISO/Debian/CD-3 and so on.
Do
sudo nano /etc/fstab
and add one line for each CD / DVD
/home/user/ISO/Debian/debian-7.7.0-i386-CD-1.iso /mnt/ISO/Debian/CD-1 udf,iso9660 loop 0 0 /home/user/ISO/Debian/debian-7.7.0-i386-CD-2.iso /mnt/ISO/Debian/CD-2 udf,iso9660 loop 0 0 /home/user/ISO/Debian/debian-7.7.0-i386-CD-3.iso /mnt/ISO/Debian/CD-3 udf,iso9660 loop 0 0 and so on
Reload fstab sudo mount -a Do
sudo nano /etc/apt/sources.list
and add one entry for every CD / DVD
deb file:/mnt/ISO/Debian/CD-1 wheezy main contrib deb file:/mnt/ISO/Debian/CD-2 wheezy main contrib deb file:/mnt/ISO/Debian/CD-3 wheezy main contrib and so on
Unmount all /mnt/ISO/Debian/CD-* folders. You can use, change the numbers to your needs:
for (( i=1; $i<6; i++ )); do sudo umount /mnt/ISO/Debian/CD-$i; done
Make sure there are enough loop devices. Log in as root or use sudo for every command desribed here: mount: could not find any free loop device and mount all iso's (change the 4 to your needs):
for (( i=1; $i<4; i++ )); do sudo mount /mnt/ISO/Debian/CD-$i; done
Update the packagelist
sudo apt-get update
You are now ready to install the packages with apt-get install or a packagemanager like aptitude. Keep in mind that when you add new .deb files you have to update Packages.gz and run apt-get update.
Local network repositories
For package's and CD/DVD ISO's
T.b.d.
Internet repositories
For package's and CD/DVD ISO's
A list of all the Debian mirror sites and a full list
In /etc/apt/sources.list the host can be replaced with an other host like in https://ftp.nluug.nl/debian becomming https://debmirror.tuxis.nl/debian
Usefull links
Local apt repository
Ubuntu based SourcesList and Repositories info
Add ISO image to apt sources.list
Main subjects on this wiki: Linux, Debian, HTML, Microcontrollers, Privacy
RSS
Disclaimer
Privacy statement
Bugs statement
Cookies
Copyright © : 2014 - 2024 Webevaluation.nl and the authors
Changes reserved.