<?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>BoPL &#187; Tips</title>
	<atom:link href="http://bopl.samharris.us/tag/tips/feed/" rel="self" type="application/rss+xml" />
	<link>http://bopl.samharris.us</link>
	<description>It's not all caviar and baby wipes, mate</description>
	<lastBuildDate>Fri, 04 Feb 2011 08:35:52 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	
		<item>
		<title>OpenSolaris 2008.11</title>
		<link>http://bopl.samharris.us/2008/11/opensolaris-200811/</link>
		<comments>http://bopl.samharris.us/2008/11/opensolaris-200811/#comments</comments>
		<pubDate>Mon, 10 Nov 2008 19:51:18 +0000</pubDate>
		<dc:creator>Paul</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[Apple]]></category>
		<category><![CDATA[Tech]]></category>
		<category><![CDATA[Tips]]></category>

		<guid isPermaLink="false">http://bopl.samharris.us/?p=1084</guid>
		<description><![CDATA[A while ago I posted on my adventures getting OpenSolaris networking to move from its natural state of notworking (see what I did there?) on a mac mini. Well today I installed the latest release candidate of 2008.11, the forthcoming update, and it went much more smoothly. You still have to install a driver (tip [...]]]></description>
				<content:encoded><![CDATA[<p>A while ago I posted on <a href="http://bopl.samharris.us/2008/06/solaris-nwam-and-static-ips/">my adventures getting OpenSolaris networking</a> to move from its natural state of notworking (see what I did there?) on a mac mini.  Well today I installed the latest release candidate of 2008.11, the forthcoming update, and it went much more smoothly.  You still have to <a href="http://bopl.samharris.us/2008/06/opensolaris-on-mac-mini/">install a driver</a> (tip &#8211; usb keys work fine for file transfers), but once done restarting networking worked first time.</p>
]]></content:encoded>
			<wfw:commentRss>http://bopl.samharris.us/2008/11/opensolaris-200811/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Solaris, NWAM and Static IPs</title>
		<link>http://bopl.samharris.us/2008/06/solaris-nwam-and-static-ips/</link>
		<comments>http://bopl.samharris.us/2008/06/solaris-nwam-and-static-ips/#comments</comments>
		<pubDate>Thu, 19 Jun 2008 13:55:20 +0000</pubDate>
		<dc:creator>Paul</dc:creator>
				<category><![CDATA[Tech]]></category>
		<category><![CDATA[Tips]]></category>
		<category><![CDATA[Work]]></category>

		<guid isPermaLink="false">http://bopl.samharris.us/?p=977</guid>
		<description><![CDATA[A new feature in OpenSolaris is NWAM, the NetWork Auto Magic, um, thingy. It&#8217;s a handy tool that automatically configures your network connection. Unfortunately it unhandily has no GUI at the moment, though one is in the works, so if it doesn&#8217;t work right first time you can quickly get lost in text files and [...]]]></description>
				<content:encoded><![CDATA[<p>A new feature in OpenSolaris is NWAM, the NetWork Auto Magic, um, thingy.  It&#8217;s a handy tool that automatically configures your network connection.  Unfortunately it unhandily has no GUI at the moment, though one is in the works, so if it doesn&#8217;t work right first time you can quickly get lost in text files and Google searches.  In my case I wanted it to do its normal magic, but to use a static IP address at all times.  Here&#8217;s how I did it:</p>
<p><code>svcs svc:/network/physical</code>  This should show that &#8216;nwam&#8217; is online and &#8216;default&#8217; is disabled.  If it doesn&#8217;t, off to Google with you!</p>
<p>Edit the file <code>/etc/nwam/llp</code> so that it says something like <code>yukonx0 static 192.168.1.50/24</code> &#8211; <code>yukonx0</code> is the name of your network adapter (mine is for a Mac Mini ethernet port), <code>192.168.1.50</code> is the IP you want to assign, and <code>/24</code> shows that your subnet mask is 255.255.255.0.  Your values will vary.</p>
<p>Edit the file <code>/etc/nsswitch.conf</code> and add dns to the hosts line, to give <code>hosts:  files dns</code>.</p>
<p>Now delete the default route entry (this may well not exist, but it&#8217;s safest to remove and recreate): <code>route delete default 192.168.1.1</code> (your default route may be different).  Then add the entry back in permanently: <code>route -p add default 192.168.1.1</code>.</p>
<p>Finally restart nwam with <code>svcadm restart svc:/network/physical:nwam</code> and wait for a moment.  It should tell you that it&#8217;s connected with IP 192.168.1.50 (or whatever you selected).  Once that&#8217;s done you should be able to connect to the Internet, and more importantly be able to reboot and have it still work.  Though it shouldn&#8217;t be necessary, if it&#8217;s not working immediately try rebooting.</p>
]]></content:encoded>
			<wfw:commentRss>http://bopl.samharris.us/2008/06/solaris-nwam-and-static-ips/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>OpenSolaris on Mac Mini</title>
		<link>http://bopl.samharris.us/2008/06/opensolaris-on-mac-mini/</link>
		<comments>http://bopl.samharris.us/2008/06/opensolaris-on-mac-mini/#comments</comments>
		<pubDate>Fri, 13 Jun 2008 11:04:17 +0000</pubDate>
		<dc:creator>Paul</dc:creator>
				<category><![CDATA[Apple]]></category>
		<category><![CDATA[Tech]]></category>
		<category><![CDATA[Tips]]></category>

		<guid isPermaLink="false">http://bopl.samharris.us/?p=975</guid>
		<description><![CDATA[First of all, don&#8217;t. Just don&#8217;t. But if you must, here&#8217;s the driver to get the ethernet port to work on a Mac Mini under OpenSolaris. You&#8217;re welcome.]]></description>
				<content:encoded><![CDATA[<p>First of all, don&#8217;t.  Just don&#8217;t.  But if you must, here&#8217;s the driver to <a href="http://www.sun.com/bigadmin/hcl/data/systems/details/3091.html">get the ethernet port to work on a Mac Mini under OpenSolaris</a>.  You&#8217;re welcome.</p>
]]></content:encoded>
			<wfw:commentRss>http://bopl.samharris.us/2008/06/opensolaris-on-mac-mini/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Load Balancing Tomcat on Leopard with mod_jk</title>
		<link>http://bopl.samharris.us/2008/05/load-balancing-tomcat-on-leopard-with-mod_jk/</link>
		<comments>http://bopl.samharris.us/2008/05/load-balancing-tomcat-on-leopard-with-mod_jk/#comments</comments>
		<pubDate>Wed, 28 May 2008 14:24:15 +0000</pubDate>
		<dc:creator>Paul</dc:creator>
				<category><![CDATA[Recommended]]></category>
		<category><![CDATA[Tech]]></category>
		<category><![CDATA[Tips]]></category>
		<category><![CDATA[Work]]></category>

		<guid isPermaLink="false">http://bopl.samharris.us/?p=967</guid>
		<description><![CDATA[I&#8217;ve just had to setup a test system that load balances a site running on Tomcat across multiple computers. My test bed is 3 mac minis, one working as the &#8216;head&#8217; running Apache, and the other two in the &#8216;farm&#8217; handling the load. It was a less than painless exercise, so I thought I&#8217;d write [...]]]></description>
				<content:encoded><![CDATA[<p>I&#8217;ve just had to setup a test system that load balances a site running on Tomcat across multiple computers.  My test bed is 3 mac minis, one working as the &#8216;head&#8217; running Apache, and the other two in the &#8216;farm&#8217; handling the load.  It was a less than painless exercise, so I thought I&#8217;d write up the instructions.</p>
<p><strong>1. Install Tomcat</strong><br />
Download Tomcat from <a href="http://tomcat.apache.org/download-60.cgi">here</a>.<br />
On each farm machine rename the folder to be Tomcat, then move it to the /Library/ directory.<br />
In Terminal:</p>
<p><code>cd /Library/Tomcat/bin<br />
rm *.bat<br />
rm *.exe<br />
chmod +x *</code></p>
<p>(You don&#8217;t need .bat or .exe files, but you do need other files to be executable).</p>
<p>Edit the file <code>/Library/Tomcat/conf/tomcat-users.xml</code> so that it reads:</p>
<p><code>
<pre>
&lt;?xml version=&#x27;1.0&#x27; encoding=&#x27;utf-8&#x27;?&gt;
&lt;tomcat-users&gt;
  &lt;role rolename=&quot;manager&quot;/&gt;
  &lt;user username=&quot;tomcat&quot; password=&quot;s3cret&quot; roles=&quot;manager&quot;/&gt;
&lt;/tomcat-users&gt;
</pre>
<p></code></p>
<p>(Note that the username and password are examples from Tomcat &#8211; you should probably change them).</p>
<p>Repeat the above for each farm machine.</p>
<p><strong>2. Deploy your application</strong><br />
Open each of your farm machines in turn from your browser, e.g.</p>
<p><code>http://farm1:8080/</code></p>
<p>You should see a screen that looks something like this:</p>
<div align=center>
<img src="http://bopl.samharris.us/wp/wp-content/uploads/2008/05/tomcat.png" alt="Welcome screen for a Tomcat installation" title="Tomcat" width="500" height="343"/></div>
<p>Click <em>Tomcat Manager</em> and enter the username and password you defined above.  This should show the <em>Tomcat Web Application Manager</em> screen.</p>
<p>Upload the war file of the application you want to run.  Once complete you should see a link on the manager page to your application.  Click it and make sure it works OK.</p>
<p>Repeat the above for each farm machine.</p>
<p><strong>3. Install mod_jk</strong><br />
Here&#8217;s the tricky bit.  Mod_jk is the apache module that handles the load balancing.  It&#8217;s available <a href="http://tomcat.apache.org/connectors-doc/">here</a>, BUT none of the downloads there will work on Leopard.  Apache on Leopard runs as 64 bit, which isn&#8217;t an option you can download from the Tomcat site.  So you have two options:</p>
<ul>
<li>Download the source code and build your own version.  This isn&#8217;t too hard if you have the relevant tools already installed &#8211; look <a href="http://blog.lo-fi.net/2007/10/leopard-for-web-developer-installing.html">here</a> for an excellent step-by-step on the changes you need to make to build a 64 bit version.</li>
<li>Use <a href="http://www.macports.org/">MacPorts</a></li>
<p>, which appears to have the facility to create a 64 bit version (I haven&#8217;t tested this).</p>
<li>Download the 64 bit version of <a href='http://bopl.samharris.us/wp/wp-content/uploads/2008/05/mod_jk.so'>mod_jk</a> 1.2.26 that I created.  I may update this as I go along, but no guarantees!</li>
</ul>
<p>Once you have your <code>mod_jk.so</code> file (if it doesn&#8217;t end up with that name, change the name) copy it to the <code>/usr/libexec/apache2/</code> directory of your head machine.  It&#8217;s worth changing the ownership and permissions of the file to match the other modules using the commands <code>sudo chown root:wheel mod_jk.so</code> and <code>sudo chmod 755 mod_jk.so</code>.</p>
<p><strong>4. Configure Apache</strong><br />
Edit the file <code>/etc/apache2/httpd.conf</code> and add the following lines:<br />
<code>
<pre>
#Added for Load Balancing
LoadModule jk_module libexec/apache2/mod_jk.so
# Path to workers.properties
JkWorkersFile /etc/apache2/workers.properties 

# Path to jk logs
JkLogFile /your-chosen-location/mod_jk.log

# Jk log level [debug/error/info]
JkLogLevel info

# Jk log format
JkLogStampFormat "[%a %b %d %H:%M:%S %Y] "

# JkOptions for forwarding
JkOptions +ForwardKeySize +ForwardURICompat -ForwardDirectories

# JkRequestLogFormat set the request format
JkRequestLogFormat "%w %V %T"

JkMount /your-application balancer
JkMount /your-application/* balancer
#End Added for Load Balancing
</pre>
<p></code></p>
<p>Note that you&#8217;ll need to set the location for your log file, and the name of your application.  It&#8217;s a good idea to create the log file (e.g. use <code>touch mod_jk.log</code> in the directory you want it; this makes sure the file can be created, which would otherwise trip Tomcat up.</p>
<p>Now create a new file <code>worker.properties</code> in <code>/etc/apache2</code> containing the following:</p>
<p><code>
<pre>workers.tomcat_home=/Library/Tomcat
workers.java_home=/System/Library/Frameworks/JavaVM.framework/Versions/Current

worker.list=balancer
worker.maintain=5

worker.farm1.port=8009
worker.farm1.host=farm1-IP-address
worker.farm1.type=ajp13
worker.farm1.lbfactor=1

worker.farm2.port=8009
worker.farm2.host=farm2-IP-address
worker.farm2.type=ajp13
worker.farm2.lbfactor=10

worker.balancer.type=lb
worker.balancer.balance_workers=farm1,farm2
worker.balancer.method=Request</pre>
<p></code></p>
<p>The <code>worker.maintain</code> setting helps determine how long one farm machine will be used before the load switches to another machine.  For testing I used 5 (seconds); the default is 60.</p>
<p><strong>5. Start Apache</strong><br />
Tomcat should still be running on each of the farm servers, so start Apache on your head machine by opening System Preferences&#8230;Sharing and checking the &#8216;Web Sharing&#8217; box (if it was already checked then uncheck and recheck it to restart Apache).</p>
<p><strong>6. Test it out</strong><br />
Browse to <code>http://head/your-application</code> &#8211; you should see your application!</p>
<p><strong>Credits</strong><br />
This post was based on the excellent work found <a href="http://thought-bytes.blogspot.com/2007/03/how-to-load-balance-tomcat-55-with.html">here</a></p>
]]></content:encoded>
			<wfw:commentRss>http://bopl.samharris.us/2008/05/load-balancing-tomcat-on-leopard-with-mod_jk/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>Relationships</title>
		<link>http://bopl.samharris.us/2008/03/relationships/</link>
		<comments>http://bopl.samharris.us/2008/03/relationships/#comments</comments>
		<pubDate>Wed, 05 Mar 2008 12:42:29 +0000</pubDate>
		<dc:creator>Paul</dc:creator>
				<category><![CDATA[Tips]]></category>

		<guid isPermaLink="false">http://bopl.samharris.us/2008/03/relationships/</guid>
		<description><![CDATA[Adive from &#8216;Stuff White People Like&#8216; on dealing with people who&#8217;ve just ended a relationship: It is imperative that you do not attempt to kick them out of their misery by saying things like “get over it,” “there are other people out there,” or “I don’t want to read your poem.” Read, as they say, [...]]]></description>
				<content:encoded><![CDATA[<p>Adive from &#8216;<a href="http://stuffwhitepeoplelike.wordpress.com/2008/02/18/70-difficult-breakups/">Stuff White People Like</a>&#8216; on dealing with people who&#8217;ve just ended a relationship:</p>
<blockquote><p>It is imperative that you do not attempt to kick them out of their misery by saying things like “get over it,” “there are other people out there,” or “I don’t want to read your poem.”</p></blockquote>
<p>Read, as they say, the whole thing.</p>
]]></content:encoded>
			<wfw:commentRss>http://bopl.samharris.us/2008/03/relationships/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Physio</title>
		<link>http://bopl.samharris.us/2008/02/physio/</link>
		<comments>http://bopl.samharris.us/2008/02/physio/#comments</comments>
		<pubDate>Thu, 21 Feb 2008 22:08:13 +0000</pubDate>
		<dc:creator>Paul</dc:creator>
				<category><![CDATA[Tips]]></category>

		<guid isPermaLink="false">http://bopl.samharris.us/2008/02/physio/</guid>
		<description><![CDATA[Top Tip: Never show weakness to a physio &#8211; as soon as they know something hurts they&#8217;ll be at it like a dog on a bone until you sign over your house.]]></description>
				<content:encoded><![CDATA[<p>Top Tip: Never show weakness to a physio &#8211; as soon as they know something hurts they&#8217;ll be at it like a dog on a bone until you sign over your house.</p>
]]></content:encoded>
			<wfw:commentRss>http://bopl.samharris.us/2008/02/physio/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Tech Roundup</title>
		<link>http://bopl.samharris.us/2008/02/tech-roundup/</link>
		<comments>http://bopl.samharris.us/2008/02/tech-roundup/#comments</comments>
		<pubDate>Wed, 13 Feb 2008 21:06:11 +0000</pubDate>
		<dc:creator>Paul</dc:creator>
				<category><![CDATA[Apple]]></category>
		<category><![CDATA[Tips]]></category>

		<guid isPermaLink="false">http://bopl.samharris.us/2008/02/tech-roundup/</guid>
		<description><![CDATA[I upgraded to 10.5.2 on my Mac yesterday, and found that screen sharing no longer worked when trying to control a 10.5.1 machine. So upgrade all your machines if you&#8217;re upgrading any, and as it&#8217;s almost a third of a gig in size it&#8217;s worth downloading the install if you have more than one machine. [...]]]></description>
				<content:encoded><![CDATA[<p>I upgraded to 10.5.2 on my Mac yesterday, and found that screen sharing no longer worked when trying to control a 10.5.1 machine.  So upgrade all your machines if you&#8217;re upgrading any, and as it&#8217;s almost a third of a gig in size it&#8217;s worth downloading the <a href="http://www.apple.com/support/downloads/">install</a> if you have more than one machine.</p>
<p><a href="http://en-us.www.mozilla.com/en-US/firefox/all-beta.html">Beta 3 of Firefox is out</a>, and seems to be working well on my Mac at least, so worth considering.</p>
<p>I&#8217;ve used <a href="http://10base-t.com/software/macintosh/dropcopy.html">DropCopy</a> in the past to move files between different machines, but iChat in Leopard (and maybe before, I don&#8217;t know) lets you move files between Bonjour users very easily.  Start up iChat on both machines, open the Bonjour users list, and you can move files the same as in a normal chat session, but faster.</p>
<p>Finally it appears that WordPress automatically backs up posts as you&#8217;re typing, so that if, for example, you accidentally pressed backspace outside of a text box, thereby moving back a page, you wouldn&#8217;t lose everything.  Hypothetically.</p>
]]></content:encoded>
			<wfw:commentRss>http://bopl.samharris.us/2008/02/tech-roundup/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Wear Sunscreen</title>
		<link>http://bopl.samharris.us/2008/01/wear-sunscreen/</link>
		<comments>http://bopl.samharris.us/2008/01/wear-sunscreen/#comments</comments>
		<pubDate>Tue, 29 Jan 2008 14:21:48 +0000</pubDate>
		<dc:creator>Paul</dc:creator>
				<category><![CDATA[Tips]]></category>

		<guid isPermaLink="false">http://bopl.samharris.us/2008/01/wear-sunscreen/</guid>
		<description><![CDATA[This just turned up on the radio, and it&#8217;s too great for me to keep to myself:]]></description>
				<content:encoded><![CDATA[<p>This just turned up on the radio, and it&#8217;s too great for me to keep to myself:</p>
<div align=center><object width="425" height="355"><param name="movie" value="http://www.youtube.com/v/sTJ7AzBIJoI&#038;rel=1"></param><param name="wmode" value="transparent"></param><embed src="http://www.youtube.com/v/sTJ7AzBIJoI&#038;rel=1" type="application/x-shockwave-flash" wmode="transparent" width="425" height="355"></embed></object></div>
]]></content:encoded>
			<wfw:commentRss>http://bopl.samharris.us/2008/01/wear-sunscreen/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Hello</title>
		<link>http://bopl.samharris.us/2007/09/hello/</link>
		<comments>http://bopl.samharris.us/2007/09/hello/#comments</comments>
		<pubDate>Thu, 20 Sep 2007 12:06:07 +0000</pubDate>
		<dc:creator>Paul</dc:creator>
				<category><![CDATA[Language]]></category>
		<category><![CDATA[Tips]]></category>

		<guid isPermaLink="false">http://bopl.samharris.us/2007/09/hello/</guid>
		<description><![CDATA[Having collected my boy from his new school a few times over the last fortnight, and overheard the conversations of various young mums, I offer the following language advice. &#8220;Hello&#8221; is pronounced with a short &#8216;o&#8217;, not a long &#8216;ooo&#8217;, and should at no point be pronounced in a sing-song tone. The Welsh can manage [...]]]></description>
				<content:encoded><![CDATA[<p>Having collected my boy from his new school a few times over the last fortnight, and overheard the conversations of various young mums, I offer the following language advice.  &#8220;Hello&#8221; is pronounced with a short &#8216;o&#8217;, not a long &#8216;ooo&#8217;, and should at no point be pronounced in a sing-song tone.  The Welsh can manage that, you can too.</p>
]]></content:encoded>
			<wfw:commentRss>http://bopl.samharris.us/2007/09/hello/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Chocolate</title>
		<link>http://bopl.samharris.us/2007/09/chocolate/</link>
		<comments>http://bopl.samharris.us/2007/09/chocolate/#comments</comments>
		<pubDate>Wed, 12 Sep 2007 12:08:33 +0000</pubDate>
		<dc:creator>Paul</dc:creator>
				<category><![CDATA[Tips]]></category>

		<guid isPermaLink="false">http://bopl.samharris.us/2007/09/chocolate/</guid>
		<description><![CDATA[Top Tip: If you drop a small, pellet-like piece of chocolate near a cage full of gerbils who like to flick their pellets of poo out of the cage, take a breath and let the chocolate go.]]></description>
				<content:encoded><![CDATA[<p>Top Tip: If you drop a small, pellet-like piece of chocolate near a cage full of gerbils who like to flick their pellets of poo out of the cage, take a breath and let the chocolate go.</p>
]]></content:encoded>
			<wfw:commentRss>http://bopl.samharris.us/2007/09/chocolate/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
