<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://aznot.com/index.php?action=history&amp;feed=atom&amp;title=ClamAV</id>
	<title>ClamAV - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://aznot.com/index.php?action=history&amp;feed=atom&amp;title=ClamAV"/>
	<link rel="alternate" type="text/html" href="https://aznot.com/index.php?title=ClamAV&amp;action=history"/>
	<updated>2026-05-05T05:29:30Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.41.0</generator>
	<entry>
		<id>https://aznot.com/index.php?title=ClamAV&amp;diff=9801&amp;oldid=prev</id>
		<title>Kenneth: /* Installation */</title>
		<link rel="alternate" type="text/html" href="https://aznot.com/index.php?title=ClamAV&amp;diff=9801&amp;oldid=prev"/>
		<updated>2026-04-10T05:38:38Z</updated>

		<summary type="html">&lt;p&gt;&lt;span dir=&quot;auto&quot;&gt;&lt;span class=&quot;autocomment&quot;&gt;Installation&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 05:38, 10 April 2026&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l45&quot;&gt;Line 45:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 45:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;== Installation ==&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;== Installation ==&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;=== Installation Ubuntu ===&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt; sudo apt update&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt; sudo apt install clamav&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;=== Installation RedHat ===&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;=== Installation Source Code ===&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;NOTE: ALL DOWNLOADS HAVE MIGRATED TO HTTPS://WWW.CLAMAV.NET&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;NOTE: ALL DOWNLOADS HAVE MIGRATED TO HTTPS://WWW.CLAMAV.NET&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Kenneth</name></author>
	</entry>
	<entry>
		<id>https://aznot.com/index.php?title=ClamAV&amp;diff=7286&amp;oldid=prev</id>
		<title>Kenneth: /* Installation */</title>
		<link rel="alternate" type="text/html" href="https://aznot.com/index.php?title=ClamAV&amp;diff=7286&amp;oldid=prev"/>
		<updated>2024-04-24T03:13:42Z</updated>

		<summary type="html">&lt;p&gt;&lt;span dir=&quot;auto&quot;&gt;&lt;span class=&quot;autocomment&quot;&gt;Installation&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 03:13, 24 April 2024&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l155&quot;&gt;Line 155:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 155:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;  sudo ln -sfn /opt/clamav/bin/freshclam /usr/local/bin/freshclam&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;  sudo ln -sfn /opt/clamav/bin/freshclam /usr/local/bin/freshclam&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;  # Test&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;  # &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;EICAR &lt;/ins&gt;Test&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;  cat &amp;gt; samplevirus.txt &amp;lt;&amp;lt;&amp;quot;EOF&amp;quot;&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;  cat &amp;gt; samplevirus.txt &amp;lt;&amp;lt;&amp;quot;EOF&amp;quot;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;  X5O!P%@AP[4\PZX54(P^)7CC)7}$EICAR-STANDARD-ANTIVIRUS-TEST-FILE!$H+H*&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;  X5O!P%@AP[4\PZX54(P^)7CC)7}$EICAR-STANDARD-ANTIVIRUS-TEST-FILE!$H+H*&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;

&lt;!-- diff cache key aznot:diff:1.41:old-6486:rev-7286:php=table --&gt;
&lt;/table&gt;</summary>
		<author><name>Kenneth</name></author>
	</entry>
	<entry>
		<id>https://aznot.com/index.php?title=ClamAV&amp;diff=6486&amp;oldid=prev</id>
		<title>Kenneth: /* Installation */</title>
		<link rel="alternate" type="text/html" href="https://aznot.com/index.php?title=ClamAV&amp;diff=6486&amp;oldid=prev"/>
		<updated>2023-10-26T20:52:03Z</updated>

		<summary type="html">&lt;p&gt;&lt;span dir=&quot;auto&quot;&gt;&lt;span class=&quot;autocomment&quot;&gt;Installation&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;== ClamAV ==&lt;br /&gt;
&lt;br /&gt;
ClamAV:&lt;br /&gt;
 http://www.clamav.net/&lt;br /&gt;
&lt;br /&gt;
Download:&lt;br /&gt;
 http://www.clamav.net/downloads&lt;br /&gt;
 http://www.clamav.net/lang/en/download&lt;br /&gt;
 http://www.clamav.net/lang/en/download/sources/&lt;br /&gt;
 http://downloads.sourceforge.net/clamav/clamav-0.97.tar.gz&lt;br /&gt;
&lt;br /&gt;
== Scanning ==&lt;br /&gt;
&lt;br /&gt;
Simple scan:&lt;br /&gt;
 /opt/clamav/bin/clamscan [FOLDER]&lt;br /&gt;
&lt;br /&gt;
Options:&lt;br /&gt;
 -r            # recursive search&lt;br /&gt;
 -i            # Show only infected&lt;br /&gt;
 -l [file]     # log output to file&lt;br /&gt;
 --move=[dir]  # move infected&lt;br /&gt;
 --copy=[dir]  # copy infected&lt;br /&gt;
 --remove=yes  # remove infected&lt;br /&gt;
&lt;br /&gt;
Scan subfolders, show infected only and log results:&lt;br /&gt;
  /opt/clamav/bin/clamscan -r -i -l scan.txt [FOLDER]&lt;br /&gt;
&lt;br /&gt;
scan stdin:&lt;br /&gt;
 cat testfile | clamscan -&lt;br /&gt;
&lt;br /&gt;
Help:&lt;br /&gt;
 man /opt/clamav/share/man/man1/clamscan.1&lt;br /&gt;
&lt;br /&gt;
== Updating Definitions ==&lt;br /&gt;
&lt;br /&gt;
Update virus definitions: (as any user in the clamav group)&lt;br /&gt;
 /opt/clamav/bin/freshclam&lt;br /&gt;
&lt;br /&gt;
After the first run, fix the database permissions one time, so anyone in the clamav group can update:&lt;br /&gt;
 sudo chown clamav:clamav /opt/clamav/share/clamav/*&lt;br /&gt;
 sudo chmod 664 /opt/clamav/share/clamav/*&lt;br /&gt;
&lt;br /&gt;
Databases are stored here:&lt;br /&gt;
 Database directory: /opt/clamav/share/clamav&lt;br /&gt;
&lt;br /&gt;
== Installation ==&lt;br /&gt;
&lt;br /&gt;
NOTE: ALL DOWNLOADS HAVE MIGRATED TO HTTPS://WWW.CLAMAV.NET&lt;br /&gt;
&lt;br /&gt;
&amp;lt;s&amp;gt;&lt;br /&gt;
Look here for latest version:&lt;br /&gt;
* http://sourceforge.net/projects/clamav/files/&lt;br /&gt;
* Direct download Links&lt;br /&gt;
** CLAM_VERSION=0.99.3&lt;br /&gt;
** http://sourceforge.net/projects/clamav/files/clamav-$CLAM_VERSION.tar.gz&lt;br /&gt;
** http://downloads.sourceforge.net/clamav/clamav-$CLAM_VERSION.tar.gz&lt;br /&gt;
* Latest:&lt;br /&gt;
** http://sourceforge.net/projects/clamav/files/latest/download?source=files&lt;br /&gt;
&amp;lt;/s&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Prerequisites:&lt;br /&gt;
 # redhat/centos&lt;br /&gt;
 sudo yum install gcc make openssl-devel&lt;br /&gt;
&lt;br /&gt;
 # debian/ubuntu&lt;br /&gt;
 sudo apt install build-essential gcc make libssl1.0 libssl-dev libxml2 libxml2-dev&lt;br /&gt;
&lt;br /&gt;
Create ClamAV User:&lt;br /&gt;
&lt;br /&gt;
 # create clamav user&lt;br /&gt;
 sudo /usr/sbin/groupadd clamav&lt;br /&gt;
 sudo /usr/sbin/useradd clamav -g clamav -d /opt/clamav -c &amp;quot;Clam AntiVirus&amp;quot; -s /sbin/nologin&lt;br /&gt;
&lt;br /&gt;
 # Add kenneth to clamav group&lt;br /&gt;
 sudo usermod -a -G clamav kenneth&lt;br /&gt;
&lt;br /&gt;
 # LOGOUT - will need user kenneth to logout and login to take effect&lt;br /&gt;
&lt;br /&gt;
Install/Update ClamAV: [http://www.linux.org/docs/ldp/howto/Qmail-ClamAV-HOWTO/x114.html]&lt;br /&gt;
&lt;br /&gt;
 # AS USER: kenneth&lt;br /&gt;
&lt;br /&gt;
 sudo pwd  # cache sudo creds...&lt;br /&gt;
&lt;br /&gt;
 # Download ClamAV&lt;br /&gt;
 CLAM_VERSION=0.101.4&lt;br /&gt;
 mkdir -p ~/.src ; cd ~/.src&lt;br /&gt;
 wget &amp;quot;http://www.clamav.net/downloads/production/clamav-$CLAM_VERSION.tar.gz&amp;quot;&lt;br /&gt;
 tar -zvxf clamav-$CLAM_VERSION.tar.gz&lt;br /&gt;
 cd clamav-$CLAM_VERSION&lt;br /&gt;
&lt;br /&gt;
&amp;lt;s&amp;gt;&lt;br /&gt;
 #CLAM_VERSION=0.100.0&lt;br /&gt;
&lt;br /&gt;
 # Download ClamAV&lt;br /&gt;
 CLAM_VERSION=0.99.1&lt;br /&gt;
 wget &amp;quot;http://downloads.sourceforge.net/clamav/clamav-$CLAM_VERSION.tar.gz&amp;quot;&lt;br /&gt;
&lt;br /&gt;
 # Alternative Download ClamAV Latest&lt;br /&gt;
 mkdir -p ~/.src ; cd ~/.src&lt;br /&gt;
 wget &amp;quot;http://sourceforge.net/projects/clamav/files/latest/download?source=files&amp;quot; -O clamav_latest.tar.gz&lt;br /&gt;
 tar -zvxf clamav_latest.tar.gz&lt;br /&gt;
 cd clamav-*&lt;br /&gt;
&amp;lt;/s&amp;gt;&lt;br /&gt;
&lt;br /&gt;
 # Backup previous config&lt;br /&gt;
 mkdir etc-bak ; cp /opt/clamav/etc/* etc-bak/&lt;br /&gt;
&lt;br /&gt;
 # remove previous install&lt;br /&gt;
 sudo rm -rf /opt/clamav&lt;br /&gt;
&lt;br /&gt;
 # Build and Install&lt;br /&gt;
 # NOTE: this will take several minutes to compile (make)&lt;br /&gt;
 ./configure --prefix=/opt/clamav&lt;br /&gt;
 make clean&lt;br /&gt;
 make&lt;br /&gt;
 sudo make install&lt;br /&gt;
&lt;br /&gt;
 # Copy default configs&lt;br /&gt;
 sudo cp /opt/clamav/etc/clamd.conf.sample /opt/clamav/etc/clamd.conf&lt;br /&gt;
 sudo cp /opt/clamav/etc/freshclam.conf.sample /opt/clamav/etc/freshclam.conf&lt;br /&gt;
&lt;br /&gt;
 # Check for config differences to build new config (should only be comment out of &amp;#039;#Example&amp;#039;)&lt;br /&gt;
 diff etc-bak/clamd.conf /opt/clamav/etc/clamd.conf&lt;br /&gt;
 diff etc-bak/freshclam.conf /opt/clamav/etc/freshclam.conf&lt;br /&gt;
&lt;br /&gt;
 # OPTIONAL: edit configs as needed ..OR.. skip to next step&lt;br /&gt;
 #sudo vim /opt/clamav/etc/clamd.conf&lt;br /&gt;
 #sudo vim /opt/clamav/etc/freshclam.conf&lt;br /&gt;
&lt;br /&gt;
 # Remove &amp;#039;Example&amp;#039; statement from config files if the default config is sufficient&lt;br /&gt;
 sudo sed -i &amp;#039;s/^Example/#Example/g&amp;#039; /opt/clamav/etc/clamd.conf&lt;br /&gt;
 sudo sed -i &amp;#039;s/^Example/#Example/g&amp;#039; /opt/clamav/etc/freshclam.conf&lt;br /&gt;
&lt;br /&gt;
 # create /etc/clamav config links&lt;br /&gt;
 sudo mkdir -p /etc/clamav&lt;br /&gt;
 sudo ln -sfn /opt/clamav/etc/clamd.conf /etc/clamav/clamd.conf&lt;br /&gt;
 sudo ln -sfn /opt/clamav/etc/freshclam.conf /etc/clamav/freshclam.conf&lt;br /&gt;
&lt;br /&gt;
 # create database share folder&lt;br /&gt;
 sudo mkdir -p /opt/clamav/share/clamav&lt;br /&gt;
 sudo chown clamav:clamav /opt/clamav/share/clamav&lt;br /&gt;
 sudo chmod 775 /opt/clamav/share/clamav&lt;br /&gt;
 sudo chmod g+s /opt/clamav/share/clamav&lt;br /&gt;
&lt;br /&gt;
 # Update Virus definitions&lt;br /&gt;
 /opt/clamav/bin/freshclam&lt;br /&gt;
&lt;br /&gt;
 # Fix Permissions for clamav group after update&lt;br /&gt;
 sudo chown clamav:clamav /opt/clamav/share/clamav/*&lt;br /&gt;
 sudo chmod 664 /opt/clamav/share/clamav/*&lt;br /&gt;
&lt;br /&gt;
 # Create bin link&lt;br /&gt;
 sudo ln -sfn /opt/clamav/bin/clamscan /usr/local/bin/clamscan&lt;br /&gt;
 sudo ln -sfn /opt/clamav/bin/freshclam /usr/local/bin/freshclam&lt;br /&gt;
&lt;br /&gt;
 # Test&lt;br /&gt;
 cat &amp;gt; samplevirus.txt &amp;lt;&amp;lt;&amp;quot;EOF&amp;quot;&lt;br /&gt;
 X5O!P%@AP[4\PZX54(P^)7CC)7}$EICAR-STANDARD-ANTIVIRUS-TEST-FILE!$H+H*&lt;br /&gt;
 EOF&lt;br /&gt;
 #/opt/clamav/bin/clamscan samplevirus.txt&lt;br /&gt;
 clamscan samplevirus.txt&lt;br /&gt;
 rm samplevirus.txt&lt;br /&gt;
&lt;br /&gt;
 # More Tests&lt;br /&gt;
 cd test&lt;br /&gt;
 clamscan .&lt;br /&gt;
 cd ..&lt;br /&gt;
 # rm -rf test&lt;br /&gt;
&lt;br /&gt;
Setup daily update:&lt;br /&gt;
&lt;br /&gt;
 # cronjob&lt;br /&gt;
 crontab -e&lt;br /&gt;
     0 2 * * *       /usr/local/bin/freshclam&lt;br /&gt;
&lt;br /&gt;
== Configuration ==&lt;br /&gt;
&lt;br /&gt;
Allow kenneth to edit:&lt;br /&gt;
 sudo chown kenneth /opt/clamav/etc/*&lt;br /&gt;
&lt;br /&gt;
Configure clamd:&lt;br /&gt;
 vim /opt/clamav/etc/clamd.conf&lt;br /&gt;
&lt;br /&gt;
Configure freshclam:&lt;br /&gt;
 vim /opt/clamav/etc/freshclam.conf&lt;br /&gt;
&lt;br /&gt;
Modify both and comment out the Example line:&lt;br /&gt;
 # Comment or remove the line below.&lt;br /&gt;
 #Example&lt;br /&gt;
&lt;br /&gt;
The configured defaults values can be all viewed with: (and look for errors)&lt;br /&gt;
 /opt/clamav/bin/clamconf&lt;br /&gt;
&lt;br /&gt;
== Testing ==&lt;br /&gt;
&lt;br /&gt;
Test with:&lt;br /&gt;
 /opt/clamav/bin/clamscan -r -l scan.txt clamav-$VERSION&lt;br /&gt;
&lt;br /&gt;
Example output:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
----------- SCAN SUMMARY -----------&lt;br /&gt;
Known viruses: 852104&lt;br /&gt;
Engine version: 0.96.5&lt;br /&gt;
Scanned directories: 238&lt;br /&gt;
Scanned files: 4522&lt;br /&gt;
Infected files: 46&lt;br /&gt;
Data scanned: 186.71 MB&lt;br /&gt;
Data read: 201.43 MB (ratio 0.93:1)&lt;br /&gt;
Time: 22.671 sec (0 m 22 s)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Configure the ClamAV daemon, clamd, for testing. Comment out &amp;quot;Example&amp;quot; line in clamav.conf and save:&lt;br /&gt;
 vi /opt/clamav/etc/clamd.conf&lt;br /&gt;
&lt;br /&gt;
 # Comment or remove the line below.&lt;br /&gt;
 Example&lt;br /&gt;
&lt;br /&gt;
Now try with clamd, which should provide output that is similar to the clamscan command you entered above.&lt;br /&gt;
 /opt/clamav/bin/clamdscan -l scan.txt clamav-$VERSION&lt;br /&gt;
&lt;br /&gt;
 ERROR: Clamd is not configured properly.&lt;br /&gt;
&lt;br /&gt;
Update with:&lt;br /&gt;
 # uncomment the &amp;quot;Example&amp;quot; line in the etc/freshclam.conf&lt;br /&gt;
 bin/freshclam&lt;br /&gt;
&lt;br /&gt;
Scan folder:&lt;br /&gt;
 bin/clamscan [folder]&lt;br /&gt;
 bin/clamscan -r [folder]  # recursive&lt;br /&gt;
&lt;br /&gt;
Test signature: eicar | THE ANTI-VIRUS OR ANTI-MALWARE TEST FILE - http://www.eicar.org/anti_virus_test_file.htm&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
cat &amp;gt; samplevirus.txt &amp;lt;&amp;lt;&amp;quot;EOF&amp;quot;&lt;br /&gt;
X5O!P%@AP[4\PZX54(P^)7CC)7}$EICAR-STANDARD-ANTIVIRUS-TEST-FILE!$H+H*&lt;br /&gt;
EOF&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Source: http://www.linux.org/docs/ldp/howto/Qmail-ClamAV-HOWTO/x120.html&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Clam AntiVirus Daemon ==&lt;br /&gt;
&lt;br /&gt;
Start daemon:&lt;br /&gt;
 /opt/clamav/sbin/clamd&lt;br /&gt;
&lt;br /&gt;
Initial error:&lt;br /&gt;
 ERROR: Please define server type (local and/or TCP).&lt;br /&gt;
&lt;br /&gt;
Configure:&lt;br /&gt;
 /opt/clamav/etc/clamd.conf&lt;br /&gt;
&lt;br /&gt;
 # TCP port address.&lt;br /&gt;
 # Default: no&lt;br /&gt;
 TCPSocket 3310&lt;br /&gt;
&lt;br /&gt;
Now start clamd.&lt;br /&gt;
 /opt/clamav/sbin/clamd&lt;br /&gt;
&lt;br /&gt;
To use clamdscan with clamd:&lt;br /&gt;
 /opt/clamav/bin/clamdscan&lt;br /&gt;
&lt;br /&gt;
Documentation:&lt;br /&gt;
 man /opt/clamav/share/man/man1/clamdscan.1&lt;br /&gt;
 man /opt/clamav/share/man/man8/clamd.8&lt;br /&gt;
&lt;br /&gt;
== Updates ==&lt;br /&gt;
&lt;br /&gt;
=== Virus database ===&lt;br /&gt;
&lt;br /&gt;
Your virus definition may be out of date:&lt;br /&gt;
 $ /opt/clamav/bin/clamscan -r -l scan.txt myfolder&lt;br /&gt;
 LibClamAV Warning: **************************************************&lt;br /&gt;
 LibClamAV Warning: ***  The virus database is older than 7 days!  ***&lt;br /&gt;
 LibClamAV Warning: ***   Please update it as soon as possible.    ***&lt;br /&gt;
 LibClamAV Warning: **************************************************&lt;br /&gt;
&lt;br /&gt;
Initially when running freshclam will get the following error:&lt;br /&gt;
 ERROR: Please edit the example config file /opt/clamav/etc/freshclam.conf&lt;br /&gt;
 ERROR: Can&amp;#039;t open/parse the config file /opt/clamav/etc/freshclam.conf&lt;br /&gt;
&lt;br /&gt;
Edit the freshclam.conf and comment out the &amp;quot;Example&amp;quot; line:&lt;br /&gt;
 sudo chown -R kenneth:kenneth /opt/clamav/etc&lt;br /&gt;
 vi /opt/clamav/etc/freshclam.conf&lt;br /&gt;
&lt;br /&gt;
Modify both and comment out the Example line:&lt;br /&gt;
 # Comment or remove the line below.&lt;br /&gt;
 #Example&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
NOTES:&lt;br /&gt;
&lt;br /&gt;
#touch /var/log/clam-update.log&lt;br /&gt;
#chmod 600 /var/log/clamupdate.log&lt;br /&gt;
#chown clamav /var/log/clamupdate.log&lt;br /&gt;
&lt;br /&gt;
freshclam -d -c 6 -l /var/log/clam-update.log&lt;br /&gt;
&lt;br /&gt;
This checks for a new virus definition database six (6) times a day. Check the /var/log/clam-update.log file&lt;br /&gt;
&lt;br /&gt;
add the freshclam -d -c 6 -l /var/log/clam-update.log to your startup scripts.&lt;br /&gt;
&lt;br /&gt;
=== ClamAV engine is outdated ===&lt;br /&gt;
&lt;br /&gt;
* UpgradeInstructions  - http://wiki.clamav.net/Main/UpgradeInstructions&lt;br /&gt;
&lt;br /&gt;
If you installed from sources &lt;br /&gt;
* Uninstall the old version&lt;br /&gt;
* Compile and install the new one&lt;br /&gt;
&lt;br /&gt;
== Submit ==&lt;br /&gt;
&lt;br /&gt;
Clam AntiVirus - Submit a file - http://www.clamav.net/lang/en/sendvirus/&lt;br /&gt;
* Send a malware sample - http://www.clamav.net/sendvirus/submit-malware/&lt;br /&gt;
&lt;br /&gt;
&amp;quot;If you want to be notified of changes in the virus database, please join the clamav-virusdb at lists.clamav.net mailing-list&amp;quot;&lt;br /&gt;
* Clam AntiVirus - Mailing Lists - http://www.clamav.net/support/ml&lt;br /&gt;
&lt;br /&gt;
== Scripts ==&lt;br /&gt;
&lt;br /&gt;
Written by Kenneth Burgener November 2015&lt;br /&gt;
&lt;br /&gt;
/usr/local/bin/check-infected:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#!/bin/bash&lt;br /&gt;
&lt;br /&gt;
if [ &amp;quot;$1&amp;quot; == &amp;quot;&amp;quot; ] ; then&lt;br /&gt;
    echo &amp;quot;Purpose: Check if infected, then if &amp;#039;-f&amp;#039; truncate and rename&amp;quot;&lt;br /&gt;
    echo &amp;quot;         infected file with .infected extension&amp;quot;&lt;br /&gt;
    echo &amp;quot;Usage: $0 [-f] &amp;lt;possible_infected_file&amp;gt;&amp;quot;&lt;br /&gt;
    exit 1&lt;br /&gt;
fi&lt;br /&gt;
&lt;br /&gt;
if [ &amp;quot;$1&amp;quot; == &amp;quot;-f&amp;quot; ] ; then&lt;br /&gt;
    FIX=true&lt;br /&gt;
    FNAME=$2&lt;br /&gt;
    if [ &amp;quot;$3&amp;quot; != &amp;quot;&amp;quot; ] ; then&lt;br /&gt;
        echo &amp;quot;Too many files specified&amp;quot;&lt;br /&gt;
        exit 1&lt;br /&gt;
    fi&lt;br /&gt;
else&lt;br /&gt;
    FIX=false&lt;br /&gt;
    FNAME=$1&lt;br /&gt;
    if [ &amp;quot;$2&amp;quot; != &amp;quot;&amp;quot; ] ; then&lt;br /&gt;
        echo &amp;quot;Too many files specified&amp;quot;&lt;br /&gt;
        exit 1&lt;br /&gt;
    fi&lt;br /&gt;
fi&lt;br /&gt;
&lt;br /&gt;
echo &amp;quot;== Checking $FNAME ==&amp;quot;&lt;br /&gt;
&lt;br /&gt;
if [ ! -e &amp;quot;$FNAME&amp;quot; ] ; then&lt;br /&gt;
    echo &amp;quot;File does not exist!&amp;quot;&lt;br /&gt;
    exit 1&lt;br /&gt;
fi&lt;br /&gt;
&lt;br /&gt;
clamscan --quiet &amp;quot;$FNAME&amp;quot;&lt;br /&gt;
if [ $? -eq 0 ] ; then&lt;br /&gt;
    echo &amp;quot;File is not infected.&amp;quot;&lt;br /&gt;
    exit 0&lt;br /&gt;
fi&lt;br /&gt;
&lt;br /&gt;
if [ &amp;quot;FNAME&amp;quot; = &amp;quot;true&amp;quot; ] ; then&lt;br /&gt;
  echo &amp;quot;Marking as infected...&amp;quot;&lt;br /&gt;
  &amp;gt; &amp;quot;$FNAME&amp;quot;&lt;br /&gt;
  mv &amp;quot;$FNAME&amp;quot; &amp;quot;$FNAME.infected&amp;quot;&lt;br /&gt;
fi&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
/usr/local/bin/infected:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#!/bin/bash&lt;br /&gt;
&lt;br /&gt;
if [ &amp;quot;$1&amp;quot; == &amp;quot;&amp;quot; ] ; then&lt;br /&gt;
    echo &amp;quot;Truncate and rename infected file with .infected extension&amp;quot;&lt;br /&gt;
    echo &amp;quot;Usage: $0 infected_file&amp;quot;&lt;br /&gt;
    exit 1&lt;br /&gt;
fi&lt;br /&gt;
&lt;br /&gt;
if [ ! -e &amp;quot;$1&amp;quot; ] ; then&lt;br /&gt;
    echo &amp;quot;File $1 does not exist!&amp;quot;&lt;br /&gt;
    exit 1&lt;br /&gt;
fi&lt;br /&gt;
&lt;br /&gt;
echo &amp;quot;Marking $1 as infected...&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&amp;gt; &amp;quot;$1&amp;quot;&lt;br /&gt;
mv &amp;quot;$1&amp;quot; &amp;quot;$1.infected&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&lt;br /&gt;
* [http://www.linux.org/docs/ldp/howto/Qmail-ClamAV-HOWTO/index.html Linux Online - Qmail-Scanner and ClamAV HowTo]&lt;br /&gt;
** [http://www.linux.org/docs/ldp/howto/Qmail-ClamAV-HOWTO/x114.html Linux Online - Installing ClamAV]&lt;br /&gt;
* [http://www.eicar.org/anti_virus_test_file.htm eicar | THE ANTI-VIRUS OR ANTI-MALWARE TEST FILE]&lt;br /&gt;
* [http://www.linuxmail.info/how-to-install-clam-antivirus-centos-5/Clam AntiVirus (ClamAV) Setup Howto for RHEL/CentOS 5 ‹‹ Linux Mail Server Setup and Howto Guide]&lt;br /&gt;
* [http://lonesysadmin.net/2007/07/31/how-to-install-clamav-on-red-hat-enterprise-linux/ How To Install ClamAV On Red Hat Enterprise Linux : Bob Plankers, The Lone Sysadmin]&lt;br /&gt;
* [http://linuxhelp.blogspot.com/2005/10/clamav-free-anti-virus-solution-for.html ClamAV - The free Anti Virus solution for Windows on Linux | All about Linux]&lt;br /&gt;
&lt;br /&gt;
== Issues ==&lt;br /&gt;
&lt;br /&gt;
=== cli_loadldb: logical signature uses PCREs but support is disabled ===&lt;br /&gt;
&lt;br /&gt;
 LibClamAV Warning: cli_loadldb: logical signature for Win.Trojan.ssid18332 uses PCREs but support is disabled, skipping&lt;br /&gt;
&lt;br /&gt;
The new .99 uses PCRE.  Install with the following and reconfigure/compile ClamAV:&lt;br /&gt;
 yum install pcre-devel&lt;br /&gt;
&lt;br /&gt;
== keywords ==&lt;br /&gt;
&lt;br /&gt;
[[Category:Linux]]&lt;/div&gt;</summary>
		<author><name>Kenneth</name></author>
	</entry>
</feed>