|
. Apache ( IP, ). :
http://forum.ubuntu.ru/index.php?topic=28366.msg197361
. . , , /var/cache/apt/archives,
ln -s /var/cache/apt/archives /var/www/repo/packages
. /var/www/repo/
- ( ):
#!/bin/bash
dpkg-scanpackages . /dev/null > Packages
cat Packages | gzip -9c > Packages.gz
- http://letras.ru/2008/06/gpg-crossplatform-encryption/ .
- Release ( ) :
#!/bin/bash
cat > Release <<END
Archive: hardy
Version: 8.04
Origin: Ubuntu
Label: Simba's local Ubuntu Hardy Heron repository
Architecture: i386
MD5Sum:
END
md5sum=$(md5sum Packages | cut -d ' ' -f1)
sizeinbytes=$(ls -l Packages | cut -d ' ' -f5)
printf " "$md5sum" %16d Packages\n" $sizeinbytes >> Release
md5sum=$(md5sum Packages.gz | cut -d ' ' -f1)
sizeinbytes=$(ls -l Packages.gz | cut -d ' ' -f5)
printf " "$md5sum" %16d Packages.gz\n" $sizeinbytes >> Release
gpg -bao Release.gpg Release
, gpg
, . -
, ...
:
gpg --export -a " " > /var/www/repo/public.key
- , .
[boh]: , public.key ,
gpg --export -a " "
, , .
%3a... - , . . /var/www/repo/packages/ .htaccess :
RewriteEngine On
RewriteRule ^(.*?):(.*)$ $1\%253a$2
, rewrite :
ln -s /etc/apache2/mods-available/rewrite.load /etc/apache2/mods-enabled/rewrite.load
( /etc/apache2/apache2.conf):
<Directory /var/www/repo/>
AllowOverride All
</Directory>
.
, :
wget -q http://<IP >/repo/public.key -O- | sudo apt-key add -
sources.list:
deb http://<IP >/repo ./
:
http://forum.ubuntu.ru/index.php?topic=8073