ClamAV Installation: how?

Moderators: kirk, jamesbond, p310don, JakeSFR, step, Forum moderators

Post Reply
Neo_78
Posts: 407
Joined: Wed Dec 29, 2021 10:45 pm
Has thanked: 232 times
Been thanked: 11 times

ClamAV Installation: how?

Post by Neo_78 »

Is there a guide how to install latest stable ClamAV release and update the virus database on FatDog?

https://www.clamav.net/downloads

The graphical user interface is not required; cli would be ok.

Thanks for your feedback.

User avatar
Keef
Posts: 278
Joined: Tue Dec 03, 2019 8:05 pm
Has thanked: 3 times
Been thanked: 75 times

Re: ClamAV Manual Installation

Post by Keef »

Try downloading a .deb, and making a sfs. Converting to Fatdog package format did not install.
After loading, go to /usr/local/etc/freshclam.conf.sample and remove the .sample suffix.
Edit it where needed - you may have to change the user from 'clamav' to root, or just create a new user.
Run 'freshclam'.
It complained about certificates, so I ran 'update-ca-certificates'. See here: https://docs.clamav.net/manual/Usage/Si ... ement.html
Clamav needs to know where they are located, which is in etc/ssl/
Test it by running 'CURL_CA_BUNDLE=/etc/ssl/ca-bundle.crt freshclam'
or:

Code: Select all

export CURL_CA_BUNDLE=/etc/ssl/ca-bundle.crt
freshclam

If it updates successfully, you will need to add 'CURL_CA_BUNDLE=/etc/ssl/ca-bundle.crt to .bashrc or similar. I put it in /etc/rc.d/rc.local

Neo_78
Posts: 407
Joined: Wed Dec 29, 2021 10:45 pm
Has thanked: 232 times
Been thanked: 11 times

Re: ClamAV Manual Installation

Post by Neo_78 »

Thanks for your guidance @Keef. I stumbled upon the same errors and warnings that you posted, but was finally able to run a full system scan.

Now I am bit unsure about the inital sfs creation process (excuse me): I downloaded clamav-0.105.0.linux.x86_64.deb to /home/spot/Downloads and used the following guide to make a sfs package:

https://distro.ibiblio.org/fatdog/web/faqs/sfs-package.html

Code: Select all

cd /home/spot/Downloads
mksquashfs clamav-0.105.0.linux.x86_64.deb /clamav.sfs -noappend -comp xz -Xbcj x86

I then right-clicked on the created "clamav.sfs" to "Load SFS".

However, this would NOT create the "/usr/local/etc/freshclam.conf.sample" file that you mentioned.

The official documentation on SFS package installation states the following:

"An SFS package is a file that contains a compressed filesystem (squashfs). Upon "installation" the contents of this filesystem will be merged with the rest of your filesystem but it is never copied or expanded; the content will be de-compressed on-demand when you use the applications contained in the package.

To use it, download the package from here and move it to the same location as your save file, then go to the System tab in the Control Panel and click on System SFS Loader. Then choose which SFS file to load. You can also use SFS Manager (also in the Control Panel)."

So I moved my converted "clamav.sfs" to /usr/sbin and loaded it again, but still no luck regarding the "freshclam.conf.sample" file.

I then tried to convert "clamav-0.105.0.linux.x86_64.deb" to FatDog Package Format and then on "Install Package", which would create "/usr/local/etc/freshclam.conf.sample".

Is that the correct package conversion and installation procedure?

--

A couple of further questions:

- In "freshclam.conf" I initially commented out "Example" at the top and set "DatabaseOwner" to root. So If I create a non-root user account, for instance "MyUsername", I could set that user name to make the system scanable from the non-root account?

- I am planning to use ClamAV on a remastered Live-DVD and a non-root user account. Would that cause any problems with the certificates or the installation procedure?

Appreciate your feedback! :thumbup:

User avatar
Keef
Posts: 278
Joined: Tue Dec 03, 2019 8:05 pm
Has thanked: 3 times
Been thanked: 75 times

Re: ClamAV Manual Installation

Post by Keef »

I just extracted the .deb with UExtract, then did a right click on the directory for Convert to SFS.
Still have the extracted directory, and /usr/local/etc/freshclam.conf.sample is there - ie it is part of the original package, and doesn't need to be created.
I haven't tried any other user, but if a valid one is created, I can't see why it wouldn't work if added to the conf file.
Have to admit that I know little else about ClamAV, so can't help a great deal more. Just wanted to see if it would run or not. Had tried it in the past but can't remember if it was on Fatdog or not.

Neo_78
Posts: 407
Joined: Wed Dec 29, 2021 10:45 pm
Has thanked: 232 times
Been thanked: 11 times

Re: ClamAV Manual Installation

Post by Neo_78 »

I am running into the following problem in Fatdog 814 when trying to install clamav-1.1.0.linux.x86_64.deb:

https://www.clamav.net/downloads/produc ... x86_64.deb

freshclam will complain about certificates as expected.
Then I run update-ca-certificates and then CURL_CA_BUNDLE=/etc/ssl/ca-bundle.crt. This used to fix the problem in 813 and I could download the ClamAV database with freshclam as root.

In Fatdog 814 I now get the following error:

Code: Select all

ERROR: Download failed (77) ERROR: Problem with the SSL CA cert (path? access right?)
ERROR: Comit download daily.cvd from https://database.clamav.net/ daily.cvd

Did something change in Fatdog 814 and how can this be fixed?

Update:

Due to a bug in ClamAV, the certificate path has to be specified when running freshclam: CURL_CA_BUNDLE=/etc/ssl/ca-bundle.crt freshclam. This should solve the issue.

User avatar
Duprate
Posts: 310
Joined: Sat Aug 22, 2020 8:14 pm
Location: Southern Brazil
Has thanked: 163 times
Been thanked: 107 times

Re: ClamAV Installation: how?

Post by Duprate »

Hello! Soon, I will make Clamav® 1.1.0-1 available for download. It will be a simpler, easier way to update the version and also the database. I'm testing on FatDog64-900Beta. What is missing from FatDog is the "ca-certificates.crt" file in the etc/ssl/certs folder. I will place this file inside the Clamav Directory and when you click "Data Update", a symbolic link of the certificate will be created in etc/ssl/certs. Thus, the download of the database will occur normally, without changing the work of the FatDog team.
OK? It's almost ready .... :thumbup2:

viewtopic.php?t=9372

Attachments
clamav.jpg
clamav.jpg (71.15 KiB) Viewed 971 times
Post Reply

Return to “Software”