Open up a terminal
This creates a working directory for you to mess around in. After creating the directory, grab the latest stable version from SourceForge. Now, untar the archive, grab the deps, and create the
clamavuser and group.
tar xzf clamav-0.93.1.tar.gz
sudo apt-get build-dep -y clamav
sudo adduser clamav --no-create-home --disabled-password
When you create the user, you will be asked for some information. You should be able to just hit enter a couple times and say 'yes'.
To make ClamAV, we must first
configure. We will use the
--enable-experimentalflag which gives us better virus detection at the expense of reliability. I have never had a problem with this flag :-).
Now, just to be safe, we will do a though cleaning to make sure there aren't any previous installations on your computer.
sudo apt-get remove --purge clamav
sudo make uninstall
Now, you can install it.
sudo make install
Before we can update the virus defs, we must first edit the ClamAV config files in
/usr/local/etc/. I originally used
vimto do this, but
cat /usr/local/etc/freshclam.conf | sed -e s/Example// | sudo tee /usr/local/etc/freshclam.conf
cat /usr/local/etc/clamd.conf | sed -e s/Example// | sudo tee /usr/local/etc/clamd.conf
You can now update your virus definitions and start scanning!
clamscan -v -r ./
Some people may get an error that references
libclamav.so.4. You should be able to run
sudo ldconfigto fix the problem.
I am currently learning how to package, so hopefully, I will be able to start packaging the ClamAV releases and you won't have to do this :-).