[http://www.clamav.net Clam AntiVirus] is an open source (GPL) anti-virus toolkit for UNIX. It provides a number of utilities including a flexible and scalable multi-threaded daemon, a command line scanner and advanced tool for automatic database updates. Because ClamAV's main use is on file/mail servers for Windows desktops it primarily detects Windows viruses and malware.

−

* Configure it

+

== Installation ==

−

*# Edit /etc/clamav/clamd.conf, /etc/clamav/freshclam.conf and comment out the example flag

+

ClamAV can be [[pacman|installed]] with package {{Pkg|clamav}}, available in the [[Official Repositories]].

−

*# Edit /etc/conf.d/clamav and change the start options from "no" to "yes"<br>

−

<pre># change these to "yes" to start

−

START_FRESHCLAM="yes"

−

START_CLAMD="yes"</pre>

−

* Edit /etc/rc.conf and write clamav into the list of daemons, if you like to start clamav automaticly when booting.

+

== Configuration ==

+

Whether you are going to use clamav as a daemon or use it as a simple file checker you need to comment out the line that contains the word ''Example'', usually it is found at the beginning of {{ic|/etc/clamav/freshclam.conf}} and {{ic|/etc/clamav/clamd.conf}} files.

+

== Starting the daemon ==

+

If you want to use the daemon, you can start it with:

+

# rc.d start clamav

+

To start it automatically at boot add '''clamav''' to the {{Ic|DAEMONS}} array in {{ic|/etc/rc.conf}}. Also in {{ic|/etc/conf.d/clamav}} change the start options from "no" to "yes".

+

# change these to "yes" to start

+

START_FRESHCLAM="yes"

+

START_CLAMD="yes"

+

If you want to use the daemon in a systemd environment:

+

# systemctl enable clamd

+

== Updating database ==

+

Edit the below file and comment out the line saying "Example"

+

# vim /etc/clamav/freshclam.conf

+

# Comment or remove the line below.

+

#Example

+

Update the virus definitions with:

+

# freshclam

+

The database files are saved in:

+

/var/lib/clamav/daily.cvd

+

/var/lib/clamav/main.cvd

+

== Scan for Viruses ==

+

{{ic|clamscan}} can be used to scan certain files, home directory, or an entire system:

+

$ clamscan myfile

+

$ clamscan -r -i /home

+

$ clamscan -r -i --exclude-dir=^/sys\|^/proc\|^/dev /

+

If you would like {{ic|clamscan}} to remove the infected file use the {{ic|--remove}} option in the command.

Revision as of 01:52, 19 November 2012

zh-CN:ClamAVClam AntiVirus is an open source (GPL) anti-virus toolkit for UNIX. It provides a number of utilities including a flexible and scalable multi-threaded daemon, a command line scanner and advanced tool for automatic database updates. Because ClamAV's main use is on file/mail servers for Windows desktops it primarily detects Windows viruses and malware.

Contents

Installation

Configuration

Whether you are going to use clamav as a daemon or use it as a simple file checker you need to comment out the line that contains the word Example, usually it is found at the beginning of /etc/clamav/freshclam.conf and /etc/clamav/clamd.conf files.

Starting the daemon

If you want to use the daemon, you can start it with:

# rc.d start clamav

To start it automatically at boot add clamav to the DAEMONS array in /etc/rc.conf. Also in /etc/conf.d/clamav change the start options from "no" to "yes".

# change these to "yes" to start
START_FRESHCLAM="yes"
START_CLAMD="yes"