<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
  <title>pingVision</title>
  <subtitle>Interactive Design + Development for Drupal websites</subtitle>
  <link rel="alternate" type="text/html" href="http://pingv.com/blog/greghines/2007/installing-anti-virus-software-linux"/>
  <link rel="self" type="application/atom+xml" href="http://pingv.com/node/3705/atom/feed"/>
  <id>http://pingv.com/node/3705/atom/feed</id>
  <updated>2008-06-19T14:40:46-05:00</updated>
  <entry>
    <title>Installing anti-virus software on Linux</title>
    <link rel="alternate" type="text/html" href="http://pingv.com/blog/greghines/2007/installing-anti-virus-software-linux" />
    <id>http://pingv.com/blog/greghines/2007/installing-anti-virus-software-linux</id>
    <published>2007-12-13T12:02:41-06:00</published>
    <updated>2008-06-19T14:40:46-05:00</updated>
    <author>
      <name>GregHines</name>
    </author>
    <category term="anti-virus" />
    <category term="ClamAV" />
    <category term="install" />
    <category term="Linux" />
    <category term="software" />
    <category term="Ubuntu" />
    <content type="html"><![CDATA[<p> We recently needed to provide proof that we're running anti-virus software on our work machines, only many of us in the office are running <a href="http://www.ubuntu.com/">Ubuntu</a>. Though we don't really need it, we've installed <a href="http://www.clamav.net/">ClamAV</a> to check for viruses.</p>
<p>This is a guide to help you set up ClamAV on Ubuntu. First, you'll need to make sure you're getting packages from Universe. From the menu bar, go to System &rarr; Administration &rarr; Software Sources and check the "Community-maintained Open Source software (universe)" checkbox if it isn't already checked.</p>
<p>Now, open up a Terminal window and enter this command:</p>
<p><code>$ sudo apt-get install clamav</code></p>
<p>Before running your first scan, you'll want to update your anti-virus definitions:</p>
<p><code>$ sudo freshclam</code></p>
<p>Now you can finally run your first scan:</p>
<p><code>$ sudo clamscan -r -i / &gt; mail name@example.com</code></p>
<p>This will run the on-demand virus scan (<code>clamscan</code>) on your computer's root directory; it will recurse through the entire filesystem (<code>-r</code>) and it will only output the names of infected files (<code>-i</code>). And when it's done running, it will send you an e-mail with the results of the scan. Alternately, you can redirect the output of the command to a text file. Just change <code>mail name@example.com</code> to <code>clamscan.log</code>. Or, if you'd rather have the output display to the screen, just remove the <code>&gt;</code> and everything after it.</p>
<p>To set up a regular scan, you'll want to edit your /etc/crontab file:</p>
<p><code>$ sudo gedit /etc/crontab</code></p>
<p>Add these two lines to the end of the file and save the file:</p>
<div class="codeblock"><code>0 12&nbsp;&nbsp;&nbsp; * * *&nbsp;&nbsp; root&nbsp;&nbsp;&nbsp; freshclam<br />5 12&nbsp;&nbsp;&nbsp; * * *&nbsp;&nbsp; root&nbsp;&nbsp;&nbsp; clamscan -r -i / &gt; mail name@example.com</code></div>
<p>This runs every day at noon and updates the virus definitions before running the scan. You may want to make adjustments to the frequency or time of the scan, but this should give you a good starting point. </p>
    ]]></content>
  </entry>
</feed>
