2. nano /etc/rsyncd.conf
-----------------------------------
max connections = 2
log file = /var/log/rsync.log
timeout = 300
[pub]
comment = apa-apa aje
path = /path/ke/public/share
read only = yes
list = yes
uid = nobody
gid = nobody
auth users = pub
;hosts allow = 192.168.1.0/24
secrets file = /etc/rsyncd.secrets
----------------------------------
3. chmod a+r /path/tadi/laa
4. nano /etc/rsyncd.secrets dan masukkanusername:password
cth:
pub:pub
5. sebagai root chmod 600 /etc/rsyncd.secrets utk sekuriti
6. Setengah distro guna inetd dan setengah lagi guna xinetd..
pastikan mana satu daa
buat ni:-
-
Jika inetd : "/etc/inetd.conf":
rsync stream tcp nowait root /path/ke/rsync rsync --daemon
Jika xinetd, ada kalanya file "/etc/xinetd.d/rsync" sudah ada jadi
lakukan perubahan pada:
disable = yesjadi:
disable = nosekiranya file tadi tak ada.. buat file tu dan masukkan:
service rsync
{
disable = no
socket_type = stream
wait = no
user = root
server = /usr/bin/rsync
server_args = --daemon
log_on_failure += USERID
}
7. kalau nak tukar port rsync ( default 873 )
boleh tukar di /etc/services
8.killall -HUP inetdataukillall -HUP xinetd
untuk restart inetd dan xinetd
Test??
rsync rsync://pub@server-ko-la/
rsync rsync://pub@server-ko-la/pub/
utk download
rsync -v --progress --partial rsync://pub@server-ko-la/pub/fail
rsync -aPv rsync://pub@server-ko-la/pub/folder
gunakan cron utk sync folder seperti berikut15 1 * * * rsync -vazL rsync://pub@server-ko/pub/ /var/www/
No comments:
Post a Comment