UberStudent Forums
http://uberstudent.com/phpBB/

Create a local apt repository
http://uberstudent.com/phpBB/viewtopic.php?f=7&t=1059
Page 1 of 1

Author:  Stephen Ewen [ Tue Oct 13, 2015 1:05 am ]
Post subject:  Create a local apt repository

It's very easy:

- Place your .deb files somewhere such as $HOME/Desktop/local-repo

- Install apache:
Code:
sudo apt-get install apache2


- Start server:

Code:
sudo /etc/init.d/apache2 start

(To stop the server use sudo /etc/init.d/apache2 stop)

- Add packages to /var/www/html/debian
Code:
rm /var/www/html/debian/*.deb
rm /var/www/html/*.deb
cp $HOME/Desktop/local-repo/* /var/www/html/debian


- Copy to /var/www/html
Code:
cp $HOME/Desktop/local-repo/* /var/www/html


- In /var/www/html/debian, run this
Code:
cd /var/www/html/debian
dpkg-scanpackages . /dev/null | gzip -9c > Packages.gz


- Add /etc/apt/sources.list.d/official-package-repositories.list add:
Code:
deb http://127.0.1.1/debian/ /


- To /etc/apt/preferences add:
Code:
Package: *
Pin: origin 127.0.1.1
Pin-Priority: 1000


- Run:
Code:
apt-get update

Page 1 of 1 All times are UTC
Powered by phpBB® Forum Software © phpBB Group
http://www.phpbb.com/