CentOS – ClamAV issues

Clamd and freshclam will use 100% of core cpu process.

 

Solution

Edit file: /usr/lib/systemd/system/[email protected]

[Unit]
Description = clamd scanner (%i) daemon
Documentation=man:clamd(8) man:clamd.conf(5) https://www.clamav.net/documents/
# Check for database existence
# [email protected]@/main.{c[vl]d,inc}
# [email protected]@/daily.{c[vl]d,inc}
After = syslog.target nss-lookup.target network.target

[Service]
Type = forking
ExecStart = /usr/sbin/clamd -c /etc/clamd.d/%i.conf
Restart = on-failure
TimeoutSec = 180

Adding TimeoutSec (180 seconds were enough for me)

Run this commands:

systemctl daemon-reload
systemctl start [email protected]

Centos 7.1 – error repository

Uncomment baseurl in this file: /etc/yum.repos.d/CentOS-Base.repo

#baseurl=http://mirror.centos.org/centos/$releasever/os/$basearch/

In this block:

name=CentOS-$releasever - Base
mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=os&infra=$infra
#baseurl=http://mirror.centos.org/centos/$releasever/os/$basearch/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7

By uncomment, I mean change this:

#baseurl=http://mirror.centos.org/centos/$releasever/os/$basearch/, to this: 
baseurl=http://mirror.centos.org/centos/$releasever/os/$basearch/ (remove the #).