VineLinux 6.3
[*] Basic Set

[root@fd /]# /etc/init.d/network start
[root@fd /]# apt-get update
[root@fd /]# apt-get upgrade
[root@fd /]# apt-get install nano
[root@fd /]# apt-get install rsync
[root@fd /]# apt-get install lsyncd
[root@fd /]# apt-get install openssl
[root@fd /]# apt-get install build-essential

[root@fd /]# nano /etc/sysctl.conf
fs.inotify.max_user_watches = 90000

[root@fd /]# sysctl -p

net.ipv4.ip_forward = 0
net.ipv4.conf.default.rp_filter = 1
net.ipv4.conf.default.accept_source_route = 0
kernel.sysrq = 0
net.ipv4.tcp_syncookies = 1
kernel.core_uses_pid = 1
fs.inotify.max_user_watches = 90000

[root@fd /]# nano /etc/init.d/lsyncd

start() {
/usr/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 /]# nano /etc/lsyncd.conf

settings = {
logfile = "/var/log/lsyncd.log",
statusFile = "/tmp/lsyncd.stat",
statusInterval = 1,
}
sync {
default.rsync,
source= "//",
target= "192.168.0.99:/crash/",
rsyncOpts= "-avlt",
"-az",
"-delete",
excludeFrom="/etc/rsync_exclude.lst",
}

[root@fd /]# nano /etc/rsync_exclude.lst

- /bin
- /boot
- /dev
- /lib
- /lib64
- /mnt
- /proc
- /sbin
- /sys
- /tmp

[root@fd /]# chmod +x /etc/init.d/lsyncd
[root@fd /]# /etc/init.d/lsyncd start
[root@fd /]# /etc/init.d/lsyncd status
lsyncd (pid 2568) is running...


[root@s99 /]# cd crash
[root@s99 crash]# ls
etc/ home/ root/ save/ usr/ var/