docs/html/node21.html
9893a85c
 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
 
 <!--Converted with LaTeX2HTML 99.2beta8 (1.46)
 original version by:  Nikos Drakos, CBLU, University of Leeds
 * revised and updated by:  Marcus Hennecke, Ross Moore, Herb Swan
 * with significant contributions from:
   Jens Lippmann, Marek Rouchal, Martin Wilck and others -->
 <HTML>
 <HEAD>
 <TITLE>Setting up auto-updating</TITLE>
 <META NAME="description" CONTENT="Setting up auto-updating">
 <META NAME="keywords" CONTENT="clamdoc">
 <META NAME="resource-type" CONTENT="document">
 <META NAME="distribution" CONTENT="global">
 
 <META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
 <META NAME="Generator" CONTENT="LaTeX2HTML v99.2beta8">
 <META HTTP-EQUIV="Content-Style-Type" CONTENT="text/css">
 
 <LINK REL="STYLESHEET" HREF="clamdoc.css">
 
 <LINK REL="next" HREF="node22.html">
 <LINK REL="previous" HREF="node20.html">
 <LINK REL="up" HREF="node16.html">
 <LINK REL="next" HREF="node22.html">
 </HEAD>
 
 <BODY >
 <!--Navigation Panel-->
476362a3
 <A NAME="tex2html847"
9893a85c
   HREF="node22.html">
 <IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next.png"></A> 
476362a3
 <A NAME="tex2html843"
9893a85c
   HREF="node16.html">
 <IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up.png"></A> 
476362a3
 <A NAME="tex2html837"
9893a85c
   HREF="node20.html">
 <IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="prev.png"></A> 
476362a3
 <A NAME="tex2html845"
9893a85c
   HREF="node1.html">
 <IMG WIDTH="65" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="contents" SRC="contents.png"></A>  
 <BR>
476362a3
 <B> Next:</B> <A NAME="tex2html848"
9893a85c
   HREF="node22.html">Closest mirrors</A>
476362a3
 <B> Up:</B> <A NAME="tex2html844"
9893a85c
   HREF="node16.html">Configuration</A>
476362a3
 <B> Previous:</B> <A NAME="tex2html838"
9893a85c
   HREF="node20.html">Testing</A>
476362a3
  &nbsp <B>  <A NAME="tex2html846"
9893a85c
   HREF="node1.html">Contents</A></B> 
 <BR>
 <BR>
 <!--End of Navigation Panel-->
 
 <H2><A NAME="SECTION00054000000000000000">
 Setting up auto-updating</A>
 </H2>
     <code>freshclam</code> is the default database updater for Clam AntiVirus.
     It can work in two modes:
     
 <UL>
 <LI>interactive - from command line, verbosely
 </LI>
 <LI>daemon - alone, silently
     
 </LI>
 </UL>
     When started by a superuser it drops privileges and switches
     to the <I>clamav</I> user. <code>freshclam</code> uses the
     <TT><A NAME="tex2html32"
   HREF="database.clamav.net">database.clamav.net</A></TT> round-robin DNS which automatically selects
55b1a5f8
     a database mirror<A HREF="node156.html#mirrors">9.1</A>. <code>freshclam</code> is an advanced tool:
9893a85c
     it supports database version verification through DNS, proxy servers (with
     authentication), digital signatures and various error scenarios.
     <B>Quick test: run freshclam (as superuser) with no parameters
     and check the output.</B> If everything is OK you may create the log file in
     /var/log (owned by <I>clamav</I> or another user <code>freshclam</code> will be
     running as (<code>--user</code>):
     <PRE>
9c8806fb
 	# touch /var/log/freshclam.log
 	# chmod 600 /var/log/freshclam.log
 	# chown clamav /var/log/freshclam.log
9893a85c
 </PRE>
     Now you <I>should</I> edit the configuration file (<code>freshclam.conf</code> or
     <code>clamd.conf</code> if they're merged) and configure the
     <I>UpdateLogFile</I> directive to point to the created log file.
     Finally, to run <code>freshclam</code> in the daemon mode, execute:
     <PRE>
 	# freshclam -d
 </PRE>
     The other method is to use the <I>cron</I> daemon. You have to add the
     following line to the crontab of the <B>root</B> or <B>clamav</B> users:
     <FONT SIZE="-1">    </FONT><PRE>
 N * * * *	/usr/local/bin/freshclam --quiet
 </PRE>
     to check for a new database every hour. <B>N should be a
     number between 3 and 57 of your choice. Please don't choose any multiple
     of 10, because there are already too many clients using those time slots.</B>
     Proxy settings are only configurable via the configuration file and
     <code>freshclam</code> will require strict permissions on the config file when
     <code>HTTPProxyPassword</code> is enabled.
     <PRE>
 	HTTPProxyServer myproxyserver.com
 	HTTPProxyPort 1234
 	HTTPProxyUsername myusername
 	HTTPProxyPassword mypass
 </PRE>
 
 <P>
 <HR>
 <!--Navigation Panel-->
476362a3
 <A NAME="tex2html847"
9893a85c
   HREF="node22.html">
 <IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next.png"></A> 
476362a3
 <A NAME="tex2html843"
9893a85c
   HREF="node16.html">
 <IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up.png"></A> 
476362a3
 <A NAME="tex2html837"
9893a85c
   HREF="node20.html">
 <IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="prev.png"></A> 
476362a3
 <A NAME="tex2html845"
9893a85c
   HREF="node1.html">
 <IMG WIDTH="65" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="contents" SRC="contents.png"></A>  
 <BR>
476362a3
 <B> Next:</B> <A NAME="tex2html848"
9893a85c
   HREF="node22.html">Closest mirrors</A>
476362a3
 <B> Up:</B> <A NAME="tex2html844"
9893a85c
   HREF="node16.html">Configuration</A>
476362a3
 <B> Previous:</B> <A NAME="tex2html838"
9893a85c
   HREF="node20.html">Testing</A>
476362a3
  &nbsp <B>  <A NAME="tex2html846"
9893a85c
   HREF="node1.html">Contents</A></B> 
 <!--End of Navigation Panel-->
 <ADDRESS>
 Tomasz Kojm
476362a3
 2006-10-15
9893a85c
 </ADDRESS>
 </BODY>
 </HTML>