Install ClamAV before installing zlib
Otherwise, the installation process will be an error.
TAR-ZXVF zlib-1.2.3.tar.gz
CD zlib-1.2.3
./configure
Make
Make Install (zlib compilation installation)
Because I'm installing with a source package, I need to manually create a CLAMAV user
Groupadd ClamAV (Create ClamAV Group
Useradd-g ClamAV ClamAV (create ClamAV user and join ClamAV Group)
TAR-ZXVF clamav-0.95.2.tar.gz (Unzip)
CD clamav-0.95.2 (enter directory)
./configure--prefix=/usr/local/clamavmakemake Install (compile and install)
After the installation of this ClamAV, let ClamAV start up.
First create a directory. Mkdir/usr/local/clamav/logs (log storage directory)
Mkdir/usr/local/clamav/updata (clanav virus Library directory)
Vi/usr/local/clamav/etc/clamd.conf
# Example comment out this line. Line 8th
Logfile/usr/local/clamav/logs/clamd.log Delete the previous comment directory and change to logs below line 14th
Pidfile/usr/local/clamav/updata/clamd.pid Delete the previous comment path and change the 57th line.
Databasedirectory/usr/local/clamav/updata Ibid. 65th
vi/usr/local/clamav/etc/freshclam.conf# Example comment out this line. Line 8th
Databasedirectory/usr/local/clamav/updataupdatelogfile
/usr/local/clamav/logs/freshclam.logpidfile
/usr/local/clamav/updata/freshclam.pid (Forget to write the number of lines to find it yourself.)
Create the log file below Touch/usr/local/clamav/logs/freshclam.log
Chown Clamav:clamav/usr/local/clamav/logs/freshclam.log
Touch/usr/local/clamav/logs/clamd.log
Chown Clamav:clamav/usr/local/clamav/logs/clamd.log
Chown Clamav:clamav/usr/local/clamav/updata
/usr/local/clamav/bin/freshclam (Upgrade virus database) (The unauthorized version requires an upgrade every 7 days)
Make sure your Linux network is up and running. [attachment=43384] takes a little time. I've been waiting for half an hour, and finally the download is complete.
./usr/local/clamav/bin/clamscan--remove (avira current directory and delete infected files)
Actual production environment Application
General use of scheduled tasks, so that the server every night regularly with new and timed antivirus. Save the antivirus log, my crontab file is as follows
1 3 * * *
/USR/LOCAL/CLAMAV/BIN/FRESHCLAM20 3 * * *
/usr/local/clamav/bin/clamscan-r/Home--remove-l/var/log/clamscan.log
ClamAV anti-virus software installation and usage configuration