Service Clamav doesn't start

Issues related to applications and software problems
Post Reply
johnfred
Posts: 3
Joined: 2017/05/10 00:35:32

Service Clamav doesn't start

Post by johnfred » 2017/05/10 02:42:24

Hi,

I have installed Clamav on CentOS release 6.9 (Final):

#yum install epel-release -y
#yum install clamad clam-db (clamav-0.99.2-2.el6.x86_64)
#chkconfig clamad on

I did the following command to update pattern:
#freshclam

But when i did:
# service clamad start -> this command is failed

I don't know why? Can you help me to understand? Thank you

Regards,

User avatar
TrevorH
Site Admin
Posts: 33202
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: Service Clamav doesn't start

Post by TrevorH » 2017/05/10 06:09:32

You did mean service clamd start ? (there's only one 'a' in clamd, it's not clamad).
The future appears to be RHEL or Debian. I think I'm going Debian.
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 and 6 are deadest, do not use them.
Use the FAQ Luke

johnfred
Posts: 3
Joined: 2017/05/10 00:35:32

Re: Service Clamav doesn't start

Post by johnfred » 2017/05/10 20:53:29

Yes Sorry, I did service clamd start.

aks
Posts: 3073
Joined: 2014/09/20 11:22:14

Re: Service Clamav doesn't start

Post by aks » 2017/05/10 21:47:07

Isn't there a clamd log in /var/log/? Does it not offer clues?
As an alternative, work out what /etc/init.d/clamd launches and run it in the foreground to see any errors.

johnfred
Posts: 3
Joined: 2017/05/10 00:35:32

Re: Service Clamav doesn't start

Post by johnfred » 2017/05/10 21:48:28

Hi,

I resolved my problem:

- I checked clamav logs:
#/var/log/clamav/clamd.log

This error is displayed:
ERROR: daemonize() failed: Cannot allocate memory

I add Swap like that:
#sudo dd if=/dev/zero of=/swapfile bs=1024 count=512k
#sudo mkswap /swapfile
#sudo swapon /swapfile

#sudo nano /etc/fstab
I add on this file: /swapfile swap swap defaults 0 0

#chown root:root /swapfile
#chmod 0600 /swapfile

#sysctl vm.swappiness=10

#sudo nano /etc/sysctl.conf

and i add:

# Search for the vm.swappiness setting. Uncomment and change it as necessary.
vm.swappiness=10


After reboot, the service clamd was running.
:D :D :D :D :D :D :D :D :D :D :D

Post Reply