Posted by: jasonk2600 | November 22, 2009

Quickie HowTo – Setting up a Rsync Server in FreeBSD

Installation – Server

Install the Rsync server from the ports collection.

# cd /usr/ports/net/rsync
# make install clean
# rehash

 

Configuration – Server

Modify the /usr/local/etc/rsyncd.conf file to reflect the following:

uid = nobody
gid = nobody
use chroot = no
max connections = 4
syslog facility = local5
pid file = /var/run/rsyncd.pid

Next, add the directories that you want the Rsyncd server to serve in the /usr/local/etc/rsyncd.conf file. In the example below, rsyncd will serve the /usr/ports/distfiles directory and all files contained within it.

[distfiles]
   path = /usr/ports/distfiles
   comment = Ports collection distfiles

Finally, set the rsyncd to start at system boot time and run it for the first time.

# echo "rsyncd_enable=YES" >> /etc/rc.conf
# /usr/local/etc/rc.d/rsyncd start

 

Installation – Client

Install rsync from the ports collection.

# cd /usr/ports/net/rsync
# make install clean

 

Testing

Test your newly configured rsyncd server by running the following on the client:

# rsync -avz your.rsyncserver.com::distfiles /usr/ports/distfiles
  ....[ Lots of output ]....

 

  [EoF]
Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Categories

%d bloggers like this: