CentOS / RedHat 7 Clam AV Install and Setup

Mindwatering Incorporated

Author: Tripp W Black

Created: 09/08/2015 at 12:51 PM

 

Category:
Linux
Configuration

Task.
1. Setup ClamAV on Domino Server.
2. Exclude /local/notesdata NSFs and NTFs, etc.
3. Run scheduled scan.


Steps:
1. Add the extras repository:
# yum install epel-release
# yum install clamav clamav-scanner clamav-scanner-systemd clamav-server clamav-server-systemd clamav-update

Notes:
After the download and before the actual install, you are likely going to be asked to accept the GFG key. Review it and accept w/ Y.

After we ran through install, we found that clamdscan was not installed in /usr/bin. We found that the yum install clamav didn't "take", we went back and installed it separately, by itself, and all was well.

We now need to configure clamav. The two config files are:
/etc/freshclam.conf
/etc/clam.d/scan.conf

Review /etc/freshclam.conf.
Update the program and log locations.
Remove the word Example near the top to enable this conf file to work.

DatabaseDirectory /var/lib/clamav
...
UpdateLogFile /var/log/freshclam.log

Review /etc/clam.d/scan.conf, update to exclude the notesdata folder, and to disable mail scanning (no integration w/Domino)
Remove the word Example near the top to enable this conf file to work. Further changes we made:
LocalSocket /var/run/clamd.scan/clamdsock
...
FixStaleSocket yes
...
ExcludePath ^/local/notesdata/
...
ScanMail no
...
OnAccessExcludePath /local/notesdata
...
SelfCheck 3600


Verify that freshclam has setup a cron.d schedule for itself:
# cd /etc/cron.d/
# ls -l
# vi clamav-update
( :q)

However, it's actually disabled in the /etc/sysconfig/freshclam file.
Remove or comment out the last line in the file that says remove me.
# vi /etc/sysconfig/freshclam
#FRESHCLAM_DELAY=disabled-warn # REMOVE ME
( :wq )

Link the old config scan location:
# ln -s '/etc/clamd.d/scan.conf' '/etc/clamd.conf'

Link the multiuser scan service:
# ln -s ‘/usr/lib/systemd/system/clamd@scan.service’ ‘/etc/systemd/system/multi-user.target.wants/clamd@scan.service’

Enable the scanner:
# systemctl enable clamd@scan.service
# systemctl start clamd@scan.service






previous page

×