<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
  <title>Linux</title>
  <link rel="alternate" type="text/html" href="http://pingv.com/tag/linux"/>
  <link rel="self" type="application/atom+xml" href="http://pingv.com/taxonomy/term/141/atom/feed"/>
  <id>http://pingv.com/taxonomy/term/141/atom/feed</id>
  <updated>2007-05-15T21:01:18-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>
  <entry>
    <title>Performance and Scalability Roundup</title>
    <link rel="alternate" type="text/html" href="http://pingv.com/blog/greg/200705/performance-and-scalability-roundup" />
    <id>http://pingv.com/blog/greg/200705/performance-and-scalability-roundup</id>
    <published>2007-05-15T21:01:18-05:00</published>
    <updated>2007-05-15T21:01:18-05:00</updated>
    <author>
      <name>Greg</name>
    </author>
    <category term="Drupal" />
    <category term="Linux" />
    <category term="Performance" />
    <content type="html"><![CDATA[ <h3>Performance and Scalability Theory</h3>
<p>Back during the Open Source CMS Conference (<a href="http://pingv.com/tag/oscms-summit">discussion on pingV.com</a>) we attended a fundraiser/seminar hosted by Lullabot about Performance and Scalability.  The presentation was really great.  Some of it I knew already, some was new to me, but seeing it all presented together really helped solidify the concepts in my mind.  </p>
<h3>The Performance Need</h3>
<p>Shortly afterward we were engaged on a project that needed to really snap.  The <a href="http://pingv.com/image/portfolio-gallery/website-portfolio/make-earth-day-every-day">Make Earth Day Every Day</a> project really needed their server to respond quickly.  They also need it to handle large numbers of visitors - Earth Day was coming up!  So, I put all my old and new performance tuning knowledge to work.</p>
<h3>Performance/Scalability Tuning in Practice</h3>
<p>While most of these techniques apply to dedicated servers or VPS, some of the ideas are useful for shared hosts as well.</p>
<p>First, I used the Apache Benchmark tool to test out the servers and see how they would perform as a baseline.  It's important to be methodical, do tests, make a small tweak, do more tests, and record the results along the way.  <strong>You can't manage what you don't measure.</strong>   With the default installation, the sites handled 5.5 requests per second.  The Drupal cache wasn't enabled, so my first step was to do that.  Immediately the performance went to 23 requests per second.</p>
<p>Using the vmstat diagnostic tools I learned about in the session I noticed that the CPUs on the web server were maxed out.  So, I installed the <a href="http://pecl.php.net/package/APC">APC opcode cache</a> which drastically reduces the amount of processing and memory required for each page load.  Without any further configuration requests per second went to 215.</p>
<p>Various other small tweaks (removing unnecessary Apache modules, and tweaks to the database configuration file) resulted in a gain of another 5 requests per second.</p>
<p>So, the final count is from 5 requests per second to over 220 requests per second.  Given the nature of the site we expected users to spend a minute or more on each page which should allow for more than 13,000 simultaneous users.  </p>
<p>There is much more valuable information in the output from the Apache Benchmark tool than just the requests per second, but it is an easy metric to use to help explain the magnitude of difference possible with some work in performance tuning.</p>
<h3>Performance/Scalability Documentation Round Up</h3>
<p>I've talked mostly about the seminar at OSCMS2007 given by Lullabot and the <a href="http://www.lullabot.com/articles/performance_and_scalability_seminar_slides">slides are available online</a>.  But really there are lots of great articles on tuning from the Drupal community both in the <a href="http://drupal.org/node/2601">Drupal.org Handbook</a> and on various other sites like <a href="http://2bits.com/articles/drupal-performance-tuning-and-optimization-for-large-web-sites.html">the 2bits.com book of Performance Tuning and Optimization for Large Sites</a>.</p>
<p>Among all of these locations you can find lots of great information to help you tune your site for optimum performance.</p>
     ]]></content>
  </entry>
</feed>
