ClamAV anti-virus software installation and usage configuration

Source: Internet
Author: User

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.