<?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>Anorgan's blog about stuff &#187; Ubuntu</title>
	<atom:link href="http://blog.anorgan.com/tag/ubuntu/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.anorgan.com</link>
	<description>...hmm</description>
	<lastBuildDate>Sun, 07 Feb 2010 00:39:44 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>Test projects viewer</title>
		<link>http://blog.anorgan.com/2009/04/05/test-projects-viewer/</link>
		<comments>http://blog.anorgan.com/2009/04/05/test-projects-viewer/#comments</comments>
		<pubDate>Sun, 05 Apr 2009 21:58:14 +0000</pubDate>
		<dc:creator>Anorgan</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Web]]></category>
		<category><![CDATA[bind9]]></category>
		<category><![CDATA[DNS]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[subdomain]]></category>
		<category><![CDATA[Ubuntu]]></category>
		<category><![CDATA[wildcard]]></category>

		<guid isPermaLink="false">http://blog.anorgan.com/?p=202</guid>
		<description><![CDATA[I have a couple of test projects in my test directory. This is where I usually put the latest wordpress, phpBB or any other script or web software I would like to test out or develop and play with. Until recently I had to access those by writing the virtual host path (www.test.local) and then [...]]]></description>
			<content:encoded><![CDATA[<div id="attachment_217" class="wp-caption alignleft" style="width: 310px"><a class="thickbox" href="/wp-content/uploads/2009/04/test_environment.jpg"><img class="size-medium wp-image-217" title="Test environment viewer" src="http://blog.anorgan.com/wp-content/uploads/2009/04/test_environment-300x224.jpg" alt="Test environment viewer" width="300" height="224" /></a><p class="wp-caption-text">Test environment viewer</p></div>
<p>I have a couple of test projects in my test directory. This is where I usually put the latest wordpress, phpBB or any other script or web software I would like to test out or develop and play with. Until recently I had to access those by writing the virtual host path (www.test.local) and then append the directory name (in.eg. /drupal). I got tired of it, and coded a nifty little &#8220;browser&#8221; which displays all of the directories and files. Combined with the DNS wildcards, you can have unlimited virtual domains without having to configure them in vhosts, setting the /etc/hosts and restarting apache server. I have included this in the zip file found at the end of this post.</p>
<p>We are using bind dns server to resolve everything that comes to the &#8220;test&#8221; domain to your machines IP address. After that, Apache takes care of the rest. And what he does is kinda cool. The .htaccess file has a set of rules to test weather the index.php exists in the requested directory (via subdomain), and if it does, he redirects us to that directory. If the index.php doesn&#8217;t exist, our &#8220;main&#8221; index.php shows the contents of that directory, so you can select any other file and run it. Let&#8217;s start.</p>
<p><span id="more-202"></span>Setting up your DNS server under Ubuntu is best described <a title="Ubuntu DNS bind" href="http://rustykruffle.com/tech-stuff/ubuntu/how-i-got-networking-and-dns-to-work-in-ubuntu-intrepid/" target="_blank">here</a>. I will only display contents of my files, so you know what to do. My hostname (/etc/hostname) is &#8220;ubuntu&#8221; and IP address of my machine is 192.168.253, so when ever you see one of those, change to your settings. To install bind, use synaptic (search for bind9), to start, stop or restart bind, pass those commands to /etc/init.d/bind9, i.e. &#8220;/etc/init.d/bind9 stop&#8221;. To edit the files I used vi, and I also had to be root, so I ran sudo -i to become one.</p>
<p><strong>/etc/hosts</strong></p>
<blockquote><p><code> 192.168.1.253 ubuntu <br />
 192.168.1.253 www.test.local test.local </code></p>
</blockquote>
<p><strong>/etc/bind/named.conf.local</strong></p>
<blockquote><p><code>acl "local" { <br />
 192.168.1.0/24; <br />
 127.0.0.1; <br />
 };<br />
 zone "test" {<br />
 type master;<br />
 file "/etc/bind/zones/db.test";<br />
 allow-query { local; };<br />
 notify no;<br />
 };<br />
 // For reverse DNS <br />
 zone "1.168.192.in-addr.arpa" {<br />
 type master;<br />
 file "/etc/bind/zones/rev.1.168.192.in-addr.arpa";<br />
 allow-query { local; };<br />
 };</code></p>
</blockquote>
<p><strong>/etc/bind/named.conf.options</strong></p>
<blockquote><p><code><br />
 options {<br />
 directory "/var/cache/bind";<br />
 forwarders {<br />
 192.168.1.254;<br />
 };<br />
 auth-nxdomain no;    # conform to RFC1035<br />
 listen-on-v6 { any; };<br />
 };</code></p>
</blockquote>
<p><strong>/etc/bind/zones/db.test</strong></p>
<blockquote><p><code>$ORIGIN .<br />
 $TTL 86400      ; 1 day<br />
 test            IN SOA  test. (<br />
 200904031  ; serial number (todays date appnded with '1')<br />
 10800      ; refresh (3 hours)<br />
 3600       ; retry (1 hour)<br />
 604800     ; expire (1 week)<br />
 86400      ; minimum (1 day)<br />
 )<br />
 $ORIGIN test.<br />
 @                       NS      ubuntu<br />
 ubuntu                  A       192.168.1.253 ;This is the hostname &amp; ip of my computer<br />
 test                    CNAME   ubuntu<br />
 *.test                  CNAME   ubuntu</code></p>
</blockquote>
<p><strong>/etc/bind/zones/rev.1.168.192.in-addr.arpa</strong></p>
<blockquote><p><code>$ORIGIN .<br />
 $TTL 86400      ; 1 day<br />
 1.168.192.in-addr.arpa  IN SOA  test. (<br />
 200904031  ; serial number (today's date appended with '1')<br />
 28800      ; refresh (8 hours)<br />
 14400      ; retry (4 hours)<br />
 3024000    ; expire (5 weeks)<br />
 86400      ; minimum (1 day)<br />
 )<br />
 $ORIGIN 1.168.192.in-addr.arpa.<br />
 @       NS      ubuntu<br />
 253     PTR     ubuntu  ;The 253 is the last octet of my machines ip address</code></p>
</blockquote>
<p>After the bind has been set up, restart it, and test it. You should make a virtual host that points to www.test.test. Now, if you type anything else as subdomain, you should get the test.test page again. Try with something.test.test, or anythingelse.test.test.  For apache setup i have &#8220;NameVirtualHost 192.168.1.253&#8243; in the main config and use</p>
<blockquote><p><code><br />
 ServerName      test.test<br />
 ServerAlias     *.test.test<br />
 DocumentRoot    "/path/to/test"<br />
 </code></p>
</blockquote>
<p>for every subdomain i need.</p>
<p>We now have our environment set up, and need the contents of the test directory displayed. For that we use the index.php to list the directories and files. The directories are linked to be the subdomains. Now, if you do get to the directory which does not include index.php, it&#8217;s contents will be displayed, and you will be able to click the file you want to run. This is handled by .htaccess. If you type the wrong subdomain, you will get a notice about missing directory. I still didn&#8217;t get directories with uppercase letters or dots to display, but this is enough.</p>
<p>I also did a brief search for the theme, and used one to display the content, so it has the feeling of a finished project, not my usual html without the css or even parts of html without the html, head and body parts <img src='http://blog.anorgan.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> . Somehow I couldn&#8217;t justify using smarty here <img src='http://blog.anorgan.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> , so i did str_replace to modify the content of the template. Here is the download link so you can put it in the /test dir and see all your projects. Tell me what you think of it.</p>
<blockquote><p><a  class="download" title="Test Environment" href="/wp-content/uploads/2009/04/test_environment.zip"></a><a href="/wp-content/uploads/2009/04/test_environment.zip">Test environment viewer</a></p>
</blockquote>
]]></content:encoded>
			<wfw:commentRss>http://blog.anorgan.com/2009/04/05/test-projects-viewer/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How I Learned to Stop using Windows and Love the Linux</title>
		<link>http://blog.anorgan.com/2008/07/03/how-i-learned-to-stop-using-windows-and-love-the-linux/</link>
		<comments>http://blog.anorgan.com/2008/07/03/how-i-learned-to-stop-using-windows-and-love-the-linux/#comments</comments>
		<pubDate>Thu, 03 Jul 2008 21:25:24 +0000</pubDate>
		<dc:creator>Anorgan</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Miscellaneous]]></category>
		<category><![CDATA[Ubuntu]]></category>
		<category><![CDATA[Windows]]></category>

		<guid isPermaLink="false">http://www.anorgan.com/blog/?p=88</guid>
		<description><![CDATA[AT THE BEGINNING: WINDOWS Ok, not windows, I have used DOS 6.2, great OS. Move to dir, type command, play game. That&#8217;s it. Then installed Win 3.1. Lol. Nice windows. Now what? Windows 95 came out, and I thought “Great, now we&#8217;ll have the abilities of DOS and nice interface of Windows”. Errrr. Soon the [...]]]></description>
			<content:encoded><![CDATA[<h1>AT THE BEGINNING: WINDOWS</h1>
<p>Ok, not windows, I have used DOS 6.2, great OS. Move to dir, type command, play game. That&#8217;s it. Then installed Win 3.1. Lol. Nice windows. Now what? Windows 95 came out, and I thought “Great, now we&#8217;ll have the abilities of DOS and nice interface of Windows”. Errrr. Soon the 98 came out, and the ME. Nope, not there yet. With XP things changed. It worked, was stable (kinda), but ever so often, I had to reinstall my system. Then Vista came out, and after installing it, I was content. Not all programs worked, but that&#8217;s normal. I hoped for it to be more compatible, more lightweight.</p>
<p>Past month I decided to let go of the MS operating systems, and go for Linux. Linux always intrigued me. I downloaded my first “flawor”, Red Hat 9, a couple of years ago. Downloaded, burned, installed. Didn&#8217;t recognize all my hardware, installing new software was a pain in the ass, and finding good software that was alternative to windows platform was hard. I learned to compile stuff, search for dependencies, uninstall, this, that, but that was not something a normal kid would go for. No games. Sorry. Fedora came out. Ok, nice. A couple more encounters with Linux (System rescue cd was a good find) couldn&#8217;t convince me to turn over to open-source. Well, Microsoft did. Vista is just too hungry for RAM. And I don&#8217;t wanna buy more RAM. I think 1 gig is enough (if you&#8217;re not gaming). The latest <a href="http://www.ubuntu.com/" target="_blank">Ubuntu</a> was downloaded, burned and ready for install.</p>
<p><span id="more-88"></span></p>
<h1>LINUX</h1>
<p>I did a backup of the system partition, formated the drive (well, actually Ubuntu did that) and installed the famous Linux distribution. Everything went well, but the GRUB didn&#8217;t want to install. One test with  System rescue disk and it&#8217;s testdisk showed the partitions, and after rewriting the partition table (oh, yes, windows fucked it up) everything was fine. The amount of time it took me to setup my system was surprising. All the necessary programs were installed, and the rest that were missing were easy to install: open up synaptic, search for software, click apply. That&#8217;s it. No restart, no going through pointless wizzard, no questions like “Are you sure u want to install?”, and so on. As I&#8217;m developing web sites, I installed the necessary server applications like apache web server, php, mysql with 3 clicks. Went to synaptic, selected the web server package, clicked apply. After the setup of the virtual servers, and configuration of the databases, I was able to access my sites. This all can literally be done in about an hour.</p>
<h1>STABILITY</h1>
<p>Using compiz fusion, cairo-dock, pidgin, indexer, Thunderbird that is always active on my desktop nr.2, and all the rest of services/demons that are active, plus OpenOffice Writer, the system monitor shows 327 mb ram in use and 20% CPU. Oh, remembered about apache server with MySql. Try that in windows. Compiz can sometime render the windows black. Then I go to reload window manager, and everything is fine again. Not nice, but maybe a bug that will be corrected in the future. No crashes so far (I managed to crash it once, when running Photoshop CS2 using <a href="http://www.codeweavers.com/products/cxlinux/" target="_blank">crossover linux</a>, but no problems  after that).</p>
<h1>GAMES</h1>
<p>Well, this is more of a problem with the industry than with the Linux, there are not a lot of games natively supporting Linux. You can run Unreal, and a couple of others. With Wine/Crossover linux, you can run windows games, like WOW.</p>
<h1>WORKFLOW</h1>
<p>A LOT better. Everything is fast, programs load fast, compiz is not only eye-candy, it helps with using the OS. The restarting of the PC after installing some programs is history. You DO need to use the console for advanced stuff, but in during “normal” work terminal is unnecessary.</p>
<h1>CONCLUSION</h1>
<p>It still is a bit early for me to make a good conclusion, but so far i have no bigger objections. My girlfriend uses my PC often to check her CDs, browse the web and the like. She almost didn&#8217;t notice it was completely different OS. I&#8217;ll try to update this post after a certain period of time, when I&#8217;ll have more experience.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.anorgan.com/2008/07/03/how-i-learned-to-stop-using-windows-and-love-the-linux/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
	</channel>
</rss>
