原先服务器上就有apt-proxy的服务,因此想着如果能直接放在apt-proxy的库中就好了,结果发现是错误的想法,因为apt-proxy根本就是一个代理,不能管理本地的包。
后来想想 debian.cn99.com 不是正常的开着80端口的吗,因此应该是装个apache再配置一下就好了。
cn99上找了两个脚本,简单修改下变量,第一个是生成目录的,第二个是生成Package.gz文件的。
#!/bin/bash
# Quick Package Updater
# John Dong
#Licensed under the GPL.
echo "CAUTION CAUTION CAUTION: DESTRUCTIVE!!!"
echo "ONLY FOR GENERATING INITIAL DIRECTORY STRUCTURE"
echo "DO NOT RUN UNLESS YOU KNOW WHAT YOU'RE DOING!!"
echo "Exiting for your safety."
#exit
DISTS="etch edgy feisty"
SECTIONS="main contrib"
BINARY_ARCH="binary-i386 binary-amd64"
for a in $DISTS; do
mkdir ./dists/$a/
for b in $SECTIONS; do
mkdir -p ./dists/$a/$b
for c in $BINARY_ARCH; do
mkdir ./dists/$a/$b/$c
if [ -d dists/$a/$b/$c ]; then
echo "Updating dists/$a/$b/$c/Packages"
dpkg-scanpackages dists/$a/$b/$c
/dev/null > dists/$a/$b/$c/Packages
fi
done
done
done
#!/bin/bash
# Quick Package Updater
# John Dong
#Licensed under the GPL.
DISTS="etch feisty"
SECTIONS="main contrib"
BINARY_ARCH="binary-i386 binary-amd64"
for a in $DISTS; do
for b in $SECTIONS; do
for c in $BINARY_ARCH; do
if [ -d dists/$a/$b/$c ]; then
echo "Updating dists/$a/$b/$c/Packages"
dpkg-scanpackages dists/$a/$b/$c
/dev/null | gzip -9 > dists/$a/$b/$c/Packages.gz
fi
done
done
done
如果在FF中输入地址可以看到你创建的文件夹,剩下的就是配置客户机的sources.list了。
欢迎访问最专业的网吧论坛,无盘论坛,网吧经营,网咖管理,网吧专业论坛https://bbs.txwb.com |
关注天下网吧微信,了解网吧网咖经营管理,安装维护:
本文来源:赛迪网 作者:佚名