Installing clamav antivirus on linux is very easy:

Debian and Ubuntu:

apt-get install clamav -y  


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 ~/
# chmod +x ~/

Add the following text to it:

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

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/</$CLAMLOG;>