I have CentOS 7 and it comes with Rsync 3.0.9. I downloaded the 3.1.1 el7 rpm and installed with rpm -Uvh.
Now the daemon refuse to start. I tried to create :
/usr/lib/systemd/system/rsyncd.service
[Unit]
Description=A program for synchronizing files over a network
After=syslog.target network.target
ConditionPathExists=/etc/rsyncd.conf
[Service]
EnvironmentFile=-/etc/sysconfig/rsyncd
ExecStart=/usr/bin/rsync --daemon --no-detach "$OPTIONS"
[Install]
WantedBy=multi-user.target
No luck :
/bin/systemctl status rsyncd.service
● rsyncd.service
Loaded: not-found (Reason: No such file or directory)
Active: failed (Result: exit-code) since Thu 2016-04-21 15:27:00 EDT; 56min ago
Main PID: 1452 (code=exited, status=20)
Note those referenced file in the configuration exist:
-rw-r--r-- 1 root root 1699 Feb 4 14:27 /etc/rsyncd.conf
-rw-r--r-- 1 root root 11 Apr 21 16:09 /etc/sysconfig/rsyncd
I've got 3.1.1 under fedora 22.
The requisite config files for
rsyncd
are in thersync-daemon
package. I've listed the files in each package below.I'd just install the extra package.
But, I did notice a typo in your config file ...
Change:
Into:
Here's a list of files in the
rsync
package:Here's a list of files in the
rsync-daemon
package:UPDATE:
I'm not sure what dependency you mean, but I looked at the rpm's
.spec
file and it listssystemd-units
, but I can't find an rpm for that.Not quite sure what this means. Did the files extract/install or not? Can you do
ls -l
on them? As a last resort, did you tryrpm --nodeps --force
?Given an
.rpm
file, it is possible to manually extract files usingrpm2cpio
[should be part of the already installedrpm
package] and eithercpio
orpax
[which is very similar totar
, but understands bothtar
andcpio
format archives].I've usually had better luck using
pax
. It has its own rpm [to install:yum install pax
]. In fact, I've never gotten therpm2cpio/cpio
combination to work correctly for extraction.To list an rpm file using
pax
:To extract an rpm file using
pax
:You may have to consult some logfiles, such as
/var/log/messages
,/var/log/audit/audit.log
,/var/log/secure
, and may have to use thejournalctl
program to view the systemd log.You might have some [silly]
selinux
security restriction that has to be fixed. You may have to runrestorecon
on the config files.Also, you may have to add something to the
/etc
files as it may bersync
itself that doesn't want to start (vs.systemd
not startingrsync
).Below are the contents of the
rsync-daemon
files, except for the man page file [which is way too large to include here]. The man page file can be found here: http://linux.die.net/man/5/rsyncd.conf/etc/rsyncd.conf
/etc/sysconfig/rsyncd
/usr/lib/systemd/system/rsyncd.service
/usr/lib/systemd/system/[email protected]
/usr/lib/systemd/system/rsyncd.socket
I found out that
systemctl daemon-reload
is required to load the service. After doing that, it worked right away.