<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss' xmlns:gd='http://schemas.google.com/g/2005' xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-8852689986161092936</id><updated>2011-09-06T17:04:10.950+01:00</updated><category term='FreeBSD'/><category term='Ruby'/><category term='BSD'/><category term='GNU/Linux'/><category term='Rails'/><category term='ZFS'/><category term='RAID'/><title type='text'>Keith's Tech Notes</title><subtitle type='html'>This is a list of useful tech items.</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://keith-technotes.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8852689986161092936/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://keith-technotes.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>Keith</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>7</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-8852689986161092936.post-4465810168519665201</id><published>2010-12-10T02:08:00.002Z</published><updated>2010-12-10T02:13:52.453Z</updated><title type='text'>cygwin hints</title><content type='html'>Setting the home directory to Document and Settings&lt;br /&gt;&lt;pre class="prettyprint"&gt;&lt;code&gt;&lt;span class="pln"&gt;mkpasswd &lt;/span&gt;&lt;span class="pun"&gt;-&lt;/span&gt;&lt;span class="pln"&gt;l &lt;/span&gt;&lt;span class="pun"&gt;-&lt;/span&gt;&lt;span class="pln"&gt;p &lt;/span&gt;&lt;span class="str"&gt;"$(cygpath -H)"&lt;/span&gt;&lt;span class="pln"&gt; &lt;/span&gt;&lt;span class="pun"&gt;&gt;&lt;/span&gt;&lt;span class="pln"&gt; &lt;/span&gt;&lt;span class="str"&gt;/etc/&lt;/span&gt;&lt;span class="pln"&gt;passwd&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;Cygwin specific utils&lt;br /&gt;&lt;a href="http://cygwin.com/cygwin-ug-net/using-utils.html"&gt;http://cygwin.com/cygwin-ug-net/using-utils.html&lt;/a&gt;&lt;br /&gt;&lt;pre class="prettyprint"&gt;&lt;code&gt;&lt;span class="pln"&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8852689986161092936-4465810168519665201?l=keith-technotes.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://keith-technotes.blogspot.com/feeds/4465810168519665201/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8852689986161092936&amp;postID=4465810168519665201' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8852689986161092936/posts/default/4465810168519665201'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8852689986161092936/posts/default/4465810168519665201'/><link rel='alternate' type='text/html' href='http://keith-technotes.blogspot.com/2010/12/cygwin-hints.html' title='cygwin hints'/><author><name>Keith</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8852689986161092936.post-4773138968341961461</id><published>2008-07-30T16:05:00.005+01:00</published><updated>2008-11-17T14:51:13.048Z</updated><category scheme='http://www.blogger.com/atom/ns#' term='ZFS'/><category scheme='http://www.blogger.com/atom/ns#' term='FreeBSD'/><category scheme='http://www.blogger.com/atom/ns#' term='RAID'/><title type='text'>Why ZFS?</title><content type='html'>&lt;strong&gt;What is ZFS?&lt;/strong&gt;&lt;br /&gt;ZFS is a POSIX compliant file system and Volume Manager developed by Sun Microsystems. The source code is in the public domain and has been ported to FreeBSD and its dirivatives (Apple amongst others).&lt;br /&gt;&lt;br /&gt;ZFS supports error detection and recovery while the system is in use.&lt;br /&gt;&lt;br /&gt;Personally, I've been very concerned about the integrity of data on disks for over 20 years. It seems I've spent my professional life waiting for ZFS.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;The Problem with Hardware RAID&lt;/strong&gt;&lt;br /&gt;Hardware is great! It provides an OS independent solution to RAID management. All the OS sees is a single device adn the hardware takes the load, manages parallel writes and the like. Throw in a higher level RAID and you're protected against one or two disk failures. I mean it's great.&lt;br /&gt;&lt;br /&gt;That's until you do suffer failure. If you suffer disk failure and you have a hot swappable setup then that'll do. But if you don't, you can spend a long time without service, as I found out recently. It takes time to rebuild the array.&lt;br /&gt;&lt;br /&gt;If you suffer controller failure, you'll need a compatible controller to read the disks. That may not be as easy as it sounds, and you'll loose ALL your data if you guess wrong.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;The ZFS boys highlight one further fault&lt;/strong&gt;&lt;br /&gt;There's a problem on RAID5 with partial writes. Disk writes are not atomic, the data and parity writes are unlikely to occure at exactly the same time.  If you suffer power failure during a write, you'll have a corrupt track.&lt;br /&gt;&lt;strong&gt;&lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;One further advantage&lt;/strong&gt;&lt;br /&gt;The ZFS file system uses the same snapshot mechanism as the ZFS Volume Manager. That improves the system's efficiency. Admittedly, this only reverses an introduced inefficiency.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;&lt;/strong&gt;&lt;strong&gt;Back to Why ZFS?&lt;/strong&gt;&lt;br /&gt;ZFS as a software Volume Management system can implement a RAID5 equivalent called RAIDZ (and RAIDZ2 for RAID6). This can survive hardware failures. And it corrects the known RAID5 partial write problem.&lt;br /&gt;&lt;br /&gt;Even without RAID, ZFS can take &lt;em&gt;spare&lt;/em&gt; disks on a volume, or disk pool in ZFS speak. The ZFS filesystem can allegedly maintain more than one copy of files specified by a &lt;em&gt;count&lt;/em&gt;. However, I'm yet to see this work.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8852689986161092936-4773138968341961461?l=keith-technotes.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://keith-technotes.blogspot.com/feeds/4773138968341961461/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8852689986161092936&amp;postID=4773138968341961461' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8852689986161092936/posts/default/4773138968341961461'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8852689986161092936/posts/default/4773138968341961461'/><link rel='alternate' type='text/html' href='http://keith-technotes.blogspot.com/2008/07/why-zfs.html' title='Why ZFS?'/><author><name>Keith</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8852689986161092936.post-8697626241903683470</id><published>2008-07-21T13:35:00.013+01:00</published><updated>2008-07-25T03:08:55.475+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='ZFS'/><category scheme='http://www.blogger.com/atom/ns#' term='BSD'/><title type='text'>An Introduction ZFS on FreeBSD</title><content type='html'>&lt;strong&gt;What is ZFS?&lt;/strong&gt;&lt;br /&gt;ZFS is a somewhat fault tolerant file system integrated with a volume manager developed by Sun Microsystems. The source code has been placed in the public domain. This made the code available and it has been ported to FreeBSD and Darwin.&lt;br /&gt;&lt;br /&gt;ZFS writes checksum information along with each block of data is writes. This allows it to detect errors when the data is read.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Resources&lt;/span&gt;&lt;br /&gt;Here's a summary of ZFS from the authors.&lt;br /&gt;&lt;a href="http://www.opensolaris.org/os/community/zfs/docs/zfs_last.pdf"&gt;http://www.opensolaris.org/os/community/zfs/docs/zfs_last.pdf&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;The FreeBSD/ZFS wiki&lt;br /&gt;&lt;a href="http://wiki.freebsd.org/ZFS"&gt;http://wiki.freebsd.org/ZFS&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;This guide describes how to install FreeBSD 7.0 on a ZFS filesystem.&lt;br /&gt;&lt;a href="https://www.ish.com.au/solutions/articles/freebsdzfs"&gt;https://www.ish.com.au/solutions/articles/freebsdzfs&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;For more wisdon on ZFS see:&lt;br /&gt;&lt;a href="http://blog.thefrog.net/2008/04/more-zfs-on-freebsd.html"&gt;http://blog.thefrog.net/2008/04/more-zfs-on-freebsd.html&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;What is FreeBSD?&lt;/strong&gt;&lt;br /&gt;FreeBSD is an old UNIX variant. It's the BSD derived project optimised for the PC platform.&lt;br /&gt;&lt;br /&gt;FreeBSD is free to access, free to use, and free to modify and reuse. It's stable and reliable. ZFS is an &lt;em&gt;experimental&lt;/em&gt; feature within FreeBSD 7.0, i.e. ZFS is neither stable nor reliable in FreeBSD 7.0.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;What is Darwin?&lt;/strong&gt;&lt;br /&gt;Darwin is the operating system used by Apple. Apple actuall runs Mach 3.2. But you can ignore that unless you're writing device drivers. The next layer up is based on FreeBSD and called Darwin. The upper layer is concerned with the GUI.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;A Few Concepts&lt;/strong&gt;&lt;br /&gt;ZPOOL&lt;br /&gt;When DRAM is added to a computer, it's added to a memory pool and available to all applications. Similarly, the designers of ZFS liked the notion of a disk pool. Storage virtual devices are used to make up a pool. The pool size can be increased by adding more storage. That's where the analogy ends however as you can't really take storage unit out of a pool (unless it's a spare).&lt;br /&gt;&lt;br /&gt;RAIDZ&lt;br /&gt;This is a software RAID system that addresses a problem in RAID5 by providing a slight optimisation, it uses a variable block size rather than RAID5's fixed equivalent. It's part of the ZFS storage system and is managed as a storage virtual device.&lt;br /&gt;&lt;br /&gt;VDEV&lt;br /&gt;Virtual Storage devices are exactly that, virtual storage. Each actual storage device can differ in type. For example, ramdisk, hard disk, flash memory, RAIDZ and so on. All of these are managed by the virtual storage system, VDEV.&lt;br /&gt;&lt;br /&gt;&lt;a href="http://blog.thefrog.net/2008/04/more-zfs-on-freebsd.html"&gt;&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8852689986161092936-8697626241903683470?l=keith-technotes.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://keith-technotes.blogspot.com/feeds/8697626241903683470/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8852689986161092936&amp;postID=8697626241903683470' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8852689986161092936/posts/default/8697626241903683470'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8852689986161092936/posts/default/8697626241903683470'/><link rel='alternate' type='text/html' href='http://keith-technotes.blogspot.com/2008/07/introduction-zfs-on-freebsd.html' title='An Introduction ZFS on FreeBSD'/><author><name>Keith</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8852689986161092936.post-5836758161741991453</id><published>2008-05-23T12:51:00.003+01:00</published><updated>2008-05-23T13:03:35.519+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Rails'/><title type='text'>Rails Scaffolding</title><content type='html'>Scaffolding in Ruby on Rails is a wizard that generates a Model, View, Controller and database migration.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;How do you do it?&lt;/strong&gt;&lt;br /&gt;Generate a new Rails project&lt;br /&gt;&lt;span style="font-family:lucida grande;color:#990000;"&gt;rails project&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Go to the project directory&lt;br /&gt;&lt;span style="color:#990000;"&gt;cd project&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Run the scaffold. Tell it to create an object called Account that contains an id, name and updated_at fields.&lt;br /&gt;&lt;span style="font-family:lucida grande;color:#990000;"&gt;script/generate scaffold account name:string updated_at:timestamp&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Migrate the database to the next version, in this case, version 1.&lt;br /&gt;&lt;span style="font-family:lucida grande;color:#990000;"&gt;rake db:migrate&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Run the webserver so you can interact with it through a browser at address: &lt;a href="http://localhost:3000/"&gt;http://localhost:3000/&lt;/a&gt;&lt;br /&gt;&lt;span style="font-family:lucida grande;color:#990000;"&gt;script/server&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;And that's it!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8852689986161092936-5836758161741991453?l=keith-technotes.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://keith-technotes.blogspot.com/feeds/5836758161741991453/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8852689986161092936&amp;postID=5836758161741991453' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8852689986161092936/posts/default/5836758161741991453'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8852689986161092936/posts/default/5836758161741991453'/><link rel='alternate' type='text/html' href='http://keith-technotes.blogspot.com/2008/05/rails-scaffolding.html' title='Rails Scaffolding'/><author><name>Keith</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8852689986161092936.post-4863703010392748172</id><published>2007-12-29T01:31:00.001Z</published><updated>2008-06-25T01:07:11.201+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Ruby'/><category scheme='http://www.blogger.com/atom/ns#' term='GNU/Linux'/><title type='text'>Building a Ruby on Rails website</title><content type='html'>&lt;span style="font-weight: bold;"&gt;Overview&lt;/span&gt;&lt;br /&gt;This guide describes how to build a commercial quality ruby web server using free components Debian GNU/Linux, Apache 2 and Ruby on Rails.&lt;br /&gt;&lt;br /&gt;A good reference book is &lt;i&gt;Ruby By Example&lt;/i&gt; by Kevin Baird.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;&lt;span style="font-weight: bold;"&gt;&lt;span style="font-weight: bold;"&gt;&lt;/span&gt;&lt;/span&gt;Installing the Operating System&lt;/span&gt;&lt;br /&gt;The very first piece of software to begin with is the Operating System.&lt;br /&gt;Please follow this link. &lt;a href="http://keith-technotes.blogspot.com/2007/12/installing-debian-linux.html"&gt;Installing Debian GNU/Linux&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Installing Apache 2&lt;/span&gt;&lt;br /&gt;Install Apache 2 by typing:&lt;br /&gt;&lt;span style="color: rgb(51, 0, 153);font-family:courier new;" &gt;apt-get install apache2 apache2-doc&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Install the Ruby module and Embedded Ruby by typing:&lt;br /&gt;&lt;span style="color: rgb(51, 0, 153);font-family:courier new;" &gt;apt-get install libapache2-mod-ruby liberuby ruby eruby ruby-dev&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Apache 2 will be installed.  The Apache 2 configuration directory is &lt;tt&gt;/etc/apache2&lt;/tt&gt;&lt;br /&gt;The standard web server directory, DocumentRoot, is &lt;tt&gt;/var/www&lt;/tt&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Configuring Apache 2 for Ruby&lt;/span&gt;&lt;br /&gt;First, we configure Apache 2 to interpret &lt;tt&gt;.rhtml&lt;/tt&gt; and &lt;tt&gt;.rcss&lt;/tt&gt; files using Embedded Ruby.&lt;br /&gt;&lt;span style="color: rgb(51, 0, 153);font-family:courier new;" &gt;cd /etc/apache2/&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Create file:&lt;br /&gt;&lt;span style="color: rgb(51, 0, 153);font-family:courier new;" &gt;mods-available/mod_ruby.conf&lt;/span&gt;&lt;br /&gt;&lt;pre&gt;&amp;lt;IfModule mod_ruby.c&amp;gt;&lt;br /&gt;     RubyRequire apache/ruby-run&lt;br /&gt;     RubyRequire apache/eruby-run&lt;br /&gt;     &amp;lt;Files *.rcss&amp;gt;&lt;br /&gt;           AddType text/css .rcss&lt;br /&gt;           AddType application/x-httpd-ruby *.rb&lt;br /&gt;           SetHandler ruby-object&lt;br /&gt;           RubyHandler Apache::ERubyRun.instance&lt;br /&gt;     &amp;lt;/Files&amp;gt;&lt;br /&gt;     &amp;lt;Files *.rhtml&amp;gt;&lt;br /&gt;           AddType text/html .rhtml&lt;br /&gt;           AddType application/x-httpd-ruby *.rb&lt;br /&gt;           SetHandler ruby-object&lt;br /&gt;           RubyHandler Apache::ERubyRun.instance&lt;br /&gt;     &amp;lt;/Files&amp;gt;&lt;br /&gt;     RubyRequire auto-reload&lt;br /&gt;&amp;lt;/IfModule&amp;gt;&lt;br /&gt;&lt;/pre&gt;Make a soft link to this file in the &lt;span style="font-family:monospace;"&gt;mods&lt;/span&gt;&lt;tt&gt;-enabled&lt;/tt&gt; directory.&lt;br /&gt;&lt;span style="color: rgb(51, 0, 153);font-family:courier new;" &gt;cd /etc/apache2/mods-enabled&lt;br /&gt;ln -s ../mods-available/mod_ruby.conf&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Second, we configure a web site to use Ruby CGI and Embedded Ruby.  We use Apache's virtual server support to create a Virtual Server.  We'll assume:&lt;br /&gt;The virtual server's name is &lt;tt&gt;jecht&lt;/tt&gt;&lt;br /&gt;The server's IP address is &lt;tt&gt;192.168.0.34&lt;/tt&gt;&lt;br /&gt;The server's port is &lt;tt&gt;80&lt;/tt&gt;&lt;br /&gt;&lt;br /&gt;Create file:&lt;br /&gt;&lt;span style="color: rgb(51, 0, 153);font-family:courier new;" &gt;sites-available/jecht&lt;/span&gt;&lt;pre&gt;NameVirtualHost 192.168.0.34:80&lt;br /&gt;&amp;lt;VirtualHost 192.168.0.34:80&amp;gt;&lt;br /&gt;     ServerAdmin kbw@jecht&lt;br /&gt;     ServerName jecht:80&lt;br /&gt;     ServerAlias jecht&lt;br /&gt;     DocumentRoot /var/www/jecht/&lt;br /&gt;     ErrorLog /var/log/apache2/error.log&lt;br /&gt;     CustomLog /var/log/apache2/access.log combined&lt;br /&gt;&lt;br /&gt;     ScriptAlias /cgi-bin/ /var/www/jecht/cgi-bin/&lt;br /&gt;     &amp;lt;Directory /var/www/jecht-basic/cgi-bin/&amp;gt;&lt;br /&gt;           AllowOverride None&lt;br /&gt;           Options ExecCGI -MultiViews +SymLinksIfOwnerMatch&lt;br /&gt;           Order allow,deny&lt;br /&gt;           Allow from all&lt;br /&gt;     &amp;lt;/Directory&amp;gt;&lt;br /&gt;     RubyRequire apache/ruby-run&lt;br /&gt;     RubyRequire apache/eruby-run&lt;br /&gt;     &amp;lt;Files *.rcss&gt;&lt;br /&gt;           AddType text/css .rcss&lt;br /&gt;           AddType application/x-httpd-ruby *.rb&lt;br /&gt;           SetHandler ruby-object&lt;br /&gt;           RubyHandler Apache::ERubyRun.instance&lt;br /&gt;     &amp;lt;/Files&amp;gt;&lt;br /&gt;     &amp;lt;Files *.rhtml&amp;gt;&lt;br /&gt;           AddType text/html .rhtml&lt;br /&gt;           AddType application/x-httpd-ruby *.rb&lt;br /&gt;           SetHandler ruby-object&lt;br /&gt;           RubyHandler Apache::ERubyRun.instance&lt;br /&gt;     &amp;lt;/Files&amp;gt;&lt;br /&gt;     RubyRequire auto-reload&lt;br /&gt;&amp;lt;/virtualhost&amp;gt;&lt;br /&gt;&lt;/pre&gt;Make a soft link to this file in the &lt;tt&gt;sites-enabled&lt;/tt&gt; directory.&lt;br /&gt;&lt;span style="color: rgb(51, 0, 153);font-family:courier new;" &gt;cd /etc/apache2/sites-enabled&lt;br /&gt;ln -s ../sites-available/jecht&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Testing Embedded Ruby&lt;/span&gt;&lt;br /&gt;Embedded Ruby is Ruby code that is embedded HTML.  Apache 2 will run the Ruby code when rendering the page.&lt;br /&gt;&lt;br /&gt;Create the Embedded Ruby directory for the site:&lt;br /&gt;&lt;span style="color: rgb(51, 0, 153);font-family:courier new;" &gt;mkdir -p /var/www/jecht/mod_ruby&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Create the Embedded Ruby file to be served:&lt;br /&gt;&lt;span style="color: rgb(51, 0, 153);font-family:courier new;" &gt;/var/www/jecht/mod_ruby/demo.rhtml&lt;/span&gt;&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;&amp;lt;!DOCTYPE html&lt;br /&gt;     PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"&lt;br /&gt;     "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"&amp;gt;&lt;br /&gt;&amp;lt;html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"&amp;gt;&lt;br /&gt;&amp;lt;head&amp;gt;&lt;br /&gt;     &amp;lt;title&amp;gt;Mod Ruby&amp;lt;/title&amp;gt;&lt;br /&gt;     &amp;lt;style&amp;gt; code {&lt;br /&gt;             background-color: #ddf;&lt;br /&gt;             color: #f00;&lt;br /&gt;             padding: 0.3em;&lt;br /&gt;     } &amp;lt;/style&amp;gt;&lt;br /&gt;&amp;lt;/head&amp;gt;&lt;br /&gt;&amp;lt;body&amp;gt;&lt;br /&gt;     &amp;lt;h1&gt;Embedded Ruby&lt;br /&gt;     &amp;lt;p&amp;gt;Welcome to &amp;lt;em&amp;gt;&amp;lt;%= ENV['SERVER_NAME'] %&amp;gt;&amp;lt;/em&amp;gt; at &amp;lt;%= Time.now %&amp;gt;.&amp;lt;/p&amp;gt;&lt;br /&gt;&amp;lt;/body&amp;gt;&lt;br /&gt;&amp;lt;/html&amp;gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;View the site from:&lt;br /&gt;&lt;tt&gt;http://jecht/mod_ruby/demo.rhtml&lt;/tt&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8852689986161092936-4863703010392748172?l=keith-technotes.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://keith-technotes.blogspot.com/feeds/4863703010392748172/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8852689986161092936&amp;postID=4863703010392748172' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8852689986161092936/posts/default/4863703010392748172'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8852689986161092936/posts/default/4863703010392748172'/><link rel='alternate' type='text/html' href='http://keith-technotes.blogspot.com/2007/12/building-ruby-on-rails-website.html' title='Building a Ruby on Rails website'/><author><name>Keith</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8852689986161092936.post-2155885548758595099</id><published>2007-12-28T00:16:00.001Z</published><updated>2007-12-29T20:12:06.746Z</updated><category scheme='http://www.blogger.com/atom/ns#' term='BSD'/><category scheme='http://www.blogger.com/atom/ns#' term='GNU/Linux'/><title type='text'>Understanding PC Hard Disk Partitions</title><content type='html'>&lt;span style="font-family:arial;"&gt;Computer &lt;span style="font-family:arial;"&gt;hard disks are often divided. The names used for these divisions in the PC world is partition. In the Unix world, these divisions are called slices.&lt;br /&gt;&lt;br /&gt;The beginning of the PC hard disk contains a table which describes the partitions on the hard disk. The table is only large enough for four entries. In MS-DOS and Windows, each partition becomes a drive letter; well almost.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Partitions under DOS/Windows&lt;/span&gt;&lt;br /&gt;MS-DOS introduced a convention that allows more than four partitions to be available. The idea is the original four partitions are called Primary partitions. A new kind of partion was introduced, called the Extended partition. An Extended partition may be further divided into a large number of other partitions, called Logical partitions.&lt;br /&gt;&lt;br /&gt;So, in MS-DOS or Windows, if you wanted a disk split into a 8G C: drive, a 10G D: drive and a 16G E: drive, the partition would be as follows:&lt;br /&gt;Partition table entry 1: 8G Primary partition&lt;br /&gt;Partition table entry 2: 26G Extended partition&lt;br /&gt;The Extended partition would have a 10G Logical partition and a 16G Logical partion.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Partitions under Linux&lt;/span&gt;&lt;br /&gt;It seems Linux was designed to coexist with DOS/Windows.  Linux uses &lt;span style="color: rgb(51, 0, 153);"&gt;hd&lt;/span&gt; to prefix IDE/ATA hard disk names.  The first ATA hard disk will be &lt;span style="color: rgb(51, 0, 153);"&gt;hda&lt;/span&gt;, the second &lt;span style="color: rgb(51, 0, 153);"&gt;hdb&lt;/span&gt; and so on.&lt;br /&gt;If the partition is a primary partition, it'll have the table index. So the first primary partition on the first ATA hard disk will be &lt;span style="color: rgb(51, 0, 153);"&gt;hda1&lt;/span&gt;.&lt;br /&gt;The Extended partion takes number five and the Logical partitions six onwards.&lt;br /&gt;So, Linux, &lt;/span&gt;&lt;/span&gt;&lt;span style="font-family:arial;"&gt;&lt;span style="font-family:arial;"&gt;if you wanted the first ATA hard disk split into a 8G C: drive, a 10G D: drive and a 16G E: drive, the partition would be as follows.&lt;br /&gt;&lt;span style="color: rgb(51, 0, 153);"&gt;hda1&lt;/span&gt;: 8G&lt;br /&gt;&lt;span style="color: rgb(51, 0, 153);"&gt;hda5&lt;/span&gt;: 26G&lt;br /&gt;&lt;span style="color: rgb(51, 0, 153);"&gt;hda6&lt;/span&gt;: 10G&lt;br /&gt;&lt;span style="color: rgb(51, 0, 153);"&gt;hda7&lt;/span&gt;: 16G&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Partitions under BSD&lt;/span&gt;&lt;br /&gt;BSD and Unix predate DOS and Windows and partitions. A BSD disk divisions are called slices. A slice is futher divided into partitions. These are not to be confused with DOS/Windows/Linux partitions.&lt;br /&gt;Different disk types have different names. That's were Linux gets the idea from.  The ATA disks on my FreeBSD system are &lt;span style="color: rgb(51, 0, 153);"&gt;ad&lt;/span&gt;, where the ATA disks on my OpenBSD system are &lt;span style="color: rgb(51, 0, 153);"&gt;wd&lt;/span&gt;.&lt;br /&gt;&lt;br /&gt;Again, using my FreeBSD system as an example, it has partitions:&lt;br /&gt;&lt;span style="color: rgb(51, 0, 153);"&gt;ad0&lt;/span&gt; - ATA disk1&lt;br /&gt;&lt;span style="color: rgb(51, 0, 153);"&gt;ad0s1&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family:arial;"&gt;&lt;span style="font-family:arial;"&gt; - ATA disk1, slice 1&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 0, 153);font-family:arial;" &gt;&lt;span style="font-family:arial;"&gt;ad0s1a&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family:arial;"&gt;&lt;span style="font-family:arial;"&gt; - ATA disk1, slice 1, partition 1&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 0, 153);font-family:arial;" &gt;&lt;span style="font-family:arial;"&gt;ad0s1b&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family:arial;"&gt;&lt;span style="font-family:arial;"&gt; - ATA disk1, slice 1, partition 2&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:arial;"&gt;&lt;span style="font-family:arial;"&gt;&lt;span style="color: rgb(51, 0, 153);"&gt;ad0s1c&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 0, 153);"&gt;ad0s1d&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family:arial;"&gt;&lt;span style="font-family:arial;"&gt; - ATA disk1, slice 1, partition 3&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 0, 153);font-family:arial;" &gt;&lt;span style="font-family:arial;"&gt;ad0s1e&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family:arial;"&gt;&lt;span style="font-family:arial;"&gt; - ATA disk1, slice 1, partition 4&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 0, 153);font-family:arial;" &gt;&lt;span style="font-family:arial;"&gt;ad0s1f&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family:arial;"&gt;&lt;span style="font-family:arial;"&gt; - ATA disk1, slice 1, partition 5&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 0, 153);font-family:arial;" &gt;&lt;span style="font-family:arial;"&gt;ad0s1g&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family:arial;"&gt;&lt;span style="font-family:arial;"&gt; - ATA disk1, slice 1, partition 6&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:arial;"&gt;&lt;span style="font-family:arial;"&gt;&lt;br /&gt;And &lt;span style="color: rgb(51, 0, 153);"&gt;ad0s1c&lt;/span&gt;?, partition C is a partition that represents the entire slice.  In this instance, it's the same as &lt;span style="color: rgb(51, 0, 153);"&gt;ad0s1&lt;/span&gt;.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Summary&lt;/span&gt;&lt;br /&gt;DOS/Windows and Linux use Primary partition, Extended partition and Logical partition.&lt;br /&gt;BSD and Unix use slices and partitions.&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8852689986161092936-2155885548758595099?l=keith-technotes.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://keith-technotes.blogspot.com/feeds/2155885548758595099/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8852689986161092936&amp;postID=2155885548758595099' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8852689986161092936/posts/default/2155885548758595099'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8852689986161092936/posts/default/2155885548758595099'/><link rel='alternate' type='text/html' href='http://keith-technotes.blogspot.com/2007/12/understanding-pc-hard-disk-partitions.html' title='Understanding PC Hard Disk Partitions'/><author><name>Keith</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8852689986161092936.post-1062623292667122367</id><published>2007-12-28T00:12:00.001Z</published><updated>2008-06-25T01:03:42.328+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='GNU/Linux'/><title type='text'>Installing Debian GNU/Linux</title><content type='html'>&lt;span style="font-weight: bold;"&gt;Why Debian?&lt;/span&gt;&lt;br /&gt;Debian is an early GNU/Linux distribution that has a rigorous development cycle. The installations are highly customisable and can be made more fit for purpose, much like a &lt;a href="http://www.bsd.org/"&gt;BSD &lt;/a&gt;distribution.&lt;br /&gt;&lt;br /&gt;If you want to get started with Linux and you just want to play about with it, you could try &lt;a href="http://www.ubuntu.com/"&gt;Ubuntu&lt;/a&gt;.  But if you want to build a production server, I'd recomend Debian.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Installing&lt;/span&gt;&lt;br /&gt;Etch is the latest stable Debian release, &lt;a href="http://www.debian.org/releases/etch/debian-installer/"&gt;4.0r3&lt;/a&gt;. Download Debian etch from &lt;a href="http://www.debian.org/devel/debian-installer/"&gt;the Debian install page.&lt;/a&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Burn the ISO disks to (rewriteable) CDs and boot from disk 1.&lt;/li&gt;&lt;li&gt;Follow the installation instructions. The installer will allow you to select the kind of packages to be installed. Alternatively, you can deselect all options and go with a minimal instllation.&lt;/li&gt;&lt;/ul&gt;&lt;span style="font-weight: bold;"&gt;Installing Packages&lt;/span&gt;&lt;br /&gt;Once Debian is installed, you can use APT to install individual packages.&lt;br /&gt;&lt;br /&gt;To search for the package that contains &lt;span style="color: rgb(51, 0, 153); font-style: italic;"&gt;sudo&lt;/span&gt;, type:&lt;br /&gt;&lt;span style="color: rgb(51, 0, 153);font-family:courier new;" &gt;apt-cache search sudo&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;To install the &lt;span style="color: rgb(51, 0, 153); font-style: italic;"&gt;sudo&lt;/span&gt; package, type:&lt;br /&gt;&lt;span style="color: rgb(51, 0, 153);font-family:courier new;" &gt;apt-get install sudo&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Easy right?&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Bringing The System Up to Date&lt;/span&gt;&lt;br /&gt;Use &lt;a href="http://en.wikipedia.org/wiki/Aptitude_%28program%29"&gt;aptitude&lt;/a&gt; to get the latest list of packages.&lt;br /&gt;&lt;span style="color: rgb(51, 0, 153);font-family:courier new;" &gt;apt-get update&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Use &lt;a href="http://en.wikipedia.org/wiki/Aptitude_%28program%29"&gt;aptitude&lt;/a&gt; to upgrade the system.&lt;br /&gt;&lt;span style="color: rgb(51, 0, 153);font-family:courier new;" &gt;apt-get upgrade&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8852689986161092936-1062623292667122367?l=keith-technotes.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://keith-technotes.blogspot.com/feeds/1062623292667122367/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8852689986161092936&amp;postID=1062623292667122367' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8852689986161092936/posts/default/1062623292667122367'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8852689986161092936/posts/default/1062623292667122367'/><link rel='alternate' type='text/html' href='http://keith-technotes.blogspot.com/2007/12/installing-debian-linux.html' title='Installing Debian GNU/Linux'/><author><name>Keith</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry></feed>
