clamav/clamav-devel/docs/html/node16.html

148 lines
5.5 KiB
HTML
Raw Normal View History

2004-07-22 19:29:34 +00:00
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
2003-07-29 15:37:11 +00:00
2004-07-22 19:29:34 +00:00
<!--Converted with LaTeX2HTML 2002-2-1 (1.70)
2003-07-29 15:37:11 +00:00
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>
2004-06-14 15:45:22 +00:00
<TITLE>freshclam: Setting up auto-updating</TITLE>
<META NAME="description" CONTENT="freshclam: Setting up auto-updating">
2003-07-29 15:37:11 +00:00
<META NAME="keywords" CONTENT="clamdoc">
<META NAME="resource-type" CONTENT="document">
<META NAME="distribution" CONTENT="global">
2004-07-22 19:29:34 +00:00
<META NAME="Generator" CONTENT="LaTeX2HTML v2002-2-1">
2003-07-29 15:37:11 +00:00
<META HTTP-EQUIV="Content-Style-Type" CONTENT="text/css">
<LINK REL="STYLESHEET" HREF="clamdoc.css">
2004-06-14 15:45:22 +00:00
<LINK REL="next" HREF="node17.html">
2003-11-11 22:10:27 +00:00
<LINK REL="previous" HREF="node15.html">
2004-03-13 22:13:40 +00:00
<LINK REL="up" HREF="node6.html">
2003-07-29 15:37:11 +00:00
<LINK REL="next" HREF="node17.html">
</HEAD>
<BODY >
2004-07-22 19:29:34 +00:00
<DIV CLASS="navigation"><!--Navigation Panel-->
<A NAME="tex2html555"
2003-07-29 15:37:11 +00:00
HREF="node17.html">
<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next"
SRC="/usr/share/latex2html/icons/next.png"></A>
2004-07-22 19:29:34 +00:00
<A NAME="tex2html551"
2004-03-13 22:13:40 +00:00
HREF="node6.html">
2003-07-29 15:37:11 +00:00
<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up"
SRC="/usr/share/latex2html/icons/up.png"></A>
2004-07-22 19:29:34 +00:00
<A NAME="tex2html545"
2003-07-29 15:37:11 +00:00
HREF="node15.html">
<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous"
SRC="/usr/share/latex2html/icons/prev.png"></A>
2004-07-22 19:29:34 +00:00
<A NAME="tex2html553"
2003-07-29 15:37:11 +00:00
HREF="node1.html">
<IMG WIDTH="65" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="contents"
SRC="/usr/share/latex2html/icons/contents.png"></A>
<BR>
2004-07-22 19:29:34 +00:00
<B> Next:</B> <A NAME="tex2html556"
2004-06-14 15:45:22 +00:00
HREF="node17.html">Database mirrors</A>
2004-07-22 19:29:34 +00:00
<B> Up:</B> <A NAME="tex2html552"
2004-03-13 22:13:40 +00:00
HREF="node6.html">Installation</A>
2004-07-22 19:29:34 +00:00
<B> Previous:</B> <A NAME="tex2html546"
2004-06-14 15:45:22 +00:00
HREF="node15.html">Testing</A>
2004-07-22 19:29:34 +00:00
&nbsp; <B> <A NAME="tex2html554"
2003-07-29 15:37:11 +00:00
HREF="node1.html">Contents</A></B>
<BR>
2004-07-22 19:29:34 +00:00
<BR></DIV>
2003-07-29 15:37:11 +00:00
<!--End of Navigation Panel-->
2004-06-14 15:45:22 +00:00
<H2><A NAME="SECTION000310000000000000000">
freshclam: Setting up auto-updating</A>
2003-11-11 22:10:27 +00:00
</H2>
2004-07-22 19:29:34 +00:00
<SPAN CLASS="textit">freshclam</SPAN> is a default database updater for Clam AntiVirus.
2004-06-14 15:45:22 +00:00
It can work in two modes:
2004-05-18 20:51:36 +00:00
2004-06-14 15:45:22 +00:00
<UL>
<LI>interactive - from command line, verbosly
</LI>
<LI>daemon - alone, silently
2004-03-13 22:13:40 +00:00
2004-06-14 15:45:22 +00:00
</LI>
</UL>
When started by a superuser (by default) it drops privileges and switches
2004-07-22 19:29:34 +00:00
to the <SPAN CLASS="textit">clamav</SPAN> user. <SPAN CLASS="textit">freshclam</SPAN> uses the
2004-06-14 15:45:22 +00:00
<TT><A NAME="tex2html21"
HREF="database.clamav.net">database.clamav.net</A></TT> round-robin DNS which automatically selects
a database mirror<A HREF="node17.html#mirrors">2.11</A>. freshclam is an advanced tool: supports
proxy servers (with authentication), digital signature verification and
2004-07-22 19:29:34 +00:00
various error scenarios. <SPAN CLASS="textbf">Quick test: run <SPAN CLASS="textit">freshclam</SPAN> (as
superuser) with no parameters and check the output.</SPAN> If everything
is OK you may create the log file in /var/log (owned by <SPAN CLASS="textit">clamav</SPAN> or
2004-06-14 15:45:22 +00:00
another user freshclam will be running as (<code>--user</code>):
<PRE>
# touch /var/log/clam-update.log
# chmod 600 /var/log/clam-update.log
# chown clamav /var/log/clam-update.log
</PRE>
2004-07-22 19:29:34 +00:00
Now you <SPAN CLASS="textit">should</SPAN> edit the configuration file (usually
<SPAN CLASS="textit">freshclam.conf</SPAN>) and configure the <SPAN CLASS="textit">UpdateLogFile</SPAN> directive
2004-06-14 15:45:22 +00:00
to point the created log file (it's highly recommended). Optionally you
2004-07-22 19:29:34 +00:00
may force the log file path with <SPAN CLASS="textit">-l</SPAN>. Finally, to run freshclam
2004-06-14 15:45:22 +00:00
in the daemon mode execute:
<PRE>
# freshclam -d
</PRE>
2004-07-22 19:29:34 +00:00
The other method is to use the <SPAN CLASS="textit">cron</SPAN> daemon. You have to add the
following line to the crontab of the <SPAN CLASS="textbf">root</SPAN> or <SPAN CLASS="textbf">clamav</SPAN> users:
<SMALL CLASS="SMALL"> </SMALL><PRE>
2004-06-14 15:45:22 +00:00
N * * * * /usr/local/bin/freshclam --quiet
</PRE>
2004-07-22 19:29:34 +00:00
to check for a new database every hour. <SPAN CLASS="textbf">N should be a
2004-06-14 15:45:22 +00:00
number between 1 and 59 of your choice. Please don't choose any multiple
2004-07-22 19:29:34 +00:00
of 10, because there are already too many servers using those time slots.</SPAN>
2004-06-14 15:45:22 +00:00
Proxy settings are only configurable via the configuration file (so you
can setup proper permissions to protect your proxy password):
<PRE>
HTTPProxyServer myproxyserver.com
HTTPProxyPort 1234
HTTPProxyUsername myusername
HTTPProxyPassword mypass
</PRE>
2003-11-11 22:10:27 +00:00
<P>
2004-07-22 19:29:34 +00:00
<DIV CLASS="navigation"><HR>
2003-11-11 22:10:27 +00:00
<!--Navigation Panel-->
2004-07-22 19:29:34 +00:00
<A NAME="tex2html555"
2003-11-11 22:10:27 +00:00
HREF="node17.html">
<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next"
SRC="/usr/share/latex2html/icons/next.png"></A>
2004-07-22 19:29:34 +00:00
<A NAME="tex2html551"
2004-03-13 22:13:40 +00:00
HREF="node6.html">
2003-11-11 22:10:27 +00:00
<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up"
SRC="/usr/share/latex2html/icons/up.png"></A>
2004-07-22 19:29:34 +00:00
<A NAME="tex2html545"
2003-11-11 22:10:27 +00:00
HREF="node15.html">
<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous"
SRC="/usr/share/latex2html/icons/prev.png"></A>
2004-07-22 19:29:34 +00:00
<A NAME="tex2html553"
2003-11-11 22:10:27 +00:00
HREF="node1.html">
<IMG WIDTH="65" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="contents"
SRC="/usr/share/latex2html/icons/contents.png"></A>
<BR>
2004-07-22 19:29:34 +00:00
<B> Next:</B> <A NAME="tex2html556"
2004-06-14 15:45:22 +00:00
HREF="node17.html">Database mirrors</A>
2004-07-22 19:29:34 +00:00
<B> Up:</B> <A NAME="tex2html552"
2004-03-13 22:13:40 +00:00
HREF="node6.html">Installation</A>
2004-07-22 19:29:34 +00:00
<B> Previous:</B> <A NAME="tex2html546"
2004-06-14 15:45:22 +00:00
HREF="node15.html">Testing</A>
2004-07-22 19:29:34 +00:00
&nbsp; <B> <A NAME="tex2html554"
HREF="node1.html">Contents</A></B> </DIV>
2003-11-11 22:10:27 +00:00
<!--End of Navigation Panel-->
2003-07-29 15:37:11 +00:00
<ADDRESS>
Tomasz Kojm
2004-07-22 19:29:34 +00:00
2004-07-22
2003-07-29 15:37:11 +00:00
</ADDRESS>
</BODY>
</HTML>