Friday, October 03, 2008

rsync from windows to linux

To mirror files/directory from Windows to Linux

You need COPSSH and cwrsync server on XP SP3

Both can be downloaded from http://www.itefix.no/i2/cwrsync

XP - INSTALLATION

Add a user account with password on the XP

Install COPSSH

Activate the user a/c to use copssh, via the programs--> COPSSH → Activate a User

Try ssh'ing to windows using this a/c, if OK proceed. Otherwise sort this out.

Now install cwrsync server

Do not choose to install ssh server

Once installed, copy the rsync.exe from C:/program files/cwrsyncserver/bin to C:/program files/copSSH/bin/

Start the copssh Unix bash shell;

Edit the rsyncd.conf file in c:/program files/cwrsyncserver/rsyncd.conf

for d:/books


[test3]
path = /cygdrive/d/books
read only = true
transfer logging = yes

Restart the cwrsync server.

On the linux

In a shell
rsync -r --verbose --progress user1@192.168.200.2:/cygdrive/d/books/ /root/back/

The files will be copied to /root/back/

Saturday, March 29, 2008

my dns on debian Etch

apt-get install gcc libc6-dev g++ gcc mysql-server
cd /usr/lib
ln -s libmysqlclient.so.15.0.0 libmysqlclient.so.12
apt-get install libz-dev
apt-get install libmysqlclient15-dev phpmyadmin

get mydns from http://mydns.bboy.net/download/
extract ; change into directory
./configure --with-mysql-lib=/usr/lib
make
make install
make conf

---change host, username and passwd

$ mysqladmin -h localhost -u root -p create mydns
$ mydns --create-tables | mysql -h host -u username -p mydns

on phpmyadmin create a non-root user and grant him all privleges on mydns database....

change details in /etc/mydns.conf

in the cource code
cd contrib
chmod u+x *

./create_domain.pl --domain=lo.org ip=172.16.0.100 --create

Now go into mydns database in phpmyadmin and edit your host entries in table 'rr'.

to create another domain use create_domain.pl script in contrib



########mydns init file##########################

#! /bin/sh
#
# mydns Start the MyDNS server
#
# Author: Falko Timme .
#

set -e

PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
NAME=mydns
DAEMON=/usr/local/sbin/$NAME
DESC="DNS server"

SCRIPTNAME=/etc/init.d/$NAME

# Gracefully exit if the package has been removed.
test -x $DAEMON || exit 0

case "$1" in
start)
echo -n "Starting $DESC: $NAME"
$DAEMON --background
echo "."
;;
stop)
echo "Stopping $DESC: $NAME."
kill -9 `pidof $NAME` &> /dev/null
;;
restart)
echo "Restarting $DESC: $NAME."
$0 stop && sleep 1
$0 start
;;
*)
echo "Usage: $SCRIPTNAME {start|stop|restart}" >&2
exit 1
;;
esac

exit 0

####################################
Powered By Blogger