Do these files exist:
/usr/lib/systemd/system/clamav-daemon.service
/usr/lib/systemd/system/clamav-daemon.socket
and these links:
/etc/systemd/system/multi-user.target.wants/clamav-daemon.service
/etc/systemd/system/sockets.target.wants/clamav-daemon.socket
# cat /usr/lib/systemd/system/clamav-daemon.service
[Unit]
Description=Clam AntiVirus userspace daemon
Documentation=man:clamd(8) man:clamd.conf(5)
https://www.clamav.net/documents/
Requires=clamav-daemon.socket
# Check for database existence
ConditionPathExistsGlob=/var/lib/clamav/main.{c[vl]d,inc}
ConditionPathExistsGlob=/var/lib/clamav/daily.{c[vl]d,inc}
[Service]
ExecStart=/usr/sbin/clamd --foreground=true
# Reload the database
ExecReload=/bin/kill -USR2 $MAINPID
StandardOutput=syslog
Restart = on-failure
[Install]
WantedBy=multi-user.target
Also=clamav-daemon.socket
# cat /usr/lib/systemd/system/clamav-daemon.socket
[Unit]
Description=Socket for Clam AntiVirus userspace daemon
Documentation=man:clamd(8) man:clamd.conf(5)
https://www.clamav.net/documents/
# Check for database existence
ConditionPathExistsGlob=/var/lib/clamav/main.{c[vl]d,inc}
ConditionPathExistsGlob=/var/lib/clamav/daily.{c[vl]d,inc}
[Socket]
ListenStream=/run/clamav/clamd.ctl
#ListenStream=127.0.0.1:1024
SocketUser=clamav
SocketGroup=clamav
RemoveOnStop=True
[Install]
WantedBy=sockets.target
# ls -l /etc/systemd/system/multi-user.target.wants/clamav-daemon.service
lrwxrwxrwx 1 root root 45 Jan 30 05:44
/etc/systemd/system/multi-user.target.wants/clamav-daemon.service ->
/usr/lib/systemd/system/clamav-daemon.service
# ls -l /etc/systemd/system/sockets.target.wants/clamav-daemon.socket
lrwxrwxrwx 1 root root 44 Jan 30 05:44
/etc/systemd/system/sockets.target.wants/clamav-daemon.socket ->
/usr/lib/systemd/system/clamav-daemon.socket
On 7/22/2018 9:19 PM, ChandranManikandan wrote:
Hi Friends,
Clamav was installed on my Centos7 and freshclam command also running
well.
But clamav service is not running.
when i try this command systemctl status clamd below message come.
Unit clamd.service could not be found.
User permission everything is okay and package also was installed.
clamav-0.100.0-4.qt.el7.x86_64
Could you let me know what is the causes in this server and how to fix it.
--
*/Thanks & Best Regards,
Manikandan.C
/*
--
Eric Broch
White Horse Technical Consulting (WHTC)