We want to create a local Debian package repository for self-grown debs, to be easier installed on several machines

At first we'll install the necessary packages

# aptitude install apache2 dpkg-dev

create the repository structure in a directory provided by the webserver

# mkdir -p /var/www/localhost/deprepo/custom_debs/binary
# mkdir /var/www/localhost/deprepo/custom_debs/source

Next step is copying the debs, for example:

# cp /usr/src/build/*.deb /var/www/localhost/deprepo/custom_debs/binary/

Then the index files will be created

# cd /var/www/localhost/derepo/custom_debs
# dpkg-scanpackages binary /dev/null | gzip -9c > binary/Packages.gz
# dpkg-scansources source /dev/null | gzip -9c > source/Sources.gz

Create a file /etc/apt/sources.list.d/local-repo.list with following content on the clients

# deb http://repo.domain.local/deprepo/custom_debs binary/
# deb-src http://repo.domain.local/deprepo/custom_debs source/

Previous Post Next Post