<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Nothing But Reboots</title>
	<atom:link href="http://nothingbutreboots.com/feed" rel="self" type="application/rss+xml" />
	<link>http://nothingbutreboots.com</link>
	<description>A quicker Google.</description>
	<lastBuildDate>Sat, 10 Jul 2010 09:39:01 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>Exim and Exchange</title>
		<link>http://nothingbutreboots.com/2010/exim-and-exchange</link>
		<comments>http://nothingbutreboots.com/2010/exim-and-exchange#comments</comments>
		<pubDate>Sat, 10 Jul 2010 09:39:01 +0000</pubDate>
		<dc:creator>Luke</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://nothingbutreboots.com/?p=339</guid>
		<description><![CDATA[As part of a new project I&#8217;ve been working on I&#8217;ve had to install and configure an Exchange 2007 server within my home network. I&#8217;ve managed to finally get delivery to both Exim and Exchange working, dependent on the address mail is being sent to. Exim works as both a smarthost for Exchange and an [...]]]></description>
			<content:encoded><![CDATA[<p>As part of a new project I&#8217;ve been working on I&#8217;ve had to install and configure an Exchange 2007 server within my home network. I&#8217;ve managed to finally get delivery to both Exim and Exchange working, dependent on the address mail is being sent to. Exim works as both a smarthost for Exchange and an independent mail server.</p>
<p>So for example, lm @nothingbutreboots.com goes to Exim (and then onto Cyrus via LMTP), which can be accessed using RoundCube. However, mail to luke.morgan @nothingbutreboots.com gets passed to Exchange. Similarly, Exchange uses my Exim box as it&#8217;s smarthost for outbound mail. </p>
<p>Here&#8217;s a quick look at the relevant bits of the Exim config files which may give somebody trying to do a similar thing a few pointers:</p>
<p><strong>/etc/exim4/conf.d/router/200_exim4-config_primary</strong></p>
<p class="code">
virtual:<br />
        driver = redirect<br />
        domains = dsearch;/etc/exim4/virtual/<br />
        data = ${lookup{$local_part}lsearch{/etc/exim4/virtual/$domain}}<br />
        #one_time<br />
        no_more</p>
<p class="code">send_to_smart_host:<br />
        debug_print = &#8220;R: attempting to send to Exchange&#8221;<br />
        driver = manualroute<br />
        domains = ad.nothingbutreboots.com<br />
        transport = remote_smtp<br />
        route_data = &#8220;ad.nothingbutreboots.com&#8221;<br />
        no_more
</p>
<p class="code">
send_to_cyrus:<br />
        debug_print = &#8220;R: attempting to send to cyrus $local_part@$domain&#8221;<br />
        driver = manualroute<br />
        domains = zivi.nothingbutreboots.com<br />
        transport = LOCAL_DELIVERY<br />
        route_list = +local_domains<br />
        no_more
</p>
<p>So then you have the relevant domain listings within your virtual folder, which the virtual router will then parse as above and decide which transport to send the mail onto:</p>
<p><strong>/etc/exim4/virtual/nothingbutreboots.com</strong></p>
<p class="code">luke.morgan luke.morgan@ad.nothingbutreboots.com<br />
lm lm@nothingbutreboots.com
</p>
<p>For the above to work you&#8217;ll obviously need correct MX entries within your BIND config and within your Windows DNS.</p>
]]></content:encoded>
			<wfw:commentRss>http://nothingbutreboots.com/2010/exim-and-exchange/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Reinstalling IIS6 on an Exchange Server</title>
		<link>http://nothingbutreboots.com/2010/reinstalling-iis6-on-an-exchange-server</link>
		<comments>http://nothingbutreboots.com/2010/reinstalling-iis6-on-an-exchange-server#comments</comments>
		<pubDate>Sat, 10 Jul 2010 09:09:59 +0000</pubDate>
		<dc:creator>Luke</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://nothingbutreboots.com/?p=333</guid>
		<description><![CDATA[Following on from this post, it came to a point where I had to face facts &#8211; I had to completely reinstall IIS. IIS was working fine, but I was trying to install RSA&#8217;s web agent to allow OWA to be secured using SecurID, and the installer was insisting that IIS wasn&#8217;t installed. Even after [...]]]></description>
			<content:encoded><![CDATA[<p>Following on from <a href="http://nothingbutreboots.com/2010/strange-problems-with-windows-2003-x64-r2-iis-manager">this post</a>, it came to a point where I had to face facts &#8211; I had to completely reinstall IIS. IIS was working fine, but I was trying to install RSA&#8217;s web agent to allow OWA to be secured using SecurID, and the installer was insisting that IIS wasn&#8217;t installed. Even after (rather bashfully) running a batch script to register every DLL in the inetsrv folder, it still wasn&#8217;t right. </p>
<p>Finally, I decided to give up rooting around in the registry and just reinstall. This is somewhat of a trivial task on a &#8216;normal&#8217; IIS server, but when you combine it with the half a dozen web apps that Exchange installs, it becomes a little more complex. </p>
<p>Luckily there&#8217;s a guide for doing exactly this over at Microsoft&#8217;s Support site. However, if you followed the guide and then got the following (all too common) error when trying to access Outlook Web Access (OWA):</p>
<p class="alert">Outlook Web Access did not initialize. An event has been logged so that the system administrator can resolve the issue. Please contact technical support for your organization.</p>
<p>This error is commonly caused by a permissions or authentication problem. First, ensure that the owa subdirectory (usually under the &#8216;Default website&#8217; tree) within IIS Manager has the following authentication methods set:</p>
<p class="information">OWA &#8211; Basic<br />
8.1.240.5 &#8211; Enable anonymous access<br />
auth &#8211; Enable anonymous access<br />
Bin &#8211; Enable anonymous access<br />
Current &#8211; Basic<br />
forms &#8211; Basic<br />
Help &#8211; Basic<br />
smime &#8211; Basic<br />
spell &#8211; Basic</p>
<p>Do an iisreset and try OWA again. If you&#8217;re still having problems, your IUSR accounts may have changed password during the reinstall, and IIS won&#8217;t be aware of the new ones. Follow this guide <a href="http://www.howtonetworking.com/Internet/resetpassword.htm">here</a>, followed by an iisreset, and hopefully you should now have a functioning OWA.</p>
]]></content:encoded>
			<wfw:commentRss>http://nothingbutreboots.com/2010/reinstalling-iis6-on-an-exchange-server/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Strange problems with Windows 2003 x64 R2 &amp; IIS Manager</title>
		<link>http://nothingbutreboots.com/2010/strange-problems-with-windows-2003-x64-r2-iis-manager</link>
		<comments>http://nothingbutreboots.com/2010/strange-problems-with-windows-2003-x64-r2-iis-manager#comments</comments>
		<pubDate>Thu, 01 Jul 2010 18:42:00 +0000</pubDate>
		<dc:creator>Luke</dc:creator>
				<category><![CDATA[Server]]></category>
		<category><![CDATA[Windows]]></category>
		<category><![CDATA[certificate wizard won't run]]></category>
		<category><![CDATA[iis manager could not create snap-in]]></category>
		<category><![CDATA[iis manager not in administrator tools]]></category>
		<category><![CDATA[mmc could not create snap-in]]></category>
		<category><![CDATA[nothing happens click server certificate]]></category>

		<guid isPermaLink="false">http://nothingbutreboots.com/2010/strange-problems-with-windows-2003-x64-r2-iis-manager</guid>
		<description><![CDATA[This post details problems I&#8217;ve had with a Windows 2003 Enterprise x64 R2 install, and more specifically the Internet Information Services Manager, and the certicate wizard within. I’ve had a couple of strange problems with a Windows 2003 install I’ve been carrying out over the past couple of days. The first is the fact that [...]]]></description>
			<content:encoded><![CDATA[<p class="information">This post details problems I&#8217;ve had with a Windows 2003 Enterprise x64 R2 install, and more specifically the Internet Information Services Manager, and the certicate wizard within.</p>
<p>I’ve had a couple of strange problems with a Windows 2003 install I’ve been carrying out over the past couple of days. </p>
<p>The first is the fact that despite every component Internet Information Services showing as being fully installed in the ‘Windows Add/Remove’ Components dialog, the IIS manager couldn’t be found within Administrator Tools. </p>
<p>The fact that I got the IIS default install webpage when visiting <a href="http://localhost">http://localhost</a> confirmed that it was indeed installed. However, if I tried to run iismgr via the command line, the MMC would open with the red cross informing me that “MMC could not create the snap-in”. After a little digging I found a solution to the problem, which is caused by the IIS manager DLL not being registered (for reasons unbeknownst to me). To fix it, run the following in a command prompt (or from Run):</p>
<p class="code">regsvr2 %windir%\system32\inetsrv\inetmgr.dll</p>
<p>You should get the confirmation message box telling you that the DLL has been successfully registered. Close and reopen any IIS MMC and all should now be right.</p>
<p>The next strange problem was found when trying to install an SSL certificate within the IIS manager. Right clicking on the ‘Default Website’ branch and selecting properties, and then clicking on ‘Server Certificate’ within the ‘Directory Security’ tab wouldn’t open the certficate wizard. Clicking on ‘Edit’ had the same result, the certificate wizard just wouldn’t open. Again, this problem is caused by a component not being registered, run the following command to register the Certificate Manager OCX:</p>
<p class="code">regsvr32 %systemroot%\system32\inetsrv\certmap.ocx</p>
<p>Again, you should receive confirmation that the component has registered successfully. Now, if you go back into IIS Manager you&#8217;ll see that you can now click on the &#8216;Edit&#8217; button, but clicking on &#8216;Server Certificate&#8217; still does nothing. That means that there&#8217;s still one more component to register, certwiz.ocx &#8211; do so by running the following:</p>
<p class="code">regsvr32 %systemroot%\system32\inetsrv\certwiz.ocx</p>
<p>Et voila! You should now be able to run the certificate wizard.</p>
<p>I haven’t a clue why these two problems have occurred with this particular installation, I’ve done nearly a dozen near-identical installs and never ran into this problem before. I’m just glad it didn’t result in a complete reinstall <img src='http://nothingbutreboots.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://nothingbutreboots.com/2010/strange-problems-with-windows-2003-x64-r2-iis-manager/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>The Internet in Numbers</title>
		<link>http://nothingbutreboots.com/2010/the-internet-in-numbers</link>
		<comments>http://nothingbutreboots.com/2010/the-internet-in-numbers#comments</comments>
		<pubDate>Wed, 03 Mar 2010 23:11:28 +0000</pubDate>
		<dc:creator>Luke</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://nothingbutreboots.com/?p=312</guid>
		<description><![CDATA[I&#8217;m not one to usually re-post videos, but this is a good one, and on topic JESS3 / The State of The Internet from JESS3 on Vimeo.]]></description>
			<content:encoded><![CDATA[<p>I&#8217;m not one to usually re-post videos, but this is a good one, and on topic <img src='http://nothingbutreboots.com/wp-includes/images/smilies/icon_biggrin.gif' alt=':D' class='wp-smiley' /> </p>
<p><object width="400" height="300"><param name="allowfullscreen" value="true" /><param name="allowscriptaccess" value="always" /><param name="movie" value="http://vimeo.com/moogaloop.swf?clip_id=9641036&amp;server=vimeo.com&amp;show_title=1&amp;show_byline=1&amp;show_portrait=1&amp;color=ffffff&amp;fullscreen=1" /><embed src="http://vimeo.com/moogaloop.swf?clip_id=9641036&amp;server=vimeo.com&amp;show_title=1&amp;show_byline=1&amp;show_portrait=1&amp;color=ffffff&amp;fullscreen=1" type="application/x-shockwave-flash" allowfullscreen="true" allowscriptaccess="always" width="400" height="300"></embed></object>
<p><a href="http://vimeo.com/9641036">JESS3 / The State of The Internet</a> from <a href="http://vimeo.com/jessesaves">JESS3</a> on <a href="http://vimeo.com">Vimeo</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://nothingbutreboots.com/2010/the-internet-in-numbers/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Java Weather API</title>
		<link>http://nothingbutreboots.com/2010/java-weather-api</link>
		<comments>http://nothingbutreboots.com/2010/java-weather-api#comments</comments>
		<pubDate>Tue, 02 Mar 2010 21:26:22 +0000</pubDate>
		<dc:creator>Luke</dc:creator>
				<category><![CDATA[Java]]></category>
		<category><![CDATA[google weather api]]></category>
		<category><![CDATA[google weather java]]></category>
		<category><![CDATA[google weather xml feed]]></category>
		<category><![CDATA[java weather api]]></category>

		<guid isPermaLink="false">http://nothingbutreboots.com/?p=307</guid>
		<description><![CDATA[I&#8217;ve also been spending quite a lot of time with a friend developing a Java Weather API, which is now almost nearing completion (85th revision and counting). I&#8217;ve been using the API as part of a larger system that monitors climate conditions in certain locations during the course of a year, collating the results which [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve also been spending quite a lot of time with a <a href="http://aboulton.blogspot.com">friend</a> developing a Java Weather API, which is now almost nearing completion (85th revision and counting). I&#8217;ve been using the API as part of a larger system that monitors climate conditions in certain locations during the course of a year, collating the results which will later be used to generate graphs and other statistics.</p>
<p>The API is pretty simple, but certainly effective, and makes use of Google&#8217;s own weather API that&#8217;s provided as a <a href="http://www.google.co.uk/ig/api?weather=london">SOAP service</a>. </p>
<p>The API parses the XML feed given by Google, and constructs Weather objects that can then further be manipulated.</p>
<p>Here&#8217;s a simple example of how the API could be used:</p>
<pre name=code class=java>
try
{
   Weather weather = WeatherStation.getWeather("wirral");
}
catch(WeatherStationException wse)
{} // Bad!

weather.getConditions();  //Returns a string, such as "Fog", "Partly Cloudy"
weather.getTemperature(); //Default is to return result in degree celsius
</pre>
<p>As with my last post, we do fully intend to make these APIs available publicly at some point in the near future. </p>
]]></content:encoded>
			<wfw:commentRss>http://nothingbutreboots.com/2010/java-weather-api/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Java API for monitoring websites</title>
		<link>http://nothingbutreboots.com/2010/website-monitoring-api</link>
		<comments>http://nothingbutreboots.com/2010/website-monitoring-api#comments</comments>
		<pubDate>Tue, 02 Mar 2010 21:05:47 +0000</pubDate>
		<dc:creator>Luke</dc:creator>
				<category><![CDATA[Java]]></category>
		<category><![CDATA[java api]]></category>
		<category><![CDATA[java web monitor api]]></category>
		<category><![CDATA[java website monitoring api]]></category>

		<guid isPermaLink="false">http://nothingbutreboots.com/?p=294</guid>
		<description><![CDATA[I&#8217;ve spent the past couple of hours completing a first revision for a Java API that makes use of the excellent HtmlUnit libraries to enable monitoring of a web servers response time. Here&#8217;s a simple example of how I&#8217;d implement the API: String[] siteUrls = {"http://www.bingo.com", "http://www.microsoft.com", "http://www.google.com"}; for (String url : siteUrls) { Website [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve spent the past couple of hours completing a first revision for a Java API that makes use of the excellent <a href="http://htmlunit.sourceforge.net">HtmlUnit</a> libraries to enable monitoring of a web servers response time. </p>
<p>Here&#8217;s a simple example of how I&#8217;d implement the API:</p>
<pre name="code" class="java">
String[] siteUrls = {"http://www.bingo.com",
			    "http://www.microsoft.com",
			    "http://www.google.com"};

for (String url : siteUrls)
{
    Website test = new Website(url);

    System.out.print("Site: ");
    System.out.println(test.getSiteUrl());

    System.out.println("\tTest 1:");
    System.out.println("\t\tCreated: " + test.getCreateDate());
    System.out.println("\t\tResponse time: " + test.getResponseTime() + "ms");
    System.out.println("\t\tTime of last refresh: " + test.getLastRefreshed());

    System.out.println("\tTest 2:");
    System.out.println("\t\tCreated: " + test.getCreateDate());
    System.out.println("\t\tResponse time: " + test.getResponseTime() + "ms");
    System.out.println("\t\tTime of last refresh: " + test.getLastRefreshed());
    System.out.println();
    System.out.println("");
}
</pre>
<p>Which gives: </p>
<p class="code">
Site: http://www.bingo.com<br />
        Test 1:<br />
                Created: Tue Mar 02 20:29:29 GMT 2010<br />
                Response time: 149ms<br />
                Time of last refresh: Tue Mar 02 20:29:30 GMT 2010<br />
        Test 2:<br />
                Created: Tue Mar 02 20:29:29 GMT 2010<br />
                Response time: 100ms<br />
                Time of last refresh: Tue Mar 02 20:29:31 GMT 2010<br />
<br />Site: http://www.microsoft.com<br />
        Test 1:<br />
                Created: Tue Mar 02 20:29:31 GMT 2010<br />
                Response time: 507ms<br />
                Time of last refresh: Tue Mar 02 20:29:33 GMT 2010<br />
        Test 2:<br />
                Created: Tue Mar 02 20:29:31 GMT 2010<br />
                Response time: 361ms<br />
                Time of last refresh: Tue Mar 02 20:29:34 GMT 2010<br />
<br />
Site: http://www.google.com<br />
        Test 1:<br />
                Created: Tue Mar 02 20:29:34 GMT 2010<br />
                Response time: 86ms<br />
                Time of last refresh: Tue Mar 02 20:29:35 GMT 2010<br />
        Test 2:<br />
                Created: Tue Mar 02 20:29:34 GMT 2010<br />
                Response time: 85ms<br />
                Time of last refresh: Tue Mar 02 20:29:35 GMT 2010
</p>
<p>The idea is that I&#8217;ll use this API in a bigger project I&#8217;m working on, a simple OpenSource website monitoring/reporting suite.</p>
<p>Still a lot of work to do, leave a comment if you&#8217;d like to take a closer look at the API. I do intend to make a public SVN server at some point and start porting over some of these little projects.</p>
]]></content:encoded>
			<wfw:commentRss>http://nothingbutreboots.com/2010/website-monitoring-api/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Use a swap file instead!</title>
		<link>http://nothingbutreboots.com/2010/use-a-swap-file-instead</link>
		<comments>http://nothingbutreboots.com/2010/use-a-swap-file-instead#comments</comments>
		<pubDate>Sat, 27 Feb 2010 17:36:36 +0000</pubDate>
		<dc:creator>Luke</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[remove swap partition]]></category>
		<category><![CDATA[swap file]]></category>
		<category><![CDATA[swap partition]]></category>

		<guid isPermaLink="false">http://nothingbutreboots.com/?p=266</guid>
		<description><![CDATA[I&#8217;ve only recently stumbled across this, but you can now (and probably have been able to since god knows what kernel ) use a swap file instead of having to create a swap partition. There&#8217;s no performance impact, and it&#8217;s easy to setup/configure. Enter the following at the CLI: #> dd if=/dev/zero of=/opt/512MB.swap bs=1M count=512 [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve only recently stumbled across this, but you can now (and probably have been able to since god knows what kernel <img src='http://nothingbutreboots.com/wp-includes/images/smilies/icon_razz.gif' alt=':P' class='wp-smiley' /> )  use a swap file instead of having to create a swap partition. There&#8217;s no performance impact, and it&#8217;s easy to setup/configure.</p>
<p>Enter the following at the CLI:</p>
<p class="code">#> dd if=/dev/zero of=/opt/512MB.swap bs=1M count=512<br />
#> mkswap /opt/512MB.swap<br />
#> swapon /opt/512MB.swap</p>
<p>Obviously you can put the file wherever you want. The real benefit of utilising a swap file rather than a swap partition may already be obvious: if you want to increase your swap size, simply <code>swapoff</code>, create a new, bigger file &#8211; and <code>swapon</code> again.</p>
]]></content:encoded>
			<wfw:commentRss>http://nothingbutreboots.com/2010/use-a-swap-file-instead/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Quick BASH tips</title>
		<link>http://nothingbutreboots.com/2010/quick-bash-tips</link>
		<comments>http://nothingbutreboots.com/2010/quick-bash-tips#comments</comments>
		<pubDate>Fri, 26 Feb 2010 18:22:58 +0000</pubDate>
		<dc:creator>Luke</dc:creator>
				<category><![CDATA[BASH]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[bash auto complete]]></category>
		<category><![CDATA[bash auto-completion]]></category>
		<category><![CDATA[bash bigger history]]></category>
		<category><![CDATA[bash history]]></category>

		<guid isPermaLink="false">http://nothingbutreboots.com/?p=260</guid>
		<description><![CDATA[If like me you use history extensively, then you&#8217;ve probably been annoyed at the fact that it forgets that complicated command from six months previous due to its size limitations. Increasing the size of your history is an easy change, simply edit ~/.bashrc and insert the following line: export HISTSIZE=10000 (Set HISTSIZE=0 if you want [...]]]></description>
			<content:encoded><![CDATA[<p>If like me you use history extensively, then you&#8217;ve probably been annoyed at the fact that it forgets that complicated command from six months previous due to its size limitations. </p>
<p>Increasing the size of your history is an easy change, simply edit <code>~/.bashrc</code> and insert the following line:</p>
<p class="code">export HISTSIZE=10000</p>
<p>(Set <code>HISTSIZE=0</code> if you want to disable the history all together).</p>
<p class="information">As is already documented over at the &#8216;<a href="http://nothingbutreboots.com/?page_id=234">Linux Quick Tips</a>&#8216; section, perhaps one of the most useful BASH shortcuts is the CTRL-R command, that allows you to search through the command history.</p>
<p>Also, it&#8217;s probably a good idea to stop duplicate lines from being entered one after another and taking needless space, so uncomment the following line to leave it as shown:</p>
<p class="code">export HISTCONTROL=ignoredups</p>
<p>If you&#8217;re privacy conscious &#8211; you can change that line to read:</p>
<p class="code">export HISTCONTROL=ignoreboth</p>
<p>That (and indeed having <code>HISTCONTROL=ignorespace</code>) will mean that any lines starting with a space will be ignored.</p>
<p>Whilst you&#8217;re in that file, you can also fix one of my pet hates when using BASH on other people&#8217;s servers &#8211; auto-completion features for programs that can use them, i.e. apt-get. If you&#8217;re logged in as a normal user, auto-completion for apt-get et al is already enabled. But for root, it isn&#8217;t. </p>
<p>To enable auto-completion, scroll to the bottom of the file and uncomment the appropriate section so it looks like the following:</p>
<p class="code">if [ -f /etc/bash_completion ]; then<br />
    . /etc/bash_completion<br />
fi
</p>
<p>Finally, once you&#8217;ve saved and quitted vi/nano/vim/pico etc, to apply all the changes in your current shell, you can respawn bash by doing:</p>
<p class="code">#> bash<br />
#></p>
]]></content:encoded>
			<wfw:commentRss>http://nothingbutreboots.com/2010/quick-bash-tips/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Cyrus Squat File Problem</title>
		<link>http://nothingbutreboots.com/2010/cyrus-squat-file-problem</link>
		<comments>http://nothingbutreboots.com/2010/cyrus-squat-file-problem#comments</comments>
		<pubDate>Sun, 21 Feb 2010 14:13:26 +0000</pubDate>
		<dc:creator>Luke</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Mailadmin]]></category>
		<category><![CDATA[cyrus]]></category>
		<category><![CDATA[squat error]]></category>
		<category><![CDATA[squat error mail.log]]></category>
		<category><![CDATA[squat file]]></category>

		<guid isPermaLink="false">http://nothingbutreboots.com/?p=254</guid>
		<description><![CDATA[If you&#8217;re getting the following (non-)error in your log files (/var/log/mail.log), then there&#8217;s a quick way to fix it if you&#8217;re not interested in ignoring it: Feb 21 13:57:53 zivi cyrus/imaps[4648]: SQUAT failed to open index file Feb 21 13:57:53 zivi cyrus/imaps[4648]: SQUAT failed The error is caused by a user doing a search within [...]]]></description>
			<content:encoded><![CDATA[<p>If you&#8217;re getting the following (non-)error in your log files (/var/log/mail.log), then there&#8217;s a quick way to fix it if you&#8217;re not interested in ignoring it:</p>
<p class="code">Feb 21 13:57:53 zivi cyrus/imaps[4648]: SQUAT failed to open index file<br />
Feb 21 13:57:53 zivi cyrus/imaps[4648]: SQUAT failed</p>
<p>The error is caused by a user doing a search within a mailbox, and a squatter file (aka a search index) is not available. Fix this by running the following as your cyrus user (typically &#8216;cyrus&#8217;):</p>
<p class="code">#> squatter -r user.username</p>
<p>If you&#8217;re doing a tail -f of /var/log/mail.log you&#8217;ll see the indexes being created.</p>
<p>Et voila &#8211; no more errors: </p>
<p class="code">Feb 21 14:10:11 zivi cyrus/imaps[5073]: SQUAT returned 277 messages</p>
<p>If you want to take it a step further, you can automate this by creating a cronjob. Or if you&#8217;re using a standard Cyrus installation, the last few lines of your /etc/cyrus.conf will have some useful settings commented out that will allow Cyrus to schedule the SQUAT operations automatically:</p>
<p class="code"># reindex changed mailboxes (fulltext) approximately every other hour<br />
        #squatter_1     cmd=&#8221;/usr/bin/nice -n 19 /usr/sbin/squatter -s&#8221; period=120<br />
        # reindex all mailboxes (fulltext) daily<br />
        #squatter_a     cmd=&#8221;/usr/sbin/squatter&#8221; at=0517</p>
<p class="information">As hinted at the beginning of this entry, this is a sort of non-error in as much as it can be safely ignored, and squat indexes need only be created if their is an advantage to doing so (that is, searches are often carried out).</p>
]]></content:encoded>
			<wfw:commentRss>http://nothingbutreboots.com/2010/cyrus-squat-file-problem/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Apache and YSlow Optimisation</title>
		<link>http://nothingbutreboots.com/2010/apache-and-yslow-optimisation</link>
		<comments>http://nothingbutreboots.com/2010/apache-and-yslow-optimisation#comments</comments>
		<pubDate>Sun, 07 Feb 2010 16:11:45 +0000</pubDate>
		<dc:creator>Luke</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://nothingbutreboots.com/?p=243</guid>
		<description><![CDATA[I&#8217;ve been working on a website for the past few weeks, and as I&#8217;m reaching the final stages I&#8217;ve started to look at loading times and performance etc. The site uses quite a lot of jQuery and other AJAX libraries, but I was still shocked when I realised that over 500kB was being used just [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve been working on a website for the past few weeks, and as I&#8217;m reaching the final stages I&#8217;ve started to look at loading times and performance etc. The site uses quite a lot of jQuery and other AJAX libraries, but I was still shocked when I realised that over 500kB was being used just in Javascript!</p>
<p>Whilst the vast majority of the population are probably now on broadband, even I can&#8217;t forgive the homepage of this website totalling almost a 1MB download when images and the rafts of CSS are included.</p>
<p>So I&#8217;ve been making good use of <a href="http://developer.yahoo.com/yslow/">YSlow</a>, the excellent performance debugger produced by Yahoo, which runs within Firefox (as part of the excellent Firebug suite).</p>
<p>My initial score was as bad as I thought, with the index page receiving a &#8216;Grade E&#8217;. My first port of call was to fix the GZip compression on my Apache box, which involved putting the following in a .htaccess file in the root web directory (/var/www on my Ubuntu server).</p>
<p class="code"># Below uses mod_deflate to compress text files. Never compress binary files.<br />
AddOutputFilterByType DEFLATE text/html text/plain text/css text/javascript text/xml image/svg+xml application/javascript application/x-javascript application/atom_xml application/rss+xml application/xml ap$<br />
# Properly handle old browsers that do not support compression<br />
BrowserMatch ^Mozilla/4 gzip-only-text/html<br />
BrowserMatch ^Mozilla/4\.0[678] no-gzip<br />
BrowserMatch \bMSIE !no-gzip !gzip-only-text/html<br />
# Explicitly exclude binary files from compression just in case<br />
SetEnvIfNoCase Request_URI \.(?:gif|jpe?g|png)$ no-gzip dont-vary<br />
SetEnvIfNoCase Request_URI \.(?:exe|t?gz|zip|bz2|sit|rar)$ no-gzip dont-vary<br />
SetEnvIfNoCase Request_URI \.pdf$ no-gzip dont-vary<br />
SetEnvIfNoCase Request_URI \.avi$ no-gzip dont-vary<br />
SetEnvIfNoCase Request_URI \.mov$ no-gzip dont-vary<br />
SetEnvIfNoCase Request_URI \.mp3$ no-gzip dont-vary<br />
SetEnvIfNoCase Request_URI \.mp4$ no-gzip dont-vary<br />
SetEnvIfNoCase Request_URI \.rm$ no-gzip dont-vary
</p>
<p>YSlow also complained that none of the page elements had expiry headers. Expiry headers are used by the browser in order know how long to cache an object for.</p>
<p>First of all, enable mod_expires:</p>
<p class="code">#&gt; a2enmod expires</p>
<p>And then put the following in your httpd.conf (/etc/apache2/httpd.conf):</p>
<p class="code">
<code><ifmodule mod_expires.c><br />
<filesmatch "\.(jpg|gif|jpeg|ico|swf|png|css|js)$"><br />
ExpiresActive on<br />
ExpiresDefault "access plus 1 year"<br />
</filesmatch><br />
</ifmodule></code>
</p>
<p>You should be able to see that the above sets the expiry headers for the most common file formats, and sets them for one year in the future. You can modify this value as per your requirements, but be warned that YSlow complains if it isn&#8217;t &#8220;too far in the future&#8221;.</p>
<p>Finally, YSlow was complaining about ETags. ETags are explained thoroughly <a href="http://developer.yahoo.net/blog/archives/2007/07/high_performanc_11.html">here</a>, which can be summarised with: the majority of browsers use the &#8220;Last modified&#8221; header tag to validate components, and as such, ETags are largely redundant and as such they&#8217;re best turned off.</p>
<p>To do so, first enable mod_headers:</p>
<p class="code">#&gt; a2enmod headers</p>
<p>And then place the following in your site config file (i.e. /etc/apache2/sites-enabled/<em>sitename</em>):</p>
<p class="code">ServerAdmin lm@nothingbutreboots.com<br />
ServerName nothingbutreboots.com<br />
ServerAlias www.nothingbutreboots.com<br />
DocumentRoot /var/www<br />
Options FollowSymLinks<br />
AllowOverride All<br />
<strong><span style="color: #ff0000;">Header unset Etag<br />
FileETag none</span></strong>
</p>
<p>Finally, all that was left to do was follow the remaining tips offered by YSlow, namely merge all the JScripts into one file, the same for CSS. And then run all the images through the excellent <a href="http://developer.yahoo.com/yslow/smushit/">Smush.It</a>.</p>
<p>Et voila! Grade: A <img src='http://nothingbutreboots.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p class="alert">Google now offers there own performance analysis tool: <a href="http://code.google.com/speed/page-speed/">Google Page Speed</a>. Like YSlow, it tags on to the Firebug backend. Initial reports are mixed, but there&#8217;s a helpful comparison of both tools <a href="http://www.rarst.net/software/page-speed-vs-yslow/">here</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://nothingbutreboots.com/2010/apache-and-yslow-optimisation/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
