[linux] rsync Setting
서버간의 파일을 공유 하고 싶을때 rsync나 scp를 활용 할 수 있다.
이번에는 rsync에 대해서 알아 보도록 하자.
우선 rsync를 사용하기 위해서는 rsync가 필요 하겠지? 패키지가 설치 되어 있는지 확인해 볼 필요가 있겠다.
Server program install
# rpm -qa | grep rsync
없다면
# yum install rsync
xinetd 패키지도 필요 하다.
# rpm -qa | grep xinetd
마찬가지로 없다면
# yum install xinetd
사용할 준비는 되었다.
Server Setting
# vi /etc/xinetd.d/rsync 를 열어서
disable = yes라고 되어 있는 부분을 no로 변경 하자.
# default: off
# description: The rsync server is a good addition to an ftp server, as it \
# allows crc checksumming etc.
service rsync
{
disable = no
socket_type = stream
wait = no
user = root
server = /usr/bin/rsync
server_args = --daemon
log_on_failure += USERID
}
Client Setting
이제는 환경 설정 파일을 만들어 줄 차례이다
# vi /etc/rsyncd.conf
[bmrbt] #rsync 서비스명
path=/svc/ #경로
comment = rsync_channel_image
uid = svc
gid = svc
use chroot=yes
read only = no
host allow=114.202.131.248
max connections = 5
timeout=300
rsync: mkstemp "/.test.PZQvTe" (in BACKUP) failed: Permission denied (13)
/etc/selinux/conf 파일에서
SELINUX=enforcing으로 되어 있는데
SELINUX=disabled 로 변경 한다.
# This file controls the state of SELinux on the system.
# SELINUX= can take one of these three values:
# enforcing - SELinux security policy is enforced.
# permissive - SELinux prints warnings instead of enforcing.
# disabled - No SELinux policy is loaded.
SELINUX=disabled
# SELINUXTYPE= can take one of these two values:
# targeted - Targeted processes are protected,
# mls - Multi Level Security protection.
SELINUXTYPE=targeted
요로코롬... 변경하고 서버를 재부팅 한다.
#reboot 또는 shutdown -r now
그런담에 다시 해 보시면.. 우왕... 신세계!!