sudo useradd -d /home/ftpsync -m ftpsync
sudo passwd ftpsync
sudo su ftpsync
bash
export http_proxy=…
wget http://ftp-master.debian.org/ftpsync.tar.gz
tar xvfz ftpsync.tar.gz
mkdir ~/bin ~/etc ~/log
cp distrib/bin/ftpsync ~/bin/
cp distrib/etc/ftpsync.conf.sample ~/etc/ftpsync.conf
cp distrib/etc/common ~/etc/
cat /home/ftpsync/etc/ftpsync.conf
MIRRORNAME=`hostname -f`
RSYNC_DIR=”/home/ftpsync”
TO=”${RSYNC_DIR}/mirrors/debian/”
RSYNC_PATH=”debian”
# amd64 i386 armel armhf
RSYNC_HOST=debian.ustc.edu.cn
#RSYNC_HOST=ftp.cn.debian.org
#RSYNC_HOST=debian.bjtu.edu.cn
# amd64 i386 armhf
#RSYNC_HOST=www.anheng.com.cn
# amd64 i386
#RSYNC_HOST=mirrors.163.com
#RSYNC_HOST=mirrors.sohu.com
LOGDIR=”${RSYNC_DIR}/log”
LOG=”${LOGDIR}/ftpsync.log”
EXCLUDE=””
ARCH_EXCLUDE=”\
alpha \
hppa \
hurd-i386 \
ia64 \
kfreebsd-amd64 \
kfreebsd-i386 \
m68k \
mipsel \
mips \
powerpc \
s390 \
s390x \
sh \
sparc”
LOGROTATE=14
UIPRETRIES=3
RSYNC_PROXY=172.24.61.252:8080
RSYNC=rsync
#RSYNC_BW=””