Fedora 13 [root@fd /]# ls bin boot dev etc home lib mnt proc root sbin selinux sys tmp usr var [root@fd /]# cd [root@fd ~]# yum update yum [root@fd ~]# yum clean all [root@fd ~]# yum -y install gcc [root@fd ~]# yum -y install libxml2-devel lua-devel lua-static [root@fd ~]# export LUA_CFLAGS='-I/usr/include -lm -ldl' [root@fd ~]# export LUA_LIBS='/usr/lib/liblua.a' [root@fd ~]# wget http://lsyncd.googlecode.com/files/lsyncd-2.0.2.tar.gz [root@fd ~]# tar zxvf lsyncd-2.0.2.tar.gz [root@fd ~]# cd lsyncd-2.0.2 [root@fd lsyncd-2.0.2]# ./configure && make && make install [root@fd lsyncd-2.0.2]# cp examples/lrsync.lua /etc/lsyncd.conf [root@fd lsyncd-2.0.2]# cd [root@fd ~]# rm -rf lsyncd-2.0.2 [root@fd ~]# rm -rf lsyncd-2.0.2.tar.gz [root@fd ~]# vi /etc/lsyncd.conf settings = { statusFile = "/tmp/lsyncd.stat", statusIntervall = statusInterval, } sync{ default.rsync, source="/home/", target="192.168.0.99:/up/", rsyncOps="-avlt", } [root@fd ~]# vi /etc/init.d/lsyncd #!/bin/bash # # lsyncd # # chkconfig: - 99 20 # description: lsyncd auto start script start() { /usr/local/bin/lsyncd /etc/lsyncd.conf } stop() { /bin/kill -9 `/sbin/pidof lsyncd` until [ -z $(/sbin/pidof lsyncd) ]; do :; done } case "$1" in start) start ;; stop) stop ;; restart) stop start ;; status) pid=`pidof lsyncd` if [ $? -eq 0 ]; then echo "lsyncd (pid $pid) is running..." else echo "lsyncd is not running" fi ;; *) echo "Usage: lsyncd {start|stop|restart|status}" exit 1 esac exit $? [root@fd ~]# chmod +x /etc/init.d/lsyncd [root@fd ~]# /etc/init.d/lsyncd start [root@fd ~]# chkconfig --add lsyncd [root@fd ~]# chkconfig lsyncd on [root@fd ~]# reboot [root@copy up]# Broadcast message from root@fd.errorz.net (/dev/pts/0) at 22:28 ... The system is going down for reboot NOW! Broadcast message from root@fd.errorz.net (/dev/pts/0) at 22:28 ... The system is going down for reboot NOW! Connection to fd.errorz.net closed by remote host. Connection to fd.errorz.net closed.