<?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/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
	>

<channel>
	<title>Leigh&#039;s Persistent Thoughts</title>
	<atom:link href="http://leighspersistentthoughts.wordpress.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://leighspersistentthoughts.wordpress.com</link>
	<description>Generally development related ramblings of a guy with a leaning towards FLOSS, Web and GIS</description>
	<lastBuildDate>Sat, 15 Oct 2011 09:29:17 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
<cloud domain='leighspersistentthoughts.wordpress.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://s2.wp.com/i/buttonw-com.png</url>
		<title>Leigh&#039;s Persistent Thoughts</title>
		<link>http://leighspersistentthoughts.wordpress.com</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://leighspersistentthoughts.wordpress.com/osd.xml" title="Leigh&#039;s Persistent Thoughts" />
	<atom:link rel='hub' href='http://leighspersistentthoughts.wordpress.com/?pushpress=hub'/>
		<item>
		<title>Searching for text in MSSQL stored procedures</title>
		<link>http://leighspersistentthoughts.wordpress.com/2011/09/22/searching-for-text-in-mssql-stored-procedures/</link>
		<comments>http://leighspersistentthoughts.wordpress.com/2011/09/22/searching-for-text-in-mssql-stored-procedures/#comments</comments>
		<pubDate>Thu, 22 Sep 2011 02:53:40 +0000</pubDate>
		<dc:creator>Leigh's Persistent Thoughts</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[QuickTip]]></category>
		<category><![CDATA[SQL]]></category>

		<guid isPermaLink="false">http://leighspersistentthoughts.wordpress.com/?p=122</guid>
		<description><![CDATA[Simple 5 minute tip here, but I&#8217;d done this ages ago and forgotten how to do it. Suppose you know somewhere in the multitude of stored procedures in the database you&#8217;ve inherited that there&#8217;s likely a reference to a field &#8230; <a href="http://leighspersistentthoughts.wordpress.com/2011/09/22/searching-for-text-in-mssql-stored-procedures/">Continue reading <span class="meta-nav">&#8594;</span></a><img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=leighspersistentthoughts.wordpress.com&amp;blog=46031&amp;post=122&amp;subd=leighspersistentthoughts&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Simple 5 minute tip here, but I&#8217;d done this ages ago and forgotten how to do it.</p>
<p>Suppose you know somewhere in the multitude of stored procedures in the database you&#8217;ve inherited that there&#8217;s likely a reference to a field or table, and you don&#8217;t know where it is. How do you find it without going through each stored procedure and checking it?</p>
<p>Easy. The definitions are stored in the system tables, just like pretty much all structure of a MSSQL database, so we just take a look in those <a href="http://msdn.microsoft.com/en-us/library/ms188737.aspx">tables</a>, or the <a href="http://msdn.microsoft.com/en-us/library/ms186778.aspx">INFORMATION_SCHEMA views</a>.</p>
<p>There&#8217;s a few different ways of getting at the information, but let&#8217;s say you&#8217;re looking for references to the field <code>email</code>, and the table <code>Organisation</code>:</p>
<pre>
SELECT		routine_name,
		created,
		last_altered,
		routine_definition
FROM		information_schema.routines
WHERE		routine_definition LIKE '%email%'
AND		routine_definition LIKE '%Organisation%'

SELECT		NAME,
		create_date,
		modify_date,
		OBJECT_DEFINITION(OBJECT_ID) as Routine_Definition
FROM		sys.procedures
WHERE		OBJECT_DEFINITION(OBJECT_ID) LIKE '%email%'
AND		OBJECT_DEFINITION(OBJECT_ID) LIKE '%Organisation%'
</pre>
<p>or all references to a different <code>email</code> field that include no reference to the <code>Organisation</code> table? This one&#8217;s a bit more likely give false negatives &#8211; e.g. the procedure may reference the <code>Organisation</code> table in some way not related to the <code>email</code> field. But you get the idea.</p>
<pre>
SELECT		routine_name,
		created,
		last_altered,
		routine_definition
FROM		information_schema.routines
WHERE		routine_definition LIKE '%email%'
AND		routine_definition NOT LIKE '%Organisation%'
</pre>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/leighspersistentthoughts.wordpress.com/122/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/leighspersistentthoughts.wordpress.com/122/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/leighspersistentthoughts.wordpress.com/122/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/leighspersistentthoughts.wordpress.com/122/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/leighspersistentthoughts.wordpress.com/122/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/leighspersistentthoughts.wordpress.com/122/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/leighspersistentthoughts.wordpress.com/122/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/leighspersistentthoughts.wordpress.com/122/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/leighspersistentthoughts.wordpress.com/122/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/leighspersistentthoughts.wordpress.com/122/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/leighspersistentthoughts.wordpress.com/122/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/leighspersistentthoughts.wordpress.com/122/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/leighspersistentthoughts.wordpress.com/122/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/leighspersistentthoughts.wordpress.com/122/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=leighspersistentthoughts.wordpress.com&amp;blog=46031&amp;post=122&amp;subd=leighspersistentthoughts&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://leighspersistentthoughts.wordpress.com/2011/09/22/searching-for-text-in-mssql-stored-procedures/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/fa6992e7f674c4c356d2d1af347908a2?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">leighspersistentthoughts</media:title>
		</media:content>
	</item>
		<item>
		<title>IT education in schools</title>
		<link>http://leighspersistentthoughts.wordpress.com/2011/08/30/it-education-in-schools/</link>
		<comments>http://leighspersistentthoughts.wordpress.com/2011/08/30/it-education-in-schools/#comments</comments>
		<pubDate>Tue, 30 Aug 2011 11:09:38 +0000</pubDate>
		<dc:creator>Leigh's Persistent Thoughts</dc:creator>
				<category><![CDATA[Rant]]></category>
		<category><![CDATA[rant]]></category>

		<guid isPermaLink="false">http://leighspersistentthoughts.wordpress.com/?p=100</guid>
		<description><![CDATA[I've been getting more and more depressed with what I suspected was happening in IT education - certainly in the UK, and it appears too here in NZ - I recently started looking into schools here for my 6 year old (some years away) - and was saddened, but not surprised, to find a class masquerading as IT but really sounding more similar to the <a href="http://www.ecdl.org">European Computer Driving License</a>, basically teaching office computing skills. <a href="http://leighspersistentthoughts.wordpress.com/2011/08/30/it-education-in-schools/">Continue reading <span class="meta-nav">&#8594;</span></a><img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=leighspersistentthoughts.wordpress.com&amp;blog=46031&amp;post=100&amp;subd=leighspersistentthoughts&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>A recent post by <a href="https://plus.google.com/u/0/114228869493885222559/posts/4m8p8ykhG8W" title="Liz Quilty">Liz Quilty</a> echoed my thoughts, following Google&#8217;s Eric Schmidt&#8217;s recent <a href="http://www.bbc.co.uk/news/uk-14683133">criticism of education in the UK</a>. I don&#8217;t agree with everything Schmidt says, but I&#8217;m surprised that this hasn&#8217;t already been addressed if it&#8217;s really as bad as I fear it is.</p>
<p>I&#8217;ve been getting more and more depressed with what I suspected was happening in IT education &#8211; certainly in the UK, and it appears too here in NZ &#8211; I recently started looking into schools here for my 6 year old (some years away) &#8211; and was saddened, but not surprised, to find a class masquerading as IT but really sounding more similar to the <a href="http://www.ecdl.org">European Computer Driving License</a>, basically teaching office computing skills.</p>
<p>The driving lesson analogy works quite well here &#8211; it&#8217;s like claiming you&#8217;re teaching mechanic and metal work skills, when what you&#8217;re actually doing is teaching someone how to drive a car. Both valuable skills, but I wouldn&#8217;t like to live in a country that didn&#8217;t have any mechanics.</p>
<p>I&#8217;ll admit, teaching kids ECDL type lessons may still be useful &#8211; I&#8217;m sure that there are still a significant (but I suspect continuously decreasing) number of young people who still are intimidated by IT, but realistically, computers are one hell of a lot less intimidating than say even 10 years ago, and I imagine these classes are frankly a waste of time for 80+% of pupils.</p>
<p>I&#8217;m one of the generation that benefited from the <a href="http://en.wikipedia.org/wiki/BBC_Micro">BBC</a> &#8211; I remember programming on <a href="http://en.wikipedia.org/wiki/Commodore_PET">Commodore PETs</a> back in the mid 80&#8242;s, and then on the ground breaking <a href="http://en.wikipedia.org/wiki/BBC_Master">BBC Master Series</a> &#8211; these machines I&#8217;m sure encouraged a fair few of us to get really interested in computers.</p>
<p>It seems strange that when comparing how quickly you can both learn how to, and actually implement, vastly more complex and cool functionality than we could dream of 20-25 years ago, teachers seem to be shying away from programming and real IT, which should surely be far more accessible to young kids?</p>
<p>Bruce Clement has posted <a href="http://www.que.co.nz/2011/08/whats-state-of-computer-education-in.html">similar thoughts</a> too.</p>
<p><a href="https://plus.google.com/107847990164269071741/posts">Tim Foster</a> also pointed me to a great article in the Guardian &#8211; <a href="http://www.guardian.co.uk/technology/2011/aug/28/ict-changes-needed-national-curriculum">Kids today need a licence to tinker</a></p>
<p>So anyway, I&#8217;ve started showing my daughter <a href="http://scratch.mit.edu/">scratch</a> &#8211; it seems to be the <a href="http://en.wikipedia.org/wiki/Logo_(programming_language)">Logo</a> of the 2010&#8242;s. Although secretly I suspect she&#8217;ll be a musician anyway!</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/leighspersistentthoughts.wordpress.com/100/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/leighspersistentthoughts.wordpress.com/100/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/leighspersistentthoughts.wordpress.com/100/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/leighspersistentthoughts.wordpress.com/100/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/leighspersistentthoughts.wordpress.com/100/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/leighspersistentthoughts.wordpress.com/100/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/leighspersistentthoughts.wordpress.com/100/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/leighspersistentthoughts.wordpress.com/100/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/leighspersistentthoughts.wordpress.com/100/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/leighspersistentthoughts.wordpress.com/100/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/leighspersistentthoughts.wordpress.com/100/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/leighspersistentthoughts.wordpress.com/100/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/leighspersistentthoughts.wordpress.com/100/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/leighspersistentthoughts.wordpress.com/100/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=leighspersistentthoughts.wordpress.com&amp;blog=46031&amp;post=100&amp;subd=leighspersistentthoughts&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://leighspersistentthoughts.wordpress.com/2011/08/30/it-education-in-schools/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/fa6992e7f674c4c356d2d1af347908a2?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">leighspersistentthoughts</media:title>
		</media:content>
	</item>
		<item>
		<title>Moving from VMWare Server 2 to VMWare ESXi 4.1 &#8211; a walkthrough</title>
		<link>http://leighspersistentthoughts.wordpress.com/2011/08/25/moving-from-vmware-server-2-to-vmware-esxi-4-1-a-walkthrough/</link>
		<comments>http://leighspersistentthoughts.wordpress.com/2011/08/25/moving-from-vmware-server-2-to-vmware-esxi-4-1-a-walkthrough/#comments</comments>
		<pubDate>Wed, 24 Aug 2011 13:15:12 +0000</pubDate>
		<dc:creator>Leigh's Persistent Thoughts</dc:creator>
				<category><![CDATA[Virtualisation]]></category>

		<guid isPermaLink="false">http://leighspersistentthoughts.wordpress.com/?p=99</guid>
		<description><![CDATA[I&#8217;m sitting here gradually migrating a bunch of VMs on to our new server running VMware vSphere Hypervisor Based on ESXi. It&#8217;s taking a little while, and I got a bit flummoxed at a couple of points so I thought I &#8230; <a href="http://leighspersistentthoughts.wordpress.com/2011/08/25/moving-from-vmware-server-2-to-vmware-esxi-4-1-a-walkthrough/">Continue reading <span class="meta-nav">&#8594;</span></a><img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=leighspersistentthoughts.wordpress.com&amp;blog=46031&amp;post=99&amp;subd=leighspersistentthoughts&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>I&#8217;m sitting here gradually migrating a bunch of VMs on to our new server running VMware vSphere Hypervisor Based on ESXi. It&#8217;s taking a little while, and I got a bit flummoxed at a couple of points so I thought I might document what I had to do in order to get it all working.</p>
<p>There&#8217;s nothing really complex here, but I found it confusing in a number of places, so hopefully this may be of use to others &#8211; it will certainly be a memory aid for me in the future.</p>
<h2><span class="Apple-style-span" style="font-size:20px;">Background:</span></h2>
<p>We have an old Windows server the free running VMware Server 2 administered via VMware Infrastrutcure Web Access. There are some peculiarities if you want to run a console window in Firefox, but it generally works well, and is free, so I can&#8217;t really complain.</p>
<p>Whilst we&#8217;re doing this migration, we&#8217;re also looking at consolidating software licenses, an obvious candidate is the host machine running VMs &#8211; in this case I could either run VMware Server on Windows or Linux, or look at VMware vSphere based on ESXi. I&#8217;ve run VMware Server 2 on Ubuntu before &#8211; it was a bit of a nightmare and took a couple of days to get working properly, so I was keen to see if ESXi was any better. ESXi also runs bare metal as opposed to on top of another operating system, so there should be some performance benefits too.</p>
<p>So, <a href="https://www.vmware.com/tryvmware/index.php">VMware vSphere ESXi</a> it is then.</p>
<p>All of the VMware software we&#8217;re using below is free, but you&#8217;ll have to register in order to download it.</p>
<p><span id="more-99"></span></p>
<h2><span class="Apple-style-span" style="font-size:20px;">Downloading and installing ESXi</span></h2>
<p>Head on down to <a href="https://www.vmware.com/tryvmware/index.php">https://www.vmware.com/tryvmware/index.php, </a>sign your life away with EULAs and T&amp;C&#8217;s, and grab a binary &#8211; I manually downloaded the <em>ESXi 4.1 Installable Update 1 (CD ISO)</em> image file. Also make a note of the license key.</p>
<p>Once I got the ISO file, I blindly burned a CD, and hit my first obstacle. My HP DL 360 G7 doesn&#8217;t have a CD drive. No worries &#8211; we&#8217;ll create a bootable USB drive.</p>
<p>I already had a bootable Ubuntu thumb drive, so I used <a href="http://www.7-zip.org/">7-zip</a> to extract the contents of the ISO file onto the USB drive. Not too surprisingly, this wasn&#8217;t quite sufficient to get a functioning ESXi boot drive working, so instead a quick Google turned up many pages, among them this excellent one by Ivo Beeren detailing how to <a href="http://www.ivobeerens.nl/?p=699">Install VMware ESXi 4.1 from bootable USB stick</a>, which basically consisted of downloading <em>Syslinux</em>, editing 2 files, copying 2 files, and booting of the USB stick.</p>
<p>After kicking of the installation, a couple of 5 minute pauses and a restart, I was presented with EXSi&#8217;s very simple text interface, telling me to administer the server from 192.168.1.10.</p>
<p>Sure enough, on browsing to this address I can see a welcome screen allowing me to access a Web-Based Datastore browser, but also suggesting I download the <a href="http://vsphereclient.vmware.com/vsphereclient/3/4/5/0/4/3/VMware-viclient-all-4.1.0-345043.exe">vSphere Client</a>, which I do.</p>
<h2><span class="Apple-style-span" style="font-size:20px;">Administering the host server</span></h2>
<p>Once we&#8217;ve downloaded and installed the vSphere Client, we can connect to the server &#8211; the credentials set in Ivo&#8217;s page above include a root password of VMware01 in the <strong>ks.cfg</strong> file:</p>
<pre style="padding-left:30px;">rootpw VMware01</pre>
<p>Log into your server, e.g. 192.168.1.10, user: root, password: VMware01.</p>
<p>The first thing that confused me was mention of a 60 day trial &#8211; hang on, I&#8217;m a cheapskate, and chose ESXi as I thought it was free?!? Don&#8217;t worry &#8211; it is &#8211; just plug in your license key you noted earlier to get rid of the pesky warning.</p>
<p><strong>vSphere -&gt; Home -&gt; Inventory -&gt; Configuration -&gt; Software -&gt; Licensed Features -&gt; ESX Server License Type -&gt; Edit.</strong></p>
<h2><span class="Apple-style-span" style="font-size:20px;">Copying pre-existing VMs</span></h2>
<p>OK, so next I&#8217;ve got a load of VMs on my old server that I want to get onto the new box. But there&#8217;s no network file access, no FTP access, and the Web-Based Datastore browser is read-only. How do we get our VMs onto the new box?</p>
<p>Well, first off, <span style="color:#ff0000;"><em><strong>don&#8217;t use the approach below &#8211; it probably won&#8217;t work if your copying old VMware Server 2 VMs</strong></em></span>. But hidden away in vSphere is a method to upload files to the server:</p>
<p><strong><strong>vSphere -&gt; Home -&gt; Inventory -&gt; </strong>Summary -&gt; Resources -&gt; Datastore</strong>, right click,<strong> Browse Datastore&#8230;</strong></p>
<p>Click the <strong>Upload files to this datastore</strong> toolbar button, and upload either a file or folder as required.</p>
<p>If you upload old VMware Server 2 images using this method, you&#8217;ll likely run into the following error when you try to power up your guest machines:</p>
<pre><span style="color:#ff0000;">DevicePowerOn power on failed.</span>
<span style="color:#ff0000;">Unable to create virtual SCSI device for scsi0:0,</span>
<span style="color:#ff0000;">Failed to open disk scsi0:0: Unsupported or invalid disk type 7.</span>
<span style="color:#ff0000;">Make sure that the disk has been imported.</span></pre>
<p>So how do we copy VMs and get them to work? Instead of copying the images manually, head back over to VMware and download the <a href="http://www.vmware.com/products/converter/features.html">vCenter Converter</a>. Install and run this software (again free) and select <strong>Convert Machine</strong>.</p>
<ol>
<li>For the <strong>Source System</strong>, select <strong>VMWare Workstation or other VMware virtual machine</strong> &#8211; and select your .vmx file.</li>
<li>For the <strong>Destination System</strong>, select <strong>VMware Infrastructure</strong> and specify the IP address and credentials to connect to the ESXi box.</li>
<li>For the <strong>Destination Virtual Machine</strong>, specify the name for the machine, likely the same as the original guest, and  review <strong>Destination Location</strong>, <strong>Options</strong> and <strong>Summary</strong>.</li>
</ol>
<div>The copying will probably take some time, say in the order of 30 minutes for a 10GB machine to 3-4 hours for a 70GB one. Once the copy has completed, you could fire up the guest and hopefully it should come up. However, you&#8217;ll probably find that it has <span style="color:#000000;"><strong>no network access</strong>.</span></div>
<h2><span class="Apple-style-span" style="font-size:20px;">Enable networking</span></h2>
<div>Head back into vSphere, and enable VM Networking:</div>
<p><strong>vSphere -&gt; Home -&gt; Inventory -&gt; Configuration -&gt; Networking -&gt; Add Networking&#8230;</strong></p>
<ol>
<li>Under <strong>Connection Types</strong> &#8211; specify <strong>Virtual Machine</strong>, and click <strong>Next</strong>.</li>
<li>I&#8217;m dealing with internal development servers, so I&#8217;m not worrying about security here &#8211; you may need to. I simply chose the already configured <strong>vSwitch0</strong>, then clicked <strong>Next</strong>, specified a <strong>Network Label</strong> of <strong>VM Network</strong>, clicked <strong>Next</strong> again, and then <strong>Finish</strong>.</li>
<li>Stop your VM if necessary &#8211; configure to use the above created Network Connection (<em>VM Network</em>) by going to <strong>vSphere -&gt; Home -&gt; Inventory -&gt; &lt;Guest Machine Name&gt; -&gt; Summary  -&gt; Edit Settings</strong>, selecting <strong>Network Adaptor 1</strong>, and then specifying the <strong>VM Network </strong>network label created above under <strong>Network Connection -&gt; Network Label</strong>.</li>
<li>Click <strong>OK</strong> and restart your guest VM.</li>
</ol>
<p>Your guest machine should now start up, and be on the network!</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/leighspersistentthoughts.wordpress.com/99/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/leighspersistentthoughts.wordpress.com/99/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/leighspersistentthoughts.wordpress.com/99/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/leighspersistentthoughts.wordpress.com/99/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/leighspersistentthoughts.wordpress.com/99/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/leighspersistentthoughts.wordpress.com/99/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/leighspersistentthoughts.wordpress.com/99/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/leighspersistentthoughts.wordpress.com/99/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/leighspersistentthoughts.wordpress.com/99/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/leighspersistentthoughts.wordpress.com/99/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/leighspersistentthoughts.wordpress.com/99/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/leighspersistentthoughts.wordpress.com/99/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/leighspersistentthoughts.wordpress.com/99/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/leighspersistentthoughts.wordpress.com/99/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=leighspersistentthoughts.wordpress.com&amp;blog=46031&amp;post=99&amp;subd=leighspersistentthoughts&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://leighspersistentthoughts.wordpress.com/2011/08/25/moving-from-vmware-server-2-to-vmware-esxi-4-1-a-walkthrough/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/fa6992e7f674c4c356d2d1af347908a2?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">leighspersistentthoughts</media:title>
		</media:content>
	</item>
		<item>
		<title>Redmine sub project support</title>
		<link>http://leighspersistentthoughts.wordpress.com/2010/12/22/redmine-sub-project-support/</link>
		<comments>http://leighspersistentthoughts.wordpress.com/2010/12/22/redmine-sub-project-support/#comments</comments>
		<pubDate>Tue, 21 Dec 2010 23:32:46 +0000</pubDate>
		<dc:creator>Leigh's Persistent Thoughts</dc:creator>
				<category><![CDATA[Git]]></category>
		<category><![CDATA[Open Source]]></category>
		<category><![CDATA[Redmine]]></category>
		<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://leighspersistentthoughts.wordpress.com/?p=85</guid>
		<description><![CDATA[One of the things I really like about Redmine (and Git), compared to Trac and Subversion, is the out-of-the-box support for multiple projects.

The web interface in Redmine makes it pretty easy to bulk move issues to new projects, but one minor thing it doesn't seem to let me do through the web interface is move time entries that are not associated with an issue/task to a new project - to do this, you need to get under the hood... <a href="http://leighspersistentthoughts.wordpress.com/2010/12/22/redmine-sub-project-support/">Continue reading <span class="meta-nav">&#8594;</span></a><img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=leighspersistentthoughts.wordpress.com&amp;blog=46031&amp;post=85&amp;subd=leighspersistentthoughts&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>One of the things I really like about <a href="http://www.redmine.org">Redmine</a> (and <a href="http://git-scm.com">Git</a>), compared to <a href="http://trac.edgewall.org">Trac</a> and <a href="http://subversion.tigris.org">Subversion</a>, is the out-of-the-box support for multiple projects.</p>
<p>The web interface in Redmine makes it pretty easy to bulk move issues to new projects, as I was doing earlier today. Whilst it manages issues, relationships between issues, and time entries against issues, one minor thing it doesn&#8217;t seem to let me do through the web interface is move time entries that are not associated with an issue/task to a new project (for example, I have certain project management and deployment activities that are not related to a particular issue or task in Redmine).</p>
<p>In order to do this, I had to get into mysql. This is all some pretty basic SQL, but I thought I&#8217;d jot it down incase it&#8217;s of use to anyone.</p>
<p><strong>BACKUP!!!</strong></p>
<p>First, and it goes without saying, but I will anyway &#8211; take a backup!</p>
<pre>lhunt@vm-srv052:~$ rsync -a /var/www/redmine/files /backup
lhunt@vm-srv052:~$ /usr/bin/mysqldump -u redmine -predmine redmine &gt; /backup/db/redmine.sql</pre>
<p>Now, get a list of Projects:</p>
<pre>mysql&gt; select id, name, parent_id from projects;
+----+-----------------------+-----------+
| id | name                  | parent_id |
+----+-----------------------+-----------+
|  1 | Project X             |      NULL |
|  2 | Sub project 1         |         1 |
|  3 | Silverlight migration |         1 |
|  4 | Version 2             |         1 |
+----+-----------------------+-----------+
4 rows in set (0.00 sec)</pre>
<p>Then review all those entries without the correct sub-project associated to with them, in this case, everything still associated with the original parent project, Project X.</p>
<pre>mysql&gt; select id, project_id, spent_on, comments  from time_entries where project_id =1 ;
+-----+------------+------------+-----------------------------------------+
| id  | project_id | spent_on   | comments                                |
+-----+------------+------------+-----------------------------------------+
|  22 |          1 | 2010-10-29 | comments related to ticket...           |
|  27 |          1 | 2010-11-01 | Some more comments related to ticket... |
|  .. |         .. | .......... | ....................................... |
|  .. |         .. | .......... | ....................................... |
+-----+------------+------------+-----------------------------------------+</pre>
<p>In my case, I had a minority of entries that should now be associated with the new Silverlight migration sub-project I&#8217;m working on&#8230;.</p>
<p>You could do this by picking individual entries, or by searching the comments&#8230;</p>
<pre>mysql&gt; update time_entries set project_id = 3 where id in (102, 106, 109, 110);
Query OK, 4 rows affected (0.03 sec)
Rows matched: 4  Changed: 4  Warnings: 0

mysql&gt; update time_entries set project_id = 3 where comments like '%silverlight%';
Query OK, 5 rows affected (0.03 sec)
Rows matched: 9  Changed: 5  Warnings: 0</pre>
<p>And the rest should be associated with a new sub-project for a piece of stabilisation work&#8230;</p>
<pre>mysql&gt; update time_entries set project_id = 2 where project_id = 1;
Query OK, 38 rows affected (0.04 sec)
Rows matched: 38  Changed: 38  Warnings: 0</pre>
<p>Done!</p>
<p><strong>Update 24 Dec</strong></p>
<p>Err &#8211; I lied &#8211; it wasn&#8217;t completely done &#8211; I had some Documents that were referenced by Title rather than ID, which then failed to link across projects.</p>
<p>Quick fix:</p>
<pre>mysql&gt; select id, project_id, title from documents;
+----+------------+----------------+
| id | project_id | title          |
+----+------------+----------------+
|  1 |          1 | V1.3.3.3 ..... |
|  2 |          1 | Training Env.. |
|  3 |          1 | V1.3.3.4a .... |
|  4 |          1 | Flow diagram.. |
|  5 |          1 | 20101203...... |
|  6 |          1 | Training Env.. |
|  7 |          1 | V1 3 3 4b UAT..|
+----+------------+----------------+
7 rows in set (0.00 sec)</pre>
<p>All the documents needed to be moved to the Stabilisation project, so again a really simple bit of SQL&#8230;</p>
<pre>mysql&gt; update documents set project_id = 2;
Query OK, 7 rows affected (0.10 sec)
Rows matched: 7  Changed: 7  Warnings: 0
</pre>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/leighspersistentthoughts.wordpress.com/85/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/leighspersistentthoughts.wordpress.com/85/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/leighspersistentthoughts.wordpress.com/85/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/leighspersistentthoughts.wordpress.com/85/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/leighspersistentthoughts.wordpress.com/85/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/leighspersistentthoughts.wordpress.com/85/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/leighspersistentthoughts.wordpress.com/85/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/leighspersistentthoughts.wordpress.com/85/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/leighspersistentthoughts.wordpress.com/85/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/leighspersistentthoughts.wordpress.com/85/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/leighspersistentthoughts.wordpress.com/85/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/leighspersistentthoughts.wordpress.com/85/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/leighspersistentthoughts.wordpress.com/85/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/leighspersistentthoughts.wordpress.com/85/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=leighspersistentthoughts.wordpress.com&amp;blog=46031&amp;post=85&amp;subd=leighspersistentthoughts&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://leighspersistentthoughts.wordpress.com/2010/12/22/redmine-sub-project-support/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/fa6992e7f674c4c356d2d1af347908a2?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">leighspersistentthoughts</media:title>
		</media:content>
	</item>
		<item>
		<title>Installing a headless GeoServer on Ubuntu 10.4 on Amazon Web Services &#8211; part 1</title>
		<link>http://leighspersistentthoughts.wordpress.com/2010/06/17/installing-a-headless-geoserver-on-ubuntu-10-4-on-amazon-web-services/</link>
		<comments>http://leighspersistentthoughts.wordpress.com/2010/06/17/installing-a-headless-geoserver-on-ubuntu-10-4-on-amazon-web-services/#comments</comments>
		<pubDate>Wed, 16 Jun 2010 23:16:26 +0000</pubDate>
		<dc:creator>Leigh's Persistent Thoughts</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[AWS]]></category>
		<category><![CDATA[GeoServer]]></category>
		<category><![CDATA[GIS]]></category>
		<category><![CDATA[HowTo]]></category>
		<category><![CDATA[Open Source]]></category>
		<category><![CDATA[Ubuntu]]></category>

		<guid isPermaLink="false">http://leighspersistentthoughts.wordpress.com/?p=20</guid>
		<description><![CDATA[There are a few good articles out there documenting how to get a headless GeoServer box up, and some great documentation out there for Ubuntu on AWS, but nothing covered exactly what I was trying to do in one place, &#8230; <a href="http://leighspersistentthoughts.wordpress.com/2010/06/17/installing-a-headless-geoserver-on-ubuntu-10-4-on-amazon-web-services/">Continue reading <span class="meta-nav">&#8594;</span></a><img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=leighspersistentthoughts.wordpress.com&amp;blog=46031&amp;post=20&amp;subd=leighspersistentthoughts&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>There are a few good articles out there documenting how to get a headless GeoServer box up, and some great documentation out there for Ubuntu on AWS, but nothing covered exactly what I was trying to do in one place, so I thought I&#8217;d document the steps necessary to get GeoServer running on Ubuntu 10.4 (Lucid Lynx) hosted on Amazon Web Services.</p>
<p><strong>N.B.</strong> At the end of this you should have an Amazon Machine Instance running GeoServer suitable for playing around with. What you will <em><strong>not </strong></em>have is a strongly secured performance optimised GeoServer box &#8211; hopefully that will be covered in a following post.</p>
<p>This post also assumes you already have an Amazon Web Services account.</p>
<h3>Creating our instance</h3>
<p>I&#8217;ve tried doing this setup with the default Fedora AMIs from Amazon, but I haven&#8217;t used Redhat in a few years, and I&#8217;m more familiar with Ubuntu, so the first step is to get a trusted Ubuntu instance to start from.</p>
<p>First step &#8211; grab an AMI with Ubuntu 10.4 &#8211; Ubuntu&#8217;s <a href="http://www.ubuntu.com/cloud/public/deploy">Public Cloud Deployment documentation</a> lists the <a href="http://uec-images.ubuntu.com/releases/lucid/release/">Amazon EC2 published AMI&#8217;s</a> &#8211; I&#8217;ll be using the 32bit EBS image on the US West Coast (<tt><a href="http://developer.amazonwebservices.com/connect/entry.jspa?externalID=3102"><tt>ami-cb97c68e</tt></a>)</tt>, as I&#8217;m just wanting a small instance (the 64bit are larger, and cost more), I may want to be able to stop the instance without loosing it completely, and as I&#8217;m in New Zealand, I suspect the US West Coast will have lower latency than Singapore.</p>
<p>So, let&#8217;s create our Instance. Head over to Amazon Web Services <a href="https://console.aws.amazon.com/ec2/home?region=us-west-1#c=EC2&amp;s=Home">EC2 Console Dashboard</a>, and click <strong>Launch Instance</strong>.</p>
<ul>
<li>In the <strong>Choose an AMI</strong> tab, click <strong>Community AMIs</strong>, and enter <tt>ami-cb97c68e</tt> in the text box next to Viewing / All Images.</li>
<li>Press <strong>Enter</strong>, and the Ubuntu AMI <tt>ami-cb97c68e</tt> should be listed. Click <strong>Select</strong>.</li>
<li>The <strong>Instance Details</strong> tab appears, you can leave the defaults selected here. Click <strong>Continue</strong>.</li>
<li>Under <strong>Advanced Instance Options</strong>,  you may want to click <strong>Enable CloudWatch Monitoring for this instance</strong>, though note that this costs extra &#8211; you can leave this unchecked and add it later if you wish. Click <strong>Continue</strong>.</li>
<li>In the <strong>Create Key Pair</strong> tab, either select a preexisting key pair, or create a new pair. I&#8217;ll creating a new key pair called <em>geoserver</em> &#8211; enter <tt>geoserver</tt> in the <strong>name for keypair</strong> text box and click <strong>Create and Download your Key Pair</strong>. Save the <tt>.pem</tt> file to somewhere safe.</li>
<li>In the <strong>Configure Firewall</strong> tab, as we&#8217;ll be running GeoServer on top of Tomcat on port 8080, we&#8217;ll select <strong>Create a new Security Group</strong>. Name the Group, and add the following ports: HTTP (TCP, 80), and SSH (TCP, 22). We&#8217;ll also need to add Tomcat (TCP, 8080), but we&#8217;ll need to set this up as a custom rule later on.</li>
<li> Click <strong>Continue</strong>, and we&#8217;ll be at the <strong>Review</strong> tab. Check everything looks OK, and click <strong>Launch</strong>. You can now click <strong>Close</strong>, and click on the <strong>x Security Group(s)</strong> link under <strong>My resources</strong>.</li>
<li>Select the <strong>GeoServer</strong> security group we created earlier, and add the Tomcat rule (Connection Method: <tt>Custom</tt>, Protocol: <tt>TCP</tt>, From Port: <tt>8080</tt>, To Port: <tt>8080</tt>, Source (IP or Group): <tt>0.0.0.0/0</tt>). Click <strong>Save</strong>.</li>
</ul>
<p>Within a few minutes, the machine should be up and running on the web. Now we need to connect to it and do some installation.First we need to get the public DNS address of the machine:</p>
<ul>
<li> Go back to the <strong>EC2 Console Dashboard</strong>, and click on the <strong>x Running Instance(s)</strong> link under <strong>My Resources</strong>.</li>
<li>Right-click your new instance, and select <strong>Connect</strong>.</li>
<li>In the popup that appears, the public DNS will be listed &#8211; something like <tt>ec2-184-72-xx-xx.us-west-1.compute.amazonaws.com</tt>.</li>
</ul>
<p>Depending on what platform you are using locally, there are two ways to connect. (Well, actually there are loads, but I&#8217;ll focus on Windows and Ubuntu).</p>
<h3>Connecting from an Ubuntu Linux box</h3>
<ul>
<li>Locate your private key file, <code>geoserver.pem</code></li>
<li>Use <code>chmod</code> to make sure your key file isn&#8217;t  publicly viewable, ssh won&#8217;t work otherwise:<code><br />
chmod 400 geoserver.pem</code></li>
<li>Connect to your instance using instance&#8217;s  public DNS.<br />
<tt>ssh -i geoserver.pem ubuntu@ec2-</tt><tt>184-72-xx-xx</tt><tt>.us-west-1.compute.amazonaws.com</tt></li>
<li>Answer <strong>yes </strong>when warned about authenticity of the host and asked if you want to continue connecting.</li>
<li>You should see something like this:</li>
</ul>
<blockquote><p><tt>leigh@deep-thought:~$ ssh -i geoserver.pem ubuntu@ec2-<tt>184-72-xx-xx</tt>.us-west-1.compute.amazonaws.com<br />
The authenticity of host 'ec2-<tt>184-72-xx-xx</tt>.us-west-1.compute.amazonaws.com (184.72.xx.xx)' can't be established.<br />
RSA key fingerprint is f5:f5:0c:2e:77:9f:6a:82:3a:33:8c:99:5a:65:e2:09.<br />
Are you sure you want to continue connecting (yes/no)? yes<br />
Warning: Permanently added 'ec2-<tt>184-72-xx-xx</tt>.us-west-1.compute.amazonaws.com,184.72.xx.xx' (RSA) to the list of known hosts.<br />
Linux ip-10-160-43-6 2.6.32-305-ec2 #9-Ubuntu SMP Thu Apr 15 04:14:01 UTC 2010 i686 GNU/Linux<br />
Ubuntu 10.04 LTS</tt></p>
<p><tt>Welcome to Ubuntu!<br />
* Documentation:  https://help.ubuntu.com/</tt></p>
<p><tt> System information as of Wed Jun 16 21:59:44 UTC 2010</tt></p>
<p><tt> System load: 0.06              Memory usage: 2%   Processes:       54<br />
Usage of /:  4.6% of 14.76GB   Swap usage:   0%   Users logged in: 0</tt></p>
<p><tt> Graph this data and manage this system at https://landscape.canonical.com/<br />
---------------------------------------------------------------------<br />
At the moment, only the core of the system is installed. To tune the<br />
system to your needs, you can choose to install one or more<br />
predefined collections of software by running the following<br />
command:</tt></p>
<p><tt> sudo tasksel --section server<br />
---------------------------------------------------------------------</tt></p>
<p><tt>0 packages can be updated.<br />
0 updates are security updates.</tt></p>
<p><tt>The programs included with the Ubuntu system are free software;<br />
the exact distribution terms for each program are described in the<br />
individual files in /usr/share/doc/*/copyright.</tt></p>
<p><tt>Ubuntu comes with ABSOLUTELY NO WARRANTY, to the extent permitted by<br />
applicable law.</tt></p>
<p><tt>To run a command as administrator (user "root"), use "sudo ".<br />
See "man sudo_root" for details.</tt></p>
<p><tt>ubuntu@ip-10-160-43-6:~$</tt></p></blockquote>
<h3>Connecting from a Windows box using PuTTY.</h3>
<ul>
<li><a href="http://www.chiark.greenend.org.uk/~sgtatham/putty/">PuTTY</a> doesn&#8217;t use <tt>.pem</tt> files for authentication &#8211; instead we need to create a PuTTY private key file (<tt>.ppk</tt>) using the PuTTY Key Generator (PuTTYgen). A guide to doing this can be found <a href="http://clouddb.info/2009/05/17/a-quick-overview-of-putty-and-ssh-for-aws-newbies/">here</a>, but the steps required are.
<ul>
<li>Download and run <a href="http://the.earth.li/%7Esgtatham/putty/latest/x86/puttygen.exe">puttygen.exe</a> from the PuTTY <a href="http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html">download page</a>.</li>
<li>Click <strong>Conversions-&gt;Import Key Pair</strong>, and select your <tt>.pem</tt> file. Click Save private key. You can password protect it at this point if you like, however in my humble opinion, you probably don&#8217;t need to if you treat this file with the same care as you would the <tt>.pem</tt> file. We&#8217;ll save the file as <tt>geoserver.ppk</tt>.</li>
</ul>
</li>
<li>Fire up PuTTY, and enter the public DNS in the <strong>(Host Name or IP address)</strong> text box.</li>
<li>In the Category tree, select <strong>Connection-&gt;SSH-&gt;Auth</strong>, and <strong>Browse </strong>for the <strong>Private key for authentication</strong>, selecting our newly created<tt>.ppk</tt> file.</li>
<li>Go back to the <strong>Session</strong> category and save this session if you like, and then click <strong>Open</strong>.</li>
<li>Click <strong>Yes</strong> when warned about verifying the identity of the server, asked if you want to continue connecting.</li>
<li>Login as the user <tt>ubuntu</tt>.</li>
<li>You should see something like the following:</li>
</ul>
<blockquote><p><tt>login as: ubuntu<br />
Authenticating with public key "imported-openssh-key"<br />
Linux ip-10-160-43-6 2.6.32-305-ec2 #9-Ubuntu SMP Thu Apr 15 04:14:01 UTC 2010 i686 GNU/Linux<br />
Ubuntu 10.04 LTS</tt></p>
<p><tt>Welcome to Ubuntu!<br />
* Documentation:  https://help.ubuntu.com/</tt></p>
<p><tt> System information as of Wed Jun 16 22:32:12 UTC 2010</tt></p>
<p><tt> System load: 0.99              Memory usage: 2%   Processes:       56<br />
Usage of /:  4.6% of 14.76GB   Swap usage:   0%   Users logged in: 1</tt></p>
<p><tt> Graph this data and manage this system at https://landscape.canonical.com/<br />
---------------------------------------------------------------------<br />
At the moment, only the core of the system is installed. To tune the<br />
system to your needs, you can choose to install one or more<br />
predefined collections of software by running the following<br />
command:</tt></p>
<p><tt> sudo tasksel --section server<br />
---------------------------------------------------------------------</tt></p>
<p><tt>0 packages can be updated.<br />
0 updates are security updates.</tt></p>
<p><tt>Last login: Wed Jun 16 21:59:45 2010 from xx-xx-xx-xx.dsl.sta.inspire.net.nz<br />
To run a command as administrator (user "root"), use "sudo ".<br />
See "man sudo_root" for details.</tt></p>
<p><tt>ubuntu@ip-10-160-43-6:~$</tt></p></blockquote>
<h3>Installing necessary packages</h3>
<p>We&#8217;ve now got a vanilla Ubuntu instance running, and we&#8217;re connected. Now let&#8217;s install the packages necessary to get GeoServer up and running.</p>
<ul>
<li>From the terminal, execute the following:</li>
</ul>
<ul>
<li><tt>sudo apt-get install unzip lynx tomcat6 tomcat6-admin</tt></li>
</ul>
<ul>
<li><tt>sudo vim /etc/default/tomcat6</tt><br />
Find, uncomment and modify the following lines:</li>
</ul>
<blockquote><p><tt>JAVA_OPTS="-Djava.awt.headless=true -Xmx<em><strong>512</strong></em>m"<br />
TOMCAT6_SECURITY=no</tt></p></blockquote>
<ul>
<li><tt>sudo vim /var/lib/tomcat6/conf/tomcat-users.xml<br />
</tt>Modify to contain the following, substituting your own super strong password. Be sure to remove any comment block surrounding the <tt>&lt;tomcat-users&gt;</tt> section if one exists. <em>(Thanks to jvangeld)</em></li>
</ul>
<blockquote><p><tt>&lt;tomcat-users&gt;<br />
&lt;role rolename="admin"/&gt;<br />
&lt;role rolename="manager"/&gt;<br />
&lt;role rolename="tomcat"/&gt;<br />
&lt;user username="<em><strong>tomcat6</strong></em>" password="<em><strong>some super strong password</strong></em>" roles="admin,manager,tomcat"/&gt;<br />
&lt;/tomcat-users&gt;</tt></p></blockquote>
<ul>
<li><tt>sudo /etc/init.d/tomcat6 restart</tt></li>
<li>We&#8217;re now ready to login to Tomcat&#8217;s administration interface and install GeoServer.</li>
<li>Download the Web Archive from GeoServer&#8217;s <a href="http://geoserver.org/display/GEOS/Stable">Stable download page</a>.</li>
<li>Unzip the downloaded <tt>.war.zip</tt> file.</li>
<li>Browse to your new instance&#8217;s tomcat administration interface, e.g. http://ec2-184-72-xx-xx.us-west-1.compute.amazonaws.com:8080/manager/html</li>
<li>Log in using the <tt>tomcat6</tt> and <tt>some super strong password</tt> username and password combination specified earlier.</li>
<li>Under <strong>WAR file to deploy</strong>, upload the unzipped <tt>geoserver.war</tt> file you have just downloaded, and click <strong>Deploy</strong>.
<ul>
<li>This file is about 40-50MB in size, so this step can take a while depending on your connection speed. You&#8217;re waiting to see both the message <strong>OK</strong> in the top of the window, and <strong>/geoserver</strong> being listed under the <strong>Applications</strong> list on the <strong>Tomcat Web Application Manager</strong>.</li>
</ul>
</li>
<li>Browse to your GeoServer instance, e.g. http://ec2-184-72-xx-xx.us-west-1.compute.amazonaws.com:8080/geoserver/web/</li>
<li>To check things are OK, lets do a sanity check by clicking on <strong>Layer Preview</strong> link in the left hand pane.</li>
<li> At the bottom of the list of configured layers, there are some entries named <strong>tasmania</strong>, <strong>spearfish</strong> and <strong>tiger-ny</strong>, next to which are some <strong>OpenLayers</strong> links. Click the <strong>spearfish</strong> link, and you should get a simple OpenLayers interface showing some test data.</li>
<li>Click on the <strong>tiger-ny OpenLayers</strong> link, and you should get a simple map of New York&#8230;
<ul>
<li>&#8230;except you won&#8217;t &#8211; you&#8217;ll get a bunch of blank image tiles in an empty map. This threw me for a bit, so I had to delve into the GeoServer error log. You can skip to the solution below, but if you want to see where some of the error information is logged, see the steps below.
<ul>
<li>Open up a terminal session to the server if necessary, and type the following:<br />
<blockquote><p><tt>vim /var/log/tomcat6/catalina.out</tt></p></blockquote>
<p>You should see, near the bottom of the log file, some telltale entries like the following:</p>
<blockquote><p><tt>16 Jun 23:29:42 ERROR [geoserver.ows] -<br />
org.vfny.geoserver.wms.WmsException: org.vfny.geoserver.wms.WmsException: <strong>Rendering process failed</strong><br />
at org.vfny.geoserver.wms.responses.GetMapResponse.execute(GetMapResponse.java:447)<br />
...<br />
...<br />
Caused by: java.lang.Error: <strong>Probable fatal error:No fonts found.</strong><br />
at sun.font.FontManager.getDefaultPhysicalFont(FontManager.java:1088)<br />
at sun.font.FontManager.initialiseDeferredFont(FontManager.java:960)</tt></p></blockquote>
</li>
<li><a href="http://www.google.co.nz/search?hl=en&amp;client=firefox-a&amp;hs=HcN&amp;rls=org.mozilla%3Aen-GB%3Aofficial&amp;q=%22Probable+fatal+error%3ANo+fonts+found%22+tomcat&amp;aq=f&amp;aqi=&amp;aql=&amp;oq=&amp;gs_rfai=">Google</a> came to the <a href="http://wiki.hudson-ci.org/display/HUDSON/Hudson+got+java.awt.headless+problem">rescue</a> &#8211; this being a headless server, it has no fonts installed.</li>
<li>In order to find out what fonts Java is expecting, type the following:<br />
<blockquote><p><tt>vim /etc/java-6-openjdk/fontconfig.properties</tt></p></blockquote>
</li>
<li>This yields the following line amongst others:<br />
<blockquote><p><tt>serif.plain.latin-1=DejaVu Serif</tt></p></blockquote>
</li>
</ul>
</li>
<li>To install the missing DejaVu font:<br />
<blockquote><p><tt>sudo apt-get install ttf-dejavu<br />
sudo /etc/init.d/tomcat6 restart</tt></p></blockquote>
</li>
<li>Try the New York map again, and you should get a map of Manhattan.</li>
</ul>
</li>
</ul>
<ul>
<li>Note that the maps being displayed are non-tiled, and generated every request. Click the small menu icon in the top left of the map to enable tiled mapping (taking advantage of local caching), and change the map canvas size.</li>
</ul>
<h3>Next steps</h3>
<p>I&#8217;ve kept this short so that it details the absolute minimum steps required to get GeoServer up and running on an AWS Ubuntu instance.</p>
<p>So the next few bits &#8211; I need to get working are:</p>
<ul>
<li>Getting some base map data &#8211; ideally I&#8217;d like to get this from <a href="http://www.openstreetmap.org/">OpenStreetMap</a>&#8216;s OSM <a href="http://wiki.openstreetmap.org/wiki/Export">export</a> facility, probably using <tt>osm2pgsgl</tt>. I haven&#8217;t got this working yet,  so in the meantime, I&#8217;ll probably download some Shapefiles from the great <a href="http://koordinates.com/">koordinates</a> repository, which has loads and loads of data, especially for New Zealand.</li>
<li>Running direct from PostGIS is going to be a better solution than from Shapefiles, and more manageable.</li>
<li>Then, I need to import some TFW raster files, probably using something like GDAL.</li>
<li>Making use of GeoWebCache to pre-render and cache map tiles on the server.</li>
<li>Last, but not least, securing and optimising the installation.</li>
</ul>
<p>Hopefully I will write up these steps in the coming weeks.</p>
<h3>Some other useful references:</h3>
<ul>
<li><a href="http://docs.geoserver.org/stable/en/user/">GeoServer documentation</a></li>
<li><a href="http://surveying-mapping-gis.blogspot.com/2009/08/building-headless-linux-geoserver-box.html">Building a Headless Linux GeoServer Box</a> by Dave Smith</li>
</ul>
<div id="_mcePaste" style="position:absolute;left:-10000px;top:2554px;width:1px;height:1px;overflow:hidden;">
<h2><a href="http://geoserver.org/display/GEOS/Welcome">Building a  Headless Linux GeoServer Box </a></h2>
</div>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/leighspersistentthoughts.wordpress.com/20/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/leighspersistentthoughts.wordpress.com/20/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/leighspersistentthoughts.wordpress.com/20/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/leighspersistentthoughts.wordpress.com/20/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/leighspersistentthoughts.wordpress.com/20/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/leighspersistentthoughts.wordpress.com/20/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/leighspersistentthoughts.wordpress.com/20/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/leighspersistentthoughts.wordpress.com/20/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/leighspersistentthoughts.wordpress.com/20/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/leighspersistentthoughts.wordpress.com/20/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/leighspersistentthoughts.wordpress.com/20/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/leighspersistentthoughts.wordpress.com/20/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/leighspersistentthoughts.wordpress.com/20/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/leighspersistentthoughts.wordpress.com/20/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=leighspersistentthoughts.wordpress.com&amp;blog=46031&amp;post=20&amp;subd=leighspersistentthoughts&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://leighspersistentthoughts.wordpress.com/2010/06/17/installing-a-headless-geoserver-on-ubuntu-10-4-on-amazon-web-services/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/fa6992e7f674c4c356d2d1af347908a2?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">leighspersistentthoughts</media:title>
		</media:content>
	</item>
	</channel>
</rss>
