dochost ADMIN


เข้าร่วมเมื่อ: 22/10/2009 ตอบ: 23
|
ตอบ: 26/10/2009 6:03 pm ชื่อกระทู้: -How to Build rsync server in Centos |
|
|
| โค้ด: |
# yum -y install rsync xinetd
|
To make sure you have these rsync and xinetd
| โค้ด: |
# chkconfig --add xinetd
# chkconfig --list xinetd
|
Enable rsync
| โค้ด: |
# vi /etc/xinetd.d/rsync
Change disable = yes into disable = no
|
Check again for xinetd process
Create new rsync config file in /etc
Usually we will use rsync and PAM authentication
| โค้ด: |
# vi /etc/rsyncd.conf
max connections = 2
log file = /var/log/rsync.log
timeout = 300
[shares]
comment = comment here
path = /home/mojo/shares
read only = true # chg to false if you want changeable
list = yes
uid = mojo
gid = mojo
auth users = mojo
hosts allow = xx.xxx.xxx.xx
|
Create new user
| โค้ด: |
# useradd -G mojo mojo
# passwd mojo
|
Secure the rsyncd
| โค้ด: |
# chown root.root /etc/rsyncd.*
# chmod 600 /etc/rsyncd.*
|
| โค้ด: |
# service xinetd restart
|
|
|