Installing clamav antivirus on linux is very easy:

Debian and Ubuntu:

apt-get install clamav -y  

CentOS:

yum install clamav -y  

After installation we need to configure automatic updates of antivirus databases and regular scans of the disk system
Create an executable file somewhere:

# touch ~/clamscan.sh
# chmod +x ~/clamscan.sh

Add the following text to it:

#!/bin/bash
# Settings
SUBJECT="Clamav Scan Result `date` `hostname`"  
EMAIL="email for alerts  
#---
CLAMLOG="/tmp/clamscan.log"  
CLAMSCAN=`which clamscan`  
FRESHCLAM=`which freshclam`  
MAIL=`which mail`  
TR=`which tr`  
AWK=`which awk`  
XARGS=`which xargs`  
RM=`which rm`  
WC=`which wc`  
$FRESHCLAM
$RM -rf $CLAMLOG
$CLAMSCAN --stdout -r -i / > $CLAMLOG
RESULT=`$WC - l` $CLAMLOG | $AWK '{print $1}'  
if [ $RESULT -ge 0 ];  
then  
$MAIL -s "$SUBJECT" "$EMAIL" < $CLAMLOG; $AWK '{print $1}' $CLAMLOG | $TR ':' ' ' | $XARGS $RM -rv; else echo "OK !" >$CLAMLOG;
fi  

All that's left is to add the script to run automatically according to a schedule (daily, for example)
To do this, edit the cron:

# crontab -e

And add to it the line
39 3 1-5 * * /root/clamav.sh</$CLAMLOG;>