<?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>James R J Constable &#187; linux</title>
	<atom:link href="http://jamesconstable.co.uk/tag/linux/feed/" rel="self" type="application/rss+xml" />
	<link>http://jamesconstable.co.uk</link>
	<description></description>
	<lastBuildDate>Thu, 08 Jul 2010 16:16:15 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.1-alpha</generator>
		<item>
		<title>Installing Subversion 1.6.6 from source on Ubuntu 8.04</title>
		<link>http://jamesconstable.co.uk/linux/installing-subversion-1-6-6-from-source-on-ubuntu-8-04/</link>
		<comments>http://jamesconstable.co.uk/linux/installing-subversion-1-6-6-from-source-on-ubuntu-8-04/#comments</comments>
		<pubDate>Tue, 03 Nov 2009 13:55:44 +0000</pubDate>
		<dc:creator>James</dc:creator>
				<category><![CDATA[linux]]></category>
		<category><![CDATA[subversion]]></category>
		<category><![CDATA[svn]]></category>
		<category><![CDATA[ubuntu]]></category>

		<guid isPermaLink="false">http://jamesconstable.co.uk/?p=381</guid>
		<description><![CDATA[I&#8217;ve got a number of servers that are currently running the latest LTS release of Ubuntu, 8.04.  Unfortunately this release doesn&#8217;t have the latest version of subversion (1.6.6  at time of writing) available from apt and as the various clients that get used to access these working copies get updated, they stop working with the [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve got a number of servers that are currently running the latest LTS release of <a href="http://www.ubuntu.com/" onclick="javascript:pageTracker._trackPageview('/outbound/article/www.ubuntu.com');">Ubuntu</a>, 8.04.  Unfortunately this release doesn&#8217;t have the latest version of <a href="http://subversion.tigris.org/" onclick="javascript:pageTracker._trackPageview('/outbound/article/subversion.tigris.org');">subversion</a> (1.6.6  at time of writing) available from apt and as the various clients that get used to access these working copies get updated, they stop working with the command line version on the server (1.5.1).</p>
<p>I found installing from source a bit fiddly at first but after some research managed to get everything hooked up as required.</p>
<p>Start off by grabbing the latest version from the subversion site and untar/gzipping it</p>
<blockquote><p>wget http://subversion.tigris.org/downloads/subversion-1.6.6.tar.gz<br />
tar xf subversion-1.6.6.tar.gz</p></blockquote>
<p>There&#8217;s a few pre-requisites that need to be installed to compile subversion so if you&#8217;ve not already got them add these packages.</p>
<blockquote><p>sudo apt-get install libc6-dev g++ gcc<br />
sudo apt-get install libapr1 libapr1-dev libaprutil1 libaprutil1-dev libneon27 libneon27-dev</p></blockquote>
<p>Configure the compilation from within the newly uncompressed directory and declare where you want the binaries to be saved to</p>
<blockquote><p>./configure &#8211;prefix=/usr/bin/subversion-1.6.6 &#8211;disable-nls</p></blockquote>
<p>And  finally run the make process</p>
<blockquote><p>make<br />
sudo make install</p></blockquote>
<p>All being well you should have the latest version of subversion accessible from the directory you specified (in our case /usr/bin/subversion-1.6.6).  If you want this new version to precede the existing version so you don&#8217;t have to write in the full path each time.  Alter <em>/etc/environment </em>and add the path to the newly installed subversion to the start of the PATH variable. e.g.</p>
<blockquote><p>PATH=&#8221;/usr/bin/subversion-1.6.6/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games&#8221;</p></blockquote>
<p>Reload you environment file with</p>
<blockquote><p>source /etc/environment</p></blockquote>
<p>And type <em>svn &ndash;&ndash;version</em> to check that you do indeed have SVN 1.6.6 installed</p>
<blockquote><p>
svn, version 1.6.6 (r40053)<br />
compiled Nov  3 2009, 12:19:16<br />
Copyright (C) 2000-2009 CollabNet.<br />
Subversion is open source software, see http://subversion.tigris.org/<br />
This product includes software developed by CollabNet (http://www.Collab.Net/).<br />
svn, version 1.6.6 (r40053)   compiled Nov  3 2009, 12:19:16<br />
Copyright (C) 2000-2009 CollabNet.Subversion is open source software, see http://subversion.tigris.org/This product includes software developed by CollabNet (http://www.Collab.Net/).</p>
</blockquote>
]]></content:encoded>
			<wfw:commentRss>http://jamesconstable.co.uk/linux/installing-subversion-1-6-6-from-source-on-ubuntu-8-04/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
		<item>
		<title>Count the Number of Files in a Directory in Linux</title>
		<link>http://jamesconstable.co.uk/linux/count-the-number-of-files-in-a-directory-in-linux/</link>
		<comments>http://jamesconstable.co.uk/linux/count-the-number-of-files-in-a-directory-in-linux/#comments</comments>
		<pubDate>Fri, 15 May 2009 11:23:39 +0000</pubDate>
		<dc:creator>James</dc:creator>
				<category><![CDATA[linux]]></category>

		<guid isPermaLink="false">http://jamesconstable.co.uk/?p=331</guid>
		<description><![CDATA[Again, part of the &#8216;need to write this down somewhere cos i&#8217;ll need it at some point in the future&#8217; series &#8211; counting the number of files in a directory in Linux. ls -1 &#124; wc -l]]></description>
			<content:encoded><![CDATA[<p>Again, part of the &#8216;need to write this down somewhere cos i&#8217;ll need it at some point in the future&#8217; series &#8211; counting the number of files in a directory in Linux.</p>
<blockquote>
<pre>ls -1 | wc -l</pre>
</blockquote>
]]></content:encoded>
			<wfw:commentRss>http://jamesconstable.co.uk/linux/count-the-number-of-files-in-a-directory-in-linux/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Batch Processing Images in Ubuntu with Image Magick</title>
		<link>http://jamesconstable.co.uk/linux/batch-processing-images-in-ubuntu-with-image-magick/</link>
		<comments>http://jamesconstable.co.uk/linux/batch-processing-images-in-ubuntu-with-image-magick/#comments</comments>
		<pubDate>Fri, 15 May 2009 08:55:57 +0000</pubDate>
		<dc:creator>James</dc:creator>
				<category><![CDATA[linux]]></category>
		<category><![CDATA[convert]]></category>
		<category><![CDATA[imagemagick]]></category>

		<guid isPermaLink="false">http://jamesconstable.co.uk/?p=328</guid>
		<description><![CDATA[The main point of this blog post is so that I have a resource next time I need to do this job. I&#8217;ve recently been presented with thousands of images that need to be converted to different sizes and didn&#8217;t really want to go to the hassle of installing some 3rd party utility or writing [...]]]></description>
			<content:encoded><![CDATA[<p>The main point of this blog post is so that I have a resource next time I need to do this job.  I&#8217;ve recently been presented with thousands of images that need to be converted to different sizes and didn&#8217;t really want to go to the hassle of installing some 3rd party utility or writing a script.</p>
<blockquote>
<pre>ls *.png | xargs -I {} convert -thumbnail 200 {} thumb.{}</pre>
</blockquote>
<p>You can add whatever arguments are required to the convert command.  In this case i&#8217;ve specifed a thumbnail with a width of 200px.  The brackets {} represent the file you&#8217;re operating on so in the example above the new image has thumb. prepended to the filename.</p>
]]></content:encoded>
			<wfw:commentRss>http://jamesconstable.co.uk/linux/batch-processing-images-in-ubuntu-with-image-magick/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Installing Railo 3 on Tomcat 6 via Apache 2 on Ubuntu 8.04</title>
		<link>http://jamesconstable.co.uk/web-development/installing-railo-3-on-tomcat-6-via-apache-2-on-ubuntu-804/</link>
		<comments>http://jamesconstable.co.uk/web-development/installing-railo-3-on-tomcat-6-via-apache-2-on-ubuntu-804/#comments</comments>
		<pubDate>Thu, 22 Jan 2009 15:13:04 +0000</pubDate>
		<dc:creator>James</dc:creator>
				<category><![CDATA[Web Development]]></category>
		<category><![CDATA[apache]]></category>
		<category><![CDATA[cfml]]></category>
		<category><![CDATA[coldfusion]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[mod_jk]]></category>
		<category><![CDATA[railo]]></category>
		<category><![CDATA[tomcat]]></category>
		<category><![CDATA[ubuntu]]></category>

		<guid isPermaLink="false">http://www.jamesconstable.co.uk/?p=245</guid>
		<description><![CDATA[Well that headline is a bit of a mouthful, but i figured if this was something I was attempting to do then there was a good chance that others were attempting the same thing &#8211; and what I really could have done with is a guide. So here&#8217;s that guide. First of all I started [...]]]></description>
			<content:encoded><![CDATA[<p>Well that headline is a bit of a mouthful, but i figured if this was something I was attempting to do then there was a good chance that others were attempting the same thing &#8211; and what I really could have done with is a guide.  So here&#8217;s that guide.</p>
<p>First of all I started with a default install of <a href="http://www.ubuntu.com/" onclick="javascript:pageTracker._trackPageview('/outbound/article/www.ubuntu.com');">Ubuntu</a> Server 8.04, the latest LTS release.  There&#8217;s no reason why this shouldn&#8217;t work on 8.10 though.</p>
<h3>Setting Up Tomcat 6</h3>
<p>First things first, install <a href="http://java.sun.com/" onclick="javascript:pageTracker._trackPageview('/outbound/article/java.sun.com');">Java</a>.</p>
<blockquote>
<pre>sudo apt-get install sun-java6-jdk</pre>
</blockquote>
<p>That should all without a hitch and the next step is to get <a href="http://tomcat.apache.org/" onclick="javascript:pageTracker._trackPageview('/outbound/article/tomcat.apache.org');">Tomcat</a> installed.  The version available through is apt is version 5.5 and I wanted to use the latest release so after logging in to the server download the latest (6.0.18 at this time) by executing</p>
<blockquote>
<pre>wget http://apache.hoxt.com/tomcat/tomcat-6/v6.0.18/bin/apache-tomcat-6.0.18.tar.gz
tar xvzf apache-tomcat-6.0.18.tar.gz</pre>
</blockquote>
<p>Next we need to move Tomcat somewhere permanent.</p>
<blockquote>
<pre>sudo mv apache-tomcat-6.0.18 /usr/local/tomcat</pre>
</blockquote>
<p>The next thing to do is set Tomcat to automatically start when the server starts (plus the script makes it easier to start and stop Tomcat). Start up your editor of choice.</p>
<blockquote>
<pre>sudo nano /etc/init.d/tomcat</pre>
</blockquote>
<p>And paste in the following script (which I got originally from <a href="http://www.howtogeek.com/howto/linux/installing-tomcat-6-on-ubuntu/" onclick="javascript:pageTracker._trackPageview('/outbound/article/www.howtogeek.com');" target="_blank">HowToGeek.com)</a></p>
<blockquote>
<pre># Tomcat auto-start
#
# description: Auto-starts tomcat
# processname: tomcat
# pidfile: /var/run/tomcat.pid

export JAVA_HOME=/usr/lib/jvm/java-6-sun

case $1 in
start)
        sh /usr/local/tomcat/bin/startup.sh
        ;; 
stop)   
        sh /usr/local/tomcat/bin/shutdown.sh
        ;; 
restart)
        sh /usr/local/tomcat/bin/shutdown.sh
        sh /usr/local/tomcat/bin/startup.sh
        ;; 
esac    
exit 0</pre>
</blockquote>
<p>The script also need to be made executable and hooked up to the startup folders.</p>
<blockquote>
<pre>sudo chmod 755 /etc/init.d/tomcat
sudo nano /etc/init.d/tomcat
sudo ln -s /etc/init.d/tomcat /etc/rc1.d/K99tomcat
sudo ln -s /etc/init.d/tomcat /etc/rc2.d/S99tomcat</pre>
</blockquote>
<p>Tomcat should now be up and running!</p>
<h3>Railo</h3>
<p>To install <a href="http://www.railo-technologies.com" onclick="javascript:pageTracker._trackPageview('/outbound/article/www.railo-technologies.com');">Railo</a> we first need to get the <a href="http://www.railo-technologies.com/en/index.cfm?treeID=224" onclick="javascript:pageTracker._trackPageview('/outbound/article/www.railo-technologies.com');">Railo custom version</a> and copy all of the files into the Tomcat lib directory.</p>
<blockquote>
<pre>wget http://www.railo-technologies.com/railo/remote/download/3.0.1.000/custom/all/railo-3.0.1.000-jars.tar.gz</pre>
<pre>tar zxvf railo-3.0.1.000-jars.tar.gz</pre>
<pre>sudo mv railo-3.0.1.000-jars/* /usr/local/tomcat/lib</pre>
</blockquote>
<p>The next step is to get Railo and Tomcat working together.  I&#8217;ve assumed that you&#8217;re only using Tomcat for CFML processing so these instructions only cover installing Railo on a server wide basis rather than being site specific.</p>
<p>Open up the web config file</p>
<blockquote>
<pre>sudo nano /usr/local/tomcat/conf/web.xml</pre>
</blockquote>
<p>and append the following inside the &lt;web-app&gt; element.</p>
<blockquote>
<pre>&lt;servlet&gt;
&lt;servlet-name&gt;CFMLServlet&lt;/servlet-name&gt;
&lt;servlet-class&gt;railo.loader.servlet.CFMLServlet&lt;/servlet-class&gt;
   &lt;init-param&gt;
      &lt;param-name&gt;configuration&lt;/param-name&gt;
      &lt;param-value&gt;{web-root-directory}/WEB-INF/railo/&lt;/param-value&gt;
      &lt;description&gt;Configuraton directory&lt;/description&gt;
   &lt;/init-param&gt;
   &lt;load-on-startup&gt;1&lt;/load-on-startup&gt;
&lt;/servlet&gt;
&lt;servlet-mapping&gt;
   &lt;servlet-name&gt;CFMLServlet&lt;/servlet-name&gt;
   &lt;url-pattern&gt;*.cfm&lt;/url-pattern&gt;
&lt;/servlet-mapping&gt;
&lt;servlet-mapping&gt;
   &lt;servlet-name&gt;CFMLServlet&lt;/servlet-name&gt;
   &lt;url-pattern&gt;*.cfml&lt;/url-pattern&gt;
&lt;/servlet-mapping&gt;
&lt;servlet-mapping&gt;
   &lt;servlet-name&gt;CFMLServlet&lt;/servlet-name&gt;
   &lt;url-pattern&gt;*.cfc&lt;/url-pattern&gt;
&lt;/servlet-mapping&gt;</pre>
</blockquote>
<p>Inside the &lt;welcome-file-list&gt; element insert the following</p>
<blockquote>
<pre>&lt;welcome-file&gt;index.cfm&lt;/welcome-file&gt;
&lt;welcome-file&gt;index.cfml&lt;/welcome-file&gt;</pre>
</blockquote>
<p>This tells Tomcat what files to process and what to do with them.</p>
<h3>Apache</h3>
<p>Next we need Apache.  Originally I had installed this by selecting the LAMP stack while installing Ubuntu but if you missed that step then go for</p>
<blockquote>
<pre>sudo apt-get install apache2</pre>
</blockquote>
<h3>Connecting Apache and Tomcat</h3>
<p>There are various ways to connect Apache and Tomcat, but we&#8217;ll be using mod_jk which you can install on Ubuntu by typing in </p>
<blockquote>
<pre>sudo apt-get install libapache2-mod-jk</pre>
</blockquote>
<p>To specify the connection between Apache and Tomcat we set up a file called workers.properties and list the different connectors.  Create the file in the Apache directory</p>
<blockquote>
<pre>sudo nano /etc/apache2/workers.properties</pre>
</blockquote>
<p>and paste in the following</p>
<blockquote>
<pre>worker.list=default

worker.default.port=8009
worker.default.host=localhost
worker.default.type=ajp13
worker.default.lbfactor=1</pre>
</blockquote>
<p>We then tell apache where this file is by adding the following to your /etc/apache2/httpd.conf</p>
<blockquote>
<pre># Mod_jk settings
JkWorkersFile workers.properties
DirectoryIndex index.html index.htm index.cfm index.cfml</pre>
</blockquote>
<h3>Setting Up A Site</h3>
<p>To use Railo on a website we need to configure it in both Apache and Tomcat.  In Tomcat&#8217;s server.xml (/usr/local/tomcat/conf/server.xml if you&#8217;re following my instructions) add the following (you can add many of these if you need to set it up for each application)</p>
<blockquote>
<pre>&lt;Host name="your.url.com" appBase="/var/www/vhosts/yoursite"&gt;
    &lt;Context path="" docBase=""/&gt;
&lt;/Host&gt;</pre>
</blockquote>
<p>Finally we add the following to your site&#8217;s apache vhost config (most likely in /etc/apache2/sites-available)</p>
<blockquote>
<pre>JkMount /*.cfm default</pre>
</blockquote>
<p>This tells mod_jk to use the default connector (as specified in the workers.properties file) whenever it encounters a file ending in .cfm.  By setting it up this way we can still use apache to server static files like images, css and js (or even run another language like php side by side with ColdFusion)</p>
<p>Last thing to do is to drop some Coldfusion into your website and check that everything is working.</p>
]]></content:encoded>
			<wfw:commentRss>http://jamesconstable.co.uk/web-development/installing-railo-3-on-tomcat-6-via-apache-2-on-ubuntu-804/feed/</wfw:commentRss>
		<slash:comments>21</slash:comments>
		</item>
	</channel>
</rss>
