[prev in list] [next in list] [prev in thread] [next in thread] 

List:       clamav-users
Subject:    Re: [clamav-users] clamav update from tar.gz
From:       "G.W. Haywood" <ged () jubileegroup ! co ! uk>
Date:       2012-08-29 13:07:58
Message-ID: Pine.LNX.4.64.1208291245260.3200 () mail5 ! jubileegroup ! co ! uk
[Download RAW message or body]

Hi there,

On Wed, 29 Aug 2012, n22e113 wrote:

> On 8/27/2012 08:17, infelectromed.mtz@infomed.sld.cu wrote:
> > I have install clamav 0.96.5 from my ubuntu 10.04 repository but I want to \
> > upgrade to 0.97.5 
> Your problem is not unique as I had the same problem for months with
> Debian Lenny. Attempts to upgrade from Lenny to Squeeze (with a test
> machine) ended in disaster.

This isn't the place to discuss your upgrade disaster, but I'm curious
to know what you call a disaster.  I've upgraded a few Debian machines
from Lenny to Squeeze, with no disasters.  You must have been doing
something a little strange.  Lenny is no longer supported by security
updates, and running ClamAV on it seems a bit like polishing your car
instead of changing the oil, and fitting new tyres.

> Anyway, with Debian Lenny, I didn't have to uninstall any Debian
> packages and if I did I would loose the files in /etc/init.d/clamav-*.

That is expected.  Probably even required. :)

> The key for me is to figure out where to put all the
> clamav-0.97.x.tar.gz files so that Debian Lenny can find them.

The system does not refer to the sources after the package is built.
Debian Lenny does not need to 'find them', nor does any other system,
and after you have built and installed the package you can delete both
the source tarball and the entire package build tree.

> Luckily, Debian Lenny is fairly "Linux Standard Base" complaint:

Compliant.  Sorry. :)

> [...] As an example, in Debian Lenny, clamd.conf is in /etc/clamav/;
> but the tar.gz with ./configure would place the said file in
> /usr/src/ [...]

No, it is *you* who are placing the files there.  You can place the
source files wherever you wish although I strongly recommend that you
do not put them in /usr/src but instead put them in a subdirectory of
your home directory.  I have good reasons for that recommendation...

> [...] To solve the problem (as root) My bad! I know!

... unnecessary privileges being one of them ...

> 2. Download the latest (July 2012) stable source:
> # cd /usr/src && wget \
> http://sourceforge.net/projects/clamav/files/clamav/0.97.5/clamav-0.97.5.tar.gz

... cluttering up system areas with junk being another.

> 3. Decompress:
> # cd /usr/src && tar xvzf clamav-0.97.5.tar.gz

Unnecessary 'cd' commands.

> 4. Compile with make
> # cd /usr/src/clamav-0.97.5 && ./configure ?sysconfdir=/etc/clamav \
> ?exec_prefix=/usr && make && make install

Strange ? characters in strange places.  Much better to use your home
directory, to build packages as a non-privileged user.  Don't use /usr
as exec_prefix unless you really want to overwrite things that might
already be there.  Give the commands separately and inspect the output
at each stage to make sure it's what you want/expect.  Make sure that
before you build you have suitable system user accounts for ClamAV to
use if it is to runs as a daemon or give arguments to the 'configure'
script so that system accounts are not required.  It's in the docs.

$ cd				# Change to your home directory
$ mkdir build			# Create a directory to build things in
$ cd build			# Move into that directtory
$ wget .../clamav-x.xx.x.tar.gz	# Fetch the source tarball
$ tar xzf clamav-x.xx.x.tar.gz	# Unpack it
$ cd clamav-x.xx.x		# Go to the top of the ClamAV source tree
$ less -S README		# Chill with some documentation. ;)
$ less -S INSTALL		# More documentation ;)
$ cd docs [...] cd ..		# More documentation ;)
$ ./configure --help | less -S	# More documentation ;)
$ ./configure (options)		# Configure the source tree for your system
$ make				# Compile the sources to produce binaries etc.
$ make check			# IF you've read the documentation AND
$ su				# IF you're happy with the output AND
# make install			# IF you need to install (as root)
# exit				# Done
$

> 5. Once complete:
> # /etc/init.d/clamav-daemon restart

Your instruction to start a daemon begs questions.  It is not clear to
me that most readers (you?) understand the use of the ClamAV daemon.
It is not like running one of the anti-virus tools widely available
for Windows platforms, and simply running it affords no protection
whatever to a system which runs it.  It just loads a few databases
(and so it uses a lot of memory) and waits for instructions to scan
something, from for example clamav-milter or clamdscan, using the
databases which it has loaded.

It is also not clear to me that, having built the latest version of
ClamAV, you now have a set of databases suitable for it to use.  You
have given no instructions here about updating them, nor do you check
for example that 'freshclam' will be doing what it should be doing to
keep the databases up to date.  It's all covered in the documentation
and this pseudo-HOWTO seems to me to do little but muddy the waters.

Are you somewhere near Chixizhen?

--

73,
Ged.
_______________________________________________
Help us build a comprehensive ClamAV guide: visit http://wiki.clamav.net
http://www.clamav.net/support/ml


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic