DebianSOURCE=ftp://ftp.tw.debian.org
DIST_SOURCE=$DebianSOURCE/debian/dists
POOL_SOURCE=$DebianSOURCE/debian/pool
DIST_DEST=/mnt/dists
POOL_DEST=/mnt/pool
#dd if=/dev/zero of=deb_mirror.img bs=2G count=1
#mkfs.ext4 deb_mirror.img
#mount deb_mirror.img /mnt
#mount /opt/iso/debian-7.2.0-amd64-netinst.iso /media
#cp -av /media/* /mnt
#cd /mnt/dists
for i in `echo squeeze wheezy wheezy-updates jessie oldstable stable testing unstable sid`; do
wget -N $DIST_SOURCE/$i/Release -P $DIST_DEST/$i
wget -N $DIST_SOURCE/$i/Release.gpg -P $DIST_DEST/$i
done
wget -N $DIST_SOURCE/wheezy/main/binary-amd64/Packages.gz -P $DIST_DEST/wheezy/main/binary-amd64/
wget -N $DIST_SOURCE/wheezy/main/binary-amd64/Packages.bz2 -P $DIST_DEST/wheezy/main/binary-amd64/
----------------
這一行有問題
wget -N $DIST_SOURCE/wheezy/main/binary-amd64/Packages -P $DIST_DEST/wheezy/main/binary-amd64/
----------------
wget -N $DIST_SOURCE/wheezy/main/debian-installer/binary-amd64/Packages.gz -P $DIST_DEST/wheezy/main/debian-installer/binary-amd64/
wget -N $DIST_SOURCE/wheezy/main/debian-installer/binary-amd64/Packages.bz2 -P $DIST_DEST/wheezy/main/debian-installer/binary-amd64/
wget -N $DIST_SOURCE/wheezy/main/debian-installer/binary-amd64/Packages -P $DIST_DEST/wheezy/main/debian-installer/binary-amd64/
# Grab Missing files
for i in `cat filelist.txt`;do
wget -N $POOL_SOURCE/main/l/linux/$i -P $POOL_DEST/main/l/linux/
done
wget -N $POOL_SOURCE/main/p/pcre3/libpcre3-udeb_8.30-5_amd64.udeb \
-P $POOL_DEST/main/p/pcre3/
wget -N $POOL_SOURCE/main/i/ispell/ispell_3.3.02-6_amd64.deb \
-P $POOL_DEST/main/i/ispell/
wget -N $POOL_SOURCE/main/i/ispell/ienglish-common_3.3.02-6_all.deb \
-P $POOL_DEST/main/i/ispell/
wget -N $POOL_SOURCE/main/i/ispell/iamerican_3.3.02-6_all.deb \
-P $POOL_DEST/main/i/ispell/
wget -N $POOL_SOURCE/main/i/ispell/ibritish_3.3.02-6_all.deb \
-P $POOL_DEST/main/i/ispell/
wget -N $POOL_SOURCE/main/t/tasksel/task-english_3.14.1_all.deb \
-P $POOL_DEST/main/t/tasksel/
wget -N $POOL_SOURCE/main/t/tasksel/task-chinese-t_3.14.1_all.deb \
-P $POOL_DEST/main/t/tasksel/
wget -N $POOL_SOURCE/main/u/unicon/unicon-imc2_3.0.4-13_amd64.deb \
-P $POOL_DEST/main/u/unicon/
wget -N $POOL_SOURCE/main/u/util-linux/util-linux-locales_2.20.1-5.3_all.deb \
-P $POOL_DEST/main/u/util-linux/
wget -N $POOL_SOURCE/main/z/zhcon/zhcon_0.2.6-10_amd64.deb \
-P $POOL_DEST/main/z/zhcon/
wget -N -nH -m $DIST_SOURCE/wheezy-updates/main/i18n -P /mnt
wget -N -nH -m $DIST_SOURCE/wheezy/main/source -P /mnt
wget -N -nH -m $DIST_SOURCE/wheezy-updates/main/binary-amd64 -P /mnt
#http://ftp.tw.debian.org/debian/pool/main/e/eglibc/libc6-udeb_2.13-38_amd64.udeb
2014年5月13日 星期二
2014年5月8日 星期四
test
所有的relles要改成666
chmod 666 /var/www/debian/dists/jessie/Release
chmod 666 /var/www/debian/dissts/sid/Release
chmod 666 /var/www/debian/dists/squeeze/Releasechmod 666 /var/www/debian/dists/wheezy/Release
desktop下執行
mkdir -p /mnt/dists/wheezy/main/binary-amd64/
wget -P /mnt/dists/wheezy/main/binary-amd64/ ftp://ftp.debian.org/debian/dists/wheezy/main/binary-amd64/Release
wget -P /mnt/dists/wheezy ftp://ftp.debian.org/debian/dists/wheezy/Release.gpg
<附錄> wget 參數
chmod 666 /var/www/debian/dists/jessie/Release
chmod 666 /var/www/debian/dissts/sid/Release
chmod 666 /var/www/debian/dists/squeeze/Releasechmod 666 /var/www/debian/dists/wheezy/Release
desktop下執行
mkdir -p /mnt/dists/wheezy/main/binary-amd64/
wget -P /mnt/dists/wheezy/main/binary-amd64/ ftp://ftp.debian.org/debian/dists/wheezy/main/binary-amd64/Release
wget -P /mnt/dists/wheezy ftp://ftp.debian.org/debian/dists/wheezy/Release.gpg
<附錄> wget 參數
# -t0: 設定重試次數。當連結中斷或超時,wget會重新連接。-t0代表把重試次數設為無窮多。 # -c: 設定續傳功能。 # -nH: 不建立該網站名稱的子目錄 /example.com/,而直接在當前目錄下建立鏡像的目錄結構。 # -np: 不遍歷父目錄,如果有連結連到目標資料夾的parent或其他目錄,不下載。 # -m: 鏡像,相當同時使用-r和-N。 # -r: 遞迴下載,把文件中所有的連結都下載回來。 # -N: 下載時檢查timestamp,只下載有更新的文件,如果檔案大小和最修改日期都一樣就不下載。 # -P: 指定下載到本機的某個目錄下
訂閱:
文章 (Atom)