what i'm basically trying to do is set up a system where i have a management server that has the "master configurations" for bind, mailscanner rules, sendmail rules (mailertable, access, and such) and a few other static files, and a bunch of slave servers that all run the same configuration where if the management server is changed, the slaves will be updated to reflect that within a decent amount of time. i've been reading alot and it looks like RSync and some scripting (which i'm looking forward to learning) is probably my best bet for doing this. all of the boxes that are slaves are running RHEL3 ES and the master is running redhat 9 (it will be RHEL3 in about six months probably) and rsync was installed on all of them already and all of the default locations for those services are still there.
anyways, from what little i've read, they say that i should set up the management server to be an RSync server that runs in deamon mode. so i set up a rsyncd.conf file in my /etc/ dir that looks like the below:
motd file = /etc/rsyncd.motd
log file = /var/log/rsyncd.log
pid file = /var/run/rsyncd.pid
lock file = /var/run/rsync.lock
syslog facility = daemon
socket options = SO_KEEPALIVE
max connections = 25
uid = nobody
gid = nogroup
path = /etc/rsync/test
comment = For RSync testing purposes only
read only = true
auth users = authorized_account1,authorized_account2
secrets file = /etc/rsyncd.secrets
list = yes
i stole the config from another site that had a guide that i couldn't get to work for me so if there is stuff in there that doesn't make sense, thats probably why. i also created a rsyncd.motd and put some text in there and a rsyncd.secrets file that basically has those usernames and passwords like the guide stated. just to be clear, all of these servers are on a lan behind a few firewalls so i'm not too concerned about security but if it works with or without it, i'll take it. i didn't create any of the other files but did type in the 'rsync --daemon' command which redhat took without complaint so i'm assuming its running in daemon mode now.
i logged into one of the slave servers and did the below command:
rsync -avz email@example.com:/testing/file1 /etc/rsync/testing
(/etc/rsync/testing is a directory on the local box while file1 is a file in /etc/rsync/test on the master server which is remote)
and i get teh following error:
master1.mydomain.com: Connection refused
rsync: connection unexpectedly closed (0 bytes read so far)
rsync error: error in rsync protocol data stream (code 12) at io.c(165)
so i'm a little lost as to what i missed or what is going on. this is a very new technology to me so until i get it down once and figure out how its supposed to look, i'm probably going to be lost on it.
Also, once i get this server up, am i correct in assuming i can get the master server (via a script) to push config files down to the slave systems when the master system's files change? also, can i (via rsync or script) remotely run commands like "makemap hash" on the remote systems? obviously if i'm trying to sync mailertable's, they'll have to compile after being downloaded. thoughts?