docs/html/node21.html
8997c071
 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
468b9e48
 
8997c071
 <!--Converted with LaTeX2HTML 2K.1beta (1.48)
468b9e48
 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>
8997c071
 <TITLE>Setting up auto-updating</TITLE>
 <META NAME="description" CONTENT="Setting up auto-updating">
468b9e48
 <META NAME="keywords" CONTENT="clamdoc">
 <META NAME="resource-type" CONTENT="document">
 <META NAME="distribution" CONTENT="global">
 
8997c071
 <META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
 <META NAME="Generator" CONTENT="LaTeX2HTML v2K.1beta">
468b9e48
 <META HTTP-EQUIV="Content-Style-Type" CONTENT="text/css">
 
 <LINK REL="STYLESHEET" HREF="clamdoc.css">
 
69b44259
 <LINK REL="next" HREF="node22.html">
 <LINK REL="previous" HREF="node20.html">
8997c071
 <LINK REL="up" HREF="node16.html">
468b9e48
 <LINK REL="next" HREF="node22.html">
 </HEAD>
 
 <BODY >
8997c071
 <!--Navigation Panel-->
 <A NAME="tex2html683"
468b9e48
   HREF="node22.html">
 <IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next"
  SRC="/usr/share/latex2html/icons/next.png"></A> 
8997c071
 <A NAME="tex2html679"
   HREF="node16.html">
468b9e48
 <IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up"
  SRC="/usr/share/latex2html/icons/up.png"></A> 
8997c071
 <A NAME="tex2html673"
468b9e48
   HREF="node20.html">
 <IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous"
  SRC="/usr/share/latex2html/icons/prev.png"></A> 
8997c071
 <A NAME="tex2html681"
468b9e48
   HREF="node1.html">
 <IMG WIDTH="65" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="contents"
  SRC="/usr/share/latex2html/icons/contents.png"></A>  
 <BR>
8997c071
 <B> Next:</B> <A NAME="tex2html684"
   HREF="node22.html">Closest mirrors</A>
 <B> Up:</B> <A NAME="tex2html680"
   HREF="node16.html">Configuration</A>
 <B> Previous:</B> <A NAME="tex2html674"
   HREF="node20.html">Testing</A>
  &nbsp <B>  <A NAME="tex2html682"
468b9e48
   HREF="node1.html">Contents</A></B> 
 <BR>
8997c071
 <BR>
468b9e48
 <!--End of Navigation Panel-->
 
8997c071
 <H2><A NAME="SECTION00054000000000000000">
 Setting up auto-updating</A>
69b44259
 </H2>
8997c071
     <code>freshclam</code> is a default database updater for Clam AntiVirus.
     It can work in two modes:
69b44259
     
 <UL>
8997c071
 <LI>interactive - from command line, verbosely
69b44259
 </LI>
8997c071
 <LI>daemon - alone, silently
69b44259
     
 </LI>
 </UL>
8997c071
     When started by a superuser it drops privileges and switches
     to the <I>clamav</I> user. <code>freshclam</code> uses the
     <TT><A NAME="tex2html30"
   HREF="database.clamav.net">database.clamav.net</A></TT> round-robin DNS which automatically selects
     a database mirror<A HREF="node104.html#mirrors">9.1</A>. <code>freshclam</code> is an advanced tool:
     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>):
69b44259
     <PRE>
8997c071
 	# touch /var/log/clam-update.log
 	# chmod 600 /var/log/clam-update.log
 	# chown clamav /var/log/clam-update.log
69b44259
 </PRE>
8997c071
     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:
c7217226
     <PRE>
8997c071
 	# 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 1 and 59 of your choice. Please don't choose any multiple
     of 10, because there are already too many servers 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
c7217226
 </PRE>
a0faaedf
 
69b44259
 <P>
8997c071
 <HR>
69b44259
 <!--Navigation Panel-->
8997c071
 <A NAME="tex2html683"
69b44259
   HREF="node22.html">
 <IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next"
  SRC="/usr/share/latex2html/icons/next.png"></A> 
8997c071
 <A NAME="tex2html679"
   HREF="node16.html">
69b44259
 <IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up"
  SRC="/usr/share/latex2html/icons/up.png"></A> 
8997c071
 <A NAME="tex2html673"
69b44259
   HREF="node20.html">
 <IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous"
  SRC="/usr/share/latex2html/icons/prev.png"></A> 
8997c071
 <A NAME="tex2html681"
69b44259
   HREF="node1.html">
 <IMG WIDTH="65" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="contents"
  SRC="/usr/share/latex2html/icons/contents.png"></A>  
 <BR>
8997c071
 <B> Next:</B> <A NAME="tex2html684"
   HREF="node22.html">Closest mirrors</A>
 <B> Up:</B> <A NAME="tex2html680"
   HREF="node16.html">Configuration</A>
 <B> Previous:</B> <A NAME="tex2html674"
   HREF="node20.html">Testing</A>
  &nbsp <B>  <A NAME="tex2html682"
   HREF="node1.html">Contents</A></B> 
69b44259
 <!--End of Navigation Panel-->
468b9e48
 <ADDRESS>
 Tomasz Kojm
8997c071
 2004-09-20
468b9e48
 </ADDRESS>
 </BODY>
 </HTML>