2008年11月20日 星期四

Rsync and bandwidth shaping

SSH is a UNIX app that follows the idea of small simple tools that can be used together for a greater good. One of the lesser known features is that the old rsync command/protocol can be run over SSH. This provides authentication and encryption, plus some other goodies. What you can also do is force maximum compression, a different crypto cipher such as Blowfish instead of the default of 3DES, and bandwidth limiting.

BWLIMIT=23 # in kbyte/s
RSYNC_RSH="ssh -C -c blowfish -p 22"
alias rsync="rsync -avz --bwlimit=$BWLIMIT"

rsync wim@remote:/path/to/something/big ~/downloads

2008年11月19日 星期三

Build Subversion 1.5.4 on Ubuntu Linux

Download Subversion-1.5.4 source code here.

Install dependencies first.
sudo apt-get build-deps subversion

Download libneon here,and unpack the source to the subversion-1.5.4 directory.
tar xvf neon-0.28.3.tar.gz
mv neon-0.28.3.tar.gz subversion-1.5.4/neon


because of dav_svn apache module is loaded in mods-enable/mods-avaliable directory
so we need to insert some dummy code to let the installation successful.

cd /etc/apache2
sudo -s
cat mods-available/dav_svn.load >> httpd.conf
vim httpd.conf


comment the "LoadModule dav_svn ... "

Then compile our subversion
cd subversion-1.5.4
./autogen.sh
./configure --prefix=/local/usr --enable-shared
make && sudo make install


remember to prepend /local/usr to your path env variable.

if you want to install lastest SVK , you need to build SWIG binding of svn.

download SWIG here. unpack it and make , make install
back to the subversion-1.5.4 directory , re-configure it , then

make swig-pl
make check-swig-pl
make swig-pl-lib
cd subversion/bindings/swig/perl/native
perl Makefile.PL EXTRAOPTIONSHERE
sudo make install