<?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>Martin&#039;s World &#187; ubuntu</title>
	<atom:link href="http://www.freakent.co.uk/archives/tag/ubuntu/feed" rel="self" type="application/rss+xml" />
	<link>http://www.freakent.co.uk</link>
	<description>Martin&#039;s world of Gadgets, Internet and Technology</description>
	<lastBuildDate>Sun, 14 Feb 2010 16:22:14 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.4</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Install Ruby-on-Rails and Phusion Passenger (mod_rails) on Ubuntu 9.04</title>
		<link>http://www.freakent.co.uk/archives/306</link>
		<comments>http://www.freakent.co.uk/archives/306#comments</comments>
		<pubDate>Wed, 26 Aug 2009 12:43:22 +0000</pubDate>
		<dc:creator>martin</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Ruby-on-Rails]]></category>
		<category><![CDATA[mod_rails]]></category>
		<category><![CDATA[passenger]]></category>
		<category><![CDATA[rails]]></category>
		<category><![CDATA[ubuntu]]></category>

		<guid isPermaLink="false">http://www.chart-geek.com/?p=306</guid>
		<description><![CDATA[The following is how I installed and configured Ruby-on-Rails on my Ubuntu 9.04 Server (x86 64 bit).
1. Update Ubuntu before we start
$ sudo apt-get update
$ sudo apt-get upgrade
2. Check whether MySQL is already installed
 $ mysql --version
mysql  Ver 14.12 Distrib 5.0.75, for debian-linux-gnu (x86_64) using readline 5.2
MySQL was already installed so OK to proceed.
2. [...]]]></description>
			<content:encoded><![CDATA[<p><img src="http://rubyonrails.org/images/rails.png" alt="Rails" style="float:right"/>The following is how I installed and configured Ruby-on-Rails on my Ubuntu 9.04 Server (x86 64 bit).</p>
<p><strong>1. Update Ubuntu before we start</strong><br />
<code>$ sudo apt-get update<br />
$ sudo apt-get upgrade</code></p>
<p><strong>2. Check whether MySQL is already installed</strong><br />
<code> $ mysql --version<br />
mysql  Ver 14.12 Distrib 5.0.75, for debian-linux-gnu (x86_64) using readline 5.2</code><br />
MySQL was already installed so OK to proceed.</p>
<p><strong>2. Install Ruby</strong><br />
<code>$ sudo apt-get install ruby irb rdoc</code><br />
$ ruby -v<br />
ruby 1.8.7 (2008-08-11 patchlevel 72) [x86_64-linux]</code></p>
<p><strong>4. Install Ruby Gems (the Ruby package management system)</strong><br />
There are two ways to install Ruby Gems on Ubuntu, either through apt-get or by downloading the Gem archive and running the set up script. I tried the apt-get method as that looked quicker:</p>
<p><code>$ sudo apt-get install rubygems1.8<br />
$ sudo gem update --system</code></p>
<p>Unfortunately the apt-get package disables the <code>gem update --system</code> and insists that you use apt to update instead. This might be more preferable to the Linux Sysadmin crowd but I prefer to keep everything pure Ruby. It's a few extra commands but nothing too bad. </p>
<p><code>$ wget http://rubyforge.org/frs/download.php/60718/rubygems-1.3.5.tgz<br />
$ tar xzvf rubygems-1.3.5.tgz<br />
$ cd rubygems-1.3.5/<br />
$ sudo ruby setup.rb<br />
$ gem -v<br />
$ sudo gem update --system</code></p>
<p><strong>5. Install and test Rails</strong><br />
<code>$ sudo gem install rails<br />
$ cd<br />
$ rails hello<br />
$ cd hello<br />
$ script/server<br />
...<br />
/usr/lib/ruby/gems/1.8/gems/rails-2.3.3/lib/initializer.rb:271:in `require_frameworks': no such file to load -- net/https (RuntimeError)</code></p>
<p>A quick Google of this error message revealed that I probably should have installed the Ruby OpenSSL library when I originally installed Ruby.<br />
<code>$ sudo apt-get install libopenssl-ruby<br />
$ script/server</code><br />
This time the Mongrel server started fine. </p>
<p><strong>6. Install Passenger (mod_rails)</strong><br />
The Rails community seem to all be switching from Mongrel to Passanger, the mod_rails Apache plug-in module. I was keen to see how a Passenger deployment compares to Mongrel.<br />
<code>$ sudo gem install passenger<br />
...<br />
Failed to build gem native extension.</code><br />
Apparently the libraries needed to build a Gem that contains native code isn't included with the main Ruby package, you need to install the Ruby Dev package too (something else I should have installed when I installed Ruby).<br />
<code>$ sudo apt-get install ruby1.8-dev<br />
$ sudo gem install passenger<br />
$ sudo passenger-install-apache2-module<br />
</code><br />
Following the prompts and messages on screen it turned out I didn't have a number of Apache libraries. The passenger installer is very good and gives you the exact commands to run:<code><br />
 * To install Apache 2 development headers:<br />
   Please run apt-get install apache2-prefork-dev as root.<br />
 * To install Apache Portable Runtime (APR) development headers:<br />
   Please run apt-get install libapr1-dev as root.<br />
 * To install Apache Portable Runtime Utility (APU) development headers:<br />
   Please run apt-get install libaprutil1-dev as root.<br />
</code><br />
I only needed to run the first command as the other two packages must have been pulled in as dependencies.</p>
<p><code><br />
$ sudo passenger-install-apache2-module<br />
...<br />
The Apache 2 module was successfully installed.</p>
<p>Please edit your Apache configuration file, and add these lines:</p>
<p>   LoadModule passenger_module /usr/lib/ruby/gems/1.8/gems/passenger-2.2.4/ext/apache2/mod_passenger.so<br />
   PassengerRoot /usr/lib/ruby/gems/1.8/gems/passenger-2.2.4<br />
   PassengerRuby /usr/bin/ruby1.8</p>
<p>...</p>
<p><strong>7. Adding Passenger to the Ubuntu Apache2 Configuration</strong><br />
Whilst you could just add the Passenger configuration to your apache2.conf file, the Debian/Ubuntu way is to have a separate file for each module. So create a new file called passenger.load in /etc/apache2/mods-available and add the lines provided by the Passenger installer above. Then run the a2enmod to enable the Passenger module. This little script actually creates links in the mods-enabled subdirectory which are then picked up by the main Apache configuration file.<br />
<code>$sudo a2enmod<br />
Which module would you like to enable?<br />
Your choices are: actions asis auth_anon auth_dbm auth_digest auth_ldap cache cern_meta cgid cgi dav_fs dav deflate disk_cache expires ext_filter file_cache headers imap include info ldap mem_cache mime_magic <strong>passenger</strong> php5 proxy_connect proxy_ftp proxy_http proxy rewrite speling ssl suexec unique_id userdir usertrack vhost_alias<br />
          Module name? passenger<br />
          Module passenger installed; run /etc/init.d/apache2 force-reload to enable.<br />
...<br />
</code><br />
To finish enabling your Passenger module you just need to tell Apache to reload.<br />
<code>    $ sudo /etc/init.d/apache2 reload<br />
</code></p>
<p><strong>8. Adding Your Rails App to Passenger</strong><br />
Again, you could just add your site to the Apache config file using a <code>virtual host<code> directive, but the Debian/Ubuntu way is to use a sites-available/sites-enabled set up, similar to the Apache modules set up. A default web site was configured using <code>/etc/apache2/sites-available/default</code>, which publishes the directory <code>/var/www</code> via Apache. </p>
<p>I wanted to make my Rails app available as a subdirectory off the server's domain, e.g. http://server.local/testapp. All you have to do is create a soft link from your Rails app's public directory to the /var/www directory and the tell Passenger to treat this direftory as a Rails app.</p>
<p><code>$ ln -s /usr/martin/testapp/public /var/www/testapp</code></p>
<p>Add the following to <code>/etc/apache2/sites-available/default</code>:<br />
<code>...<br />
RailsBaseURI /testapp<br />
</code><br />
<em>If you want to use http://testapp.domain/ then you'll have to check the documentation on the <a href="http://www.modrails.com/documentation/Users%20guide%20Apache.html#_deploying_to_a_virtual_host_8217_s_root">Phusion Passenger</a> site and create a new sites_available file.  </em> </p>
<p><strong>Useful Resources</strong><br />
<a href="http://www.railsgarden.com/2008/04/12/configurating-passenger-mod_rails-on-slicehost-with-ubuntu-710/">Blog entry on installing and configuring Passenger on Ubuntu 7.10.</a> </p>
]]></content:encoded>
			<wfw:commentRss>http://www.freakent.co.uk/archives/306/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Ubuntu 704 on VMWare &#8211; Increase root partition size</title>
		<link>http://www.freakent.co.uk/archives/128</link>
		<comments>http://www.freakent.co.uk/archives/128#comments</comments>
		<pubDate>Wed, 10 Oct 2007 16:50:54 +0000</pubDate>
		<dc:creator>martin</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[ubuntu]]></category>
		<category><![CDATA[virtualisation]]></category>
		<category><![CDATA[VMWare]]></category>

		<guid isPermaLink="false">http://www.freakent.co.uk/archives/128</guid>
		<description><![CDATA[The root partition of my Ubuntu 704 Server Virtual Machine was only 5GB and was filling up regularly. Incresing the size is quite complex as you have to increase the size of the VMWare disk file, then increase the size of the file system partition within the disk file. Here are the steps I went [...]]]></description>
			<content:encoded><![CDATA[<p>The root partition of my Ubuntu 704 Server Virtual Machine was only 5GB and was filling up regularly. Incresing the size is quite complex as you have to increase the size of the VMWare disk file, then increase the size of the file system partition within the disk file. Here are the steps I went through and a few hints and tips along the way.</p>
<p><span id="more-128"></span>1. On the host system, increase size of VMWare disk files</p>
<p><em>(I added the VMWare folder to my PATH first)</em></p>
<p><code>D:\VMWare\ubuntu704server&gt;vmware-vdiskmanager -x 10GB Ubuntu.vmdk</code></p>
<p>I also changed the file type to dynamically extend (that&#8217;s the -t 0), which renames the file in the process. This is an optional step as it can affect the performance of the VM.</p>
<p><code>D:\VMWare\ubuntu704server&gt;vmware-vdiskmanager -r Ubuntu.vmdk -t 0 Ubuntu-000001.vmdk</code></p>
<p>2. Download the latest <a href="http://gparted.sourceforge.net/livecd.php">gparted livecd</a> and save to host&#8217;s file system</p>
<p>gparted is a GUI tool for manipulating partitions. I tried a number of different tools before the <strong>gparted livecd</strong>, including <strong>qtparted </strong>on the latest <strong>Knoppix livecd</strong>. With the <strong>Knoppix qtparted</strong>, the resize option was continually greyed out. I did some digging and it seems the underlying <strong>parted </strong>didn&#8217;t like whatever Ubuntu do to the ext3 file system, so any tools on top (such as <strong>qtparted</strong>) can&#8217;t resize. The <strong>gparted livecd</strong> worked perfectly so I didn&#8217;t investigate further.</p>
<p>3. In the VM settings, change the VM&#8217;s CDROM to point to the newly downloaded gparted livecd iso image</p>
<p>4. Boot the VM, but press Esc asap and tell the VMWare bios to boot from CD first</p>
<p>5. Reboot the VM into the <strong>gparted livecd</strong></p>
<p>6. When it eventually loads,  point <strong>gparted </strong>at the disk device (/dev/sda). Delete the swap partition (/dev/sda5) and then delete the logical partition (/dev/sda2). /dev/sda5 was &#8220;inside&#8221; /dev/sda2.</p>
<p>The /dev/sda5 swap partition was at the end of the original 5GB drive, but was now sitting in the middle of my 10GB. I couldn&#8217;t figure out how to move the swap back so it was just easier to drop it and recreate it after I resized the main /dev/sda1 partition.</p>
<p>7. Resize the 1st partition to almost fill the available space, saving 512MB for a new swap partition</p>
<p>8. Create a new logical partition in the available space, gparted should automatically name this /dev/sda2 when you commit changes.</p>
<p>9. Create a new linux-swap partition inside the /dev/sda2 partition, gparted should automatially name this /dev/sda5 when you commit changes.</p>
<p>10. Reboot the VM, enter the VMWare BIOS and change boot priority so that the VM will boot from it&#8217;s disk.</p>
<p>That&#8217;s it !</p>
]]></content:encoded>
			<wfw:commentRss>http://www.freakent.co.uk/archives/128/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>vnc4server on Ubuntu 704 server</title>
		<link>http://www.freakent.co.uk/archives/126</link>
		<comments>http://www.freakent.co.uk/archives/126#comments</comments>
		<pubDate>Fri, 14 Sep 2007 13:16:46 +0000</pubDate>
		<dc:creator>martin</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[ubuntu]]></category>
		<category><![CDATA[vnc]]></category>

		<guid isPermaLink="false">http://www.freakent.co.uk/archives/126</guid>
		<description><![CDATA[Now I have my Gnome desktop running on my sever I&#8217;d like to be able to access it without using the vmware console. I installed vnc4server using synaptic. Under my user I type vncserver and then connect to the server using the vnc client from my Windows desktop. By default I get a plain grey [...]]]></description>
			<content:encoded><![CDATA[<p>Now I have my Gnome desktop running on my sever I&#8217;d like to be able to access it without using the vmware console. I installed vnc4server using <em>synaptic</em>. Under my user I type <em>vncserver</em> and then connect to the server using the vnc client from my Windows desktop. By default I get a plain grey X window and a basic xterm window.</p>
<p><span id="more-126"></span>To set up a better desktop, edit the file ~/.vnc/xstartup and uncomment the first two lines, as follows:</p>
<p><code>#!/bin/sh<br />
# Uncomment the following two lines for normal desktop:<br />
unset SESSION_MANAGER<br />
exec /etc/X11/xinit/xinitrc</code></p>
<p><code>#[ -x /etc/vnc/xstartup ] &amp;&amp; exec /etc/vnc/xstartup<br />
#[ -r $HOME/.Xresources ] &amp;&amp; xrdb $HOME/.Xresources<br />
#xsetroot -solid grey<br />
#vncconfig -iconic &amp;<br />
#xterm -geometry 80x24+10+10 -ls -title "$VNCDESKTOP Desktop" &amp;<br />
#twm &amp;</code></p>
<p>Thanks to a bug in the vnc4server version that is currently being distributed with 704 &#8220;Feisty Fawn&#8221;, you need to do two more things</p>
<p>1) <code>sudo chmod +x /etx/X11/xinit/xinitrc</code></p>
<p>2) edit the vncserver script and add the <strong>&#8220;-extension XFIXES&#8221; </strong>line, as follows :<br />
<code><br />
$cmd .= " -rfbauth $vncUserDir/passwd";<br />
$cmd .= " -rfbport $vncPort";<br />
$cmd .= " -pn";<br />
$cmd .= " -extension XFIXES";</code></p>
<p># Add font path and color database stuff here, e.g.:<br />
#</p>
<p>See <a href="https://bugs.launchpad.net/ubuntu/+source/vnc4/+bug/78282" target="_blank">here</a> and in particular <a href="https://bugs.launchpad.net/ubuntu/+source/vnc4/+bug/78282/comments/72" target="_blank">here</a> for more info on this bug.</p>
<p>To Start the vnc server just type:</p>
<p><code>$ vncserver</code></p>
<p>Assuming it started a session on :1, you can kill that session with</p>
<p><code>$ vncserver -kill :1</code></p>
]]></content:encoded>
			<wfw:commentRss>http://www.freakent.co.uk/archives/126/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>A GUI for Ubuntu 704 Server ?</title>
		<link>http://www.freakent.co.uk/archives/125</link>
		<comments>http://www.freakent.co.uk/archives/125#comments</comments>
		<pubDate>Thu, 13 Sep 2007 09:58:57 +0000</pubDate>
		<dc:creator>martin</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[ubuntu]]></category>

		<guid isPermaLink="false">http://www.freakent.co.uk/archives/125</guid>
		<description><![CDATA[I installed Ubuntu Server because I wanted a minimal install befitting a server.  No OpenOffice, games or any other stuff. I know my way around a unix command line but it&#8217;s just so much quicker to get things done in Windows. Now I think I&#8217;d like a light weight GUI on my server that [...]]]></description>
			<content:encoded><![CDATA[<p>I installed Ubuntu Server because I wanted a minimal install befitting a server.  No OpenOffice, games or any other stuff. I know my way around a unix command line but it&#8217;s just so much quicker to get things done in Windows. Now I think I&#8217;d like a light weight GUI on my server that I can start just when I need it. So I need X, Gnome, no login manager and Synaptic for package management.<br />
I&#8217;m hoping this should work&#8230; Need to look at what&#8217;s included in gnome-core.</p>
<p><code>$ sudo aptitude install xorg gnome-core </code><tt>synaptic</tt></p>
<p><code>$ startx</code><code></code></p>
]]></content:encoded>
			<wfw:commentRss>http://www.freakent.co.uk/archives/125/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Ubuntu 704 Server &#8211; Package management with apt and dpkg</title>
		<link>http://www.freakent.co.uk/archives/124</link>
		<comments>http://www.freakent.co.uk/archives/124#comments</comments>
		<pubDate>Sat, 08 Sep 2007 09:06:32 +0000</pubDate>
		<dc:creator>martin</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[apt]]></category>
		<category><![CDATA[debian]]></category>
		<category><![CDATA[ubuntu]]></category>

		<guid isPermaLink="false">http://www.freakent.co.uk/archives/124</guid>
		<description><![CDATA[To update the local list of packages, enter in a Terminal:
sudo apt-get update
To install all available updates:
sudo apt-get upgrade
To see if package including the words blah is already installed:
dpkg -l '*blah*'
To install a package:
sudo apt-get install package
To remove a package:
sudo apt-get remove package
To list other apt commands and options:
apt-get help
Also  try Aptitude for more [...]]]></description>
			<content:encoded><![CDATA[<p>To update the local list of packages, enter in a Terminal:</p>
<pre class="screen">sudo apt-get update</pre>
<p>To install all available updates:</p>
<pre class="screen">sudo apt-get upgrade</pre>
<p>To see if package including the words <em>blah</em> is already installed:</p>
<pre class="screen">dpkg -l '*blah*'</pre>
<p>To install a package:</p>
<pre class="screen">sudo apt-get install <span class="emphasis"><em>package</em></span></pre>
<p>To remove a package:</p>
<pre class="screen">sudo apt-get remove <span class="emphasis"><em>package</em></span></pre>
<p>To list other <span><strong class="application">apt</strong></span> commands and options:</p>
<pre class="screen">apt-get help</pre>
<p>Also  try Aptitude for more interactive package management tool<br />
<code>sudo aptitude</code></p>
]]></content:encoded>
			<wfw:commentRss>http://www.freakent.co.uk/archives/124/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Ubuntu 704 Server &#8211; Adding a new user</title>
		<link>http://www.freakent.co.uk/archives/123</link>
		<comments>http://www.freakent.co.uk/archives/123#comments</comments>
		<pubDate>Sat, 08 Sep 2007 09:05:11 +0000</pubDate>
		<dc:creator>martin</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[ubuntu]]></category>

		<guid isPermaLink="false">http://www.freakent.co.uk/archives/123</guid>
		<description><![CDATA[Added myself a new user (should have read the useradd man page first, should be able to set a lot of this all in one command)

useradd &#8230;
sudo vi /etc/passwd to set group and default shell
sudo vi /etc/group and add new user to the same groups as existing user
Need to include group admin for sudo
create the [...]]]></description>
			<content:encoded><![CDATA[<p>Added myself a new user (should have read the useradd man page first, should be able to set a lot of this all in one command)</p>
<ol>
<li><em>useradd </em>&#8230;</li>
<li><em>sudo vi /etc/passwd</em> to set group and default shell</li>
<li><em>sudo vi /etc/group</em> and add new user to the same groups as existing user<br />
Need to include group admin for sudo</li>
<li>create the home directory /home/&#8230;<br />
<em>chown username folder<br />
chgrp groupname folder<br />
</em></li>
</ol>
]]></content:encoded>
			<wfw:commentRss>http://www.freakent.co.uk/archives/123/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>HOWTO: Setting up MT-DAAPD on Ubuntu 5.10</title>
		<link>http://www.freakent.co.uk/archives/65</link>
		<comments>http://www.freakent.co.uk/archives/65#comments</comments>
		<pubDate>Tue, 24 Jul 2007 23:00:00 +0000</pubDate>
		<dc:creator>martin</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Apple]]></category>
		<category><![CDATA[iTunes]]></category>
		<category><![CDATA[ubuntu]]></category>

		<guid isPermaLink="false">http://www.freakent.co.uk/archives/65</guid>
		<description><![CDATA[< ![CDATA[Nice step by step instructions that worked for me.Click Here&#8230;]]&#62;
]]></description>
			<content:encoded><![CDATA[<p>< ![CDATA[Nice step by step instructions that worked for me.<a href=http://dotnet.org.za/matt/articles/48417.aspx><br />Click Here&#8230;]]&gt;</p>
]]></content:encoded>
			<wfw:commentRss>http://www.freakent.co.uk/archives/65/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
