游戏服务器管理-文件同步的解决方案
服务器均使用LINUX的CENTOS,同步程序使用Rsync,台湾服务器为Rsync的服务端
服务端配置
同步软件安装
yum -y install xinetd
启动rsync服务端
#rsync –daemon
配置同步软件为可用
vi /etc/xinetd.d/rsync
# default: off
# description: The rsync server is a good addition to an ftp server, as it /
# allows crc checksumming etc.
service rsync
{
disable = no // change
socket_type = stream
wait = no
user = root
server = /usr/bin/rsync
server_args = –daemon
log_on_failure += USERID
}
配置本地同步参数
vi /etc/rsyncd.conf
[game-test-taiwan]
path = /var/www/
host allow = xx.xx.xx.xx
host deny = *
list = true
uid = root
gid = root
客户端配置
安装同步软件
yum install -y rsync
配置排除指定目录或文件(每条记录占一行,支持通配符)
vi /etc/rsync-exclude-test
/xxxxxx
执行同步(从服务器端下拉)
rsync -avz –delete –exclude-from=/etc/rsync-exclude-test 203.69.85.43::game-test-taiwan /var/backup
执行同步(从客户端上传)
rsync -avz –delete –exclude-from=/etc/rsync-exclude-test /var/backup 203.69.85.43::game-test-taiwan/forrsync


过来支持博主,能否和博主交换链接。c9