<?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>Its Lennys Fault &#187; linux</title>
	<atom:link href="http://itslennysfault.com/t/linux/feed" rel="self" type="application/rss+xml" />
	<link>http://itslennysfault.com</link>
	<description>Random things and stuff mostly stuff but there are still some things</description>
	<lastBuildDate>Wed, 08 Feb 2012 23:17:29 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.1.3</generator>
		<item>
		<title>Testing live sites before switching DNS / pointing the domain name</title>
		<link>http://itslennysfault.com/testing-live-sites-before-switching-dns-pointing-the-domain-name</link>
		<comments>http://itslennysfault.com/testing-live-sites-before-switching-dns-pointing-the-domain-name#comments</comments>
		<pubDate>Sat, 07 May 2011 18:29:41 +0000</pubDate>
		<dc:creator>Lenny</dc:creator>
				<category><![CDATA[Guides]]></category>
		<category><![CDATA[dns]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[os x]]></category>
		<category><![CDATA[site launch]]></category>
		<category><![CDATA[staging]]></category>
		<category><![CDATA[testing]]></category>
		<category><![CDATA[web development]]></category>
		<category><![CDATA[windows]]></category>

		<guid isPermaLink="false">http://itslennysfault.com/?p=384</guid>
		<description><![CDATA[So, you&#39;re ready to launch your site. You&#39;ve got it all set up on the production server and all you need to do is log in to your domain host and point the domain at your new server and hope everything is working. Hope everything is working? Yes, that seems to be how most developers [...]]]></description>
			<content:encoded><![CDATA[<p>So, you&#39;re ready to launch your site. You&#39;ve got it all set up on the production server and all you need to do is log in to your domain host and point the domain at your new server and hope everything is working. Hope everything is working? Yes, that seems to be how most developers think. I&#39;ve encountered several people who use this method for launching a site.</p>
<p>Fear not friends there is a simple solution that will allow you to fully test your site on the live server before switching the DNS to make it live to the rest of the world.</p>
<p><span id="more-384"></span></p>
<p>All you have to do to make this dream a reality is point your local hosts file to the ip of the new server. Then when you go to the url in your web browser the hosts file will override everything and send you to the new server. This guide is broken in to 3 sections: Mac, Windows, and Linux.</p>
<p>Before you get started you should at least have a basic understanding of DNS and how it works. At the VERY least you need to understand A records and how they work. If you don&#39;t please don&#39;t ask me just google &quot;how dns works&quot; or something to that effect and do some reading on your own.
</p>
<h3>Mac OS X</h3>
<ul>
<li>Open terminal (Applications > Utilities > Terminal)</li>
<li>type: sudo edit /private/etc/hosts</li>
<li>Enter your password</li>
<li>Edit the hosts file. (<a href="#edithost">see details below</a>)</li>
<li>Save and close the editor</li>
</ul>
<h3>Linux</h3>
<ul>
<li>Open terminal </li>
<li>type: sudo nano /etc/hosts</li>
<li>Enter your password</li>
<li>Edit the hosts file. (<a href="#edithost">see details below</a>)</li>
<li>Save and close the editor</li>
</ul>
<h3>Windows</h3>
<ul>
<li>Open a command prompt (Start > run > &quot;cmd&quot;)</li>
<li>type: notepad C:\windows\system32\drivers\etc\hosts</li>
<li>Edit the hosts file. (<a href="#edithost">see details below</a>)</li>
<li>Save and close the editor</li>
</ul>
<p><a name="edithost"></a></p>
<h3>Edit host file</h3>
<p>This part is basically the same for all 3 system. The hosts file is extremely simple. It is just an ip address and a domain name separated by a space or tab</p>
<p>
You should have something like this in the file (at the very least) this is connecting the loop back ip to the localhost host name.</p>
<p>127.0.0.1 &nbsp;&nbsp;&nbsp; localhost</p>
<p>You can associate any domain you want to any IP address and your computer will listen to your host file first before the outside world. For example if you wanted google.com to take you to my site you&#39;d do the following.</p>
<p>74.84.131.77 &nbsp;&nbsp;&nbsp; google.com</p>
<p>If my server was set up to understand requests for google.com you would see my site. Instead you&#39;ll see our site not found page.
</p>
<h3>Conclusion</h3>
<p>
Once you&#39;ve completed these steps you should be able to go to your web browser and enter the old site domain and have it pointed (just on your computer) to the new server. This will allow you to fully test the site before updating the domain / dns settings for the rest of the world to see.</p>
<p><a class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Fitslennysfault.com%2Ftesting-live-sites-before-switching-dns-pointing-the-domain-name&amp;title=Testing%20live%20sites%20before%20switching%20DNS%20%2F%20pointing%20the%20domain%20name" id="wpa2a_2"><img src="http://itslennysfault.com/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share"/></a></p>]]></content:encoded>
			<wfw:commentRss>http://itslennysfault.com/testing-live-sites-before-switching-dns-pointing-the-domain-name/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Flush DNS cache</title>
		<link>http://itslennysfault.com/flush-dns-cache</link>
		<comments>http://itslennysfault.com/flush-dns-cache#comments</comments>
		<pubDate>Sat, 07 May 2011 17:48:43 +0000</pubDate>
		<dc:creator>Lenny</dc:creator>
				<category><![CDATA[Quick Tips]]></category>
		<category><![CDATA[Troubleshooting]]></category>
		<category><![CDATA[cache]]></category>
		<category><![CDATA[dns]]></category>
		<category><![CDATA[dns cache]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[mac]]></category>
		<category><![CDATA[networking]]></category>
		<category><![CDATA[os x]]></category>
		<category><![CDATA[web development]]></category>
		<category><![CDATA[windows]]></category>

		<guid isPermaLink="false">http://itslennysfault.com/?p=381</guid>
		<description><![CDATA[Most (if not all) modern operating systems keep a local DNS cache some are pretty good at keeping them updated some aren&#39;t. Either way from time to time when making DNS changes it is useful to know how to clear your DNS cache. This is just a quick reference of how to clear DNS cache [...]]]></description>
			<content:encoded><![CDATA[<p>Most (if not all) modern operating systems keep a local DNS cache some are pretty good at keeping them updated some aren&#39;t. Either way from time to time when making DNS changes it is useful to know how to clear your DNS cache. This is just a quick reference of how to clear DNS cache on several popular operating systems.</p>
<p><span id="more-381"></span></p>
<h3>Mac OS X 10.5 and after (leopard)</h3>
<p>lookupd -flushcache</p>
<h3>Mac OS X 10.4 and before (tiger)</h3>
<p>lookupd -flushcache</p>
<h3>Windows</h3>
<p>ipconfig /flushdns</p>
<h3>Linux</h3>
<p>Depending on your distro and configuration one of the following should work fine. Don&#39;t worry regardless of your setup all of these command should be safe they just might not do anything.</p>
<p>/etc/init.d/nscd restart</p>
<p>service nscd restart</p>
<p>/etc/init.d/named restart</p>
<p>/etc/init.d/dnsmasq restart</p>
<p>nscd -i hosts</p>
<p>/etc/init.d/networking restart</p>
<p><a class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Fitslennysfault.com%2Fflush-dns-cache&amp;title=Flush%20DNS%20cache" id="wpa2a_4"><img src="http://itslennysfault.com/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share"/></a></p>]]></content:encoded>
			<wfw:commentRss>http://itslennysfault.com/flush-dns-cache/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Setup Repository on Netgear Stora</title>
		<link>http://itslennysfault.com/setup-repository-on-netgear-stora</link>
		<comments>http://itslennysfault.com/setup-repository-on-netgear-stora#comments</comments>
		<pubDate>Thu, 18 Nov 2010 18:36:46 +0000</pubDate>
		<dc:creator>Lenny</dc:creator>
				<category><![CDATA[Guides]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[netgear]]></category>
		<category><![CDATA[stora]]></category>

		<guid isPermaLink="false">http://itslennysfault.com/?p=287</guid>
		<description><![CDATA[This guide will show you how to set up ipkg (Itsy Package Management System) on your netgear stora. By the end of this article you will have full access to this repository which will allow you to install pretty much anything you want on your Netgear stora. Prerequisites Before you can start this tutorial you [...]]]></description>
			<content:encoded><![CDATA[<p>This guide will show you how to set up ipkg (Itsy Package Management  System) on your netgear stora. By the end of this article you will have  full access to this repository which will allow you to install pretty  much anything you want on your Netgear stora.</p>
<p><span id="more-287"></span><strong>Prerequisites</strong></p>
<p>Before you can start this tutorial you must have root access to your Netgear Stora. If you don&#39;t have root access to your netgear stora yet please read my article: <a href="http://itslennysfault.com/easy-way-to-get-root-on-a-netgear-stora">Easy way to get root on a Netgear Stora</a>. Once you&#39;ve gotten root access to the stora return here.</p>
<p><strong>Step 1: Move the /opt directory</strong></p>
<p>The first thing we need to do is move the /opt directory from the flash memory to the actual hard drive. The reason for doing this is because adding a repository will create much more frequent reads / writes to the opt directory as well as increase the amount of storage needed. To avoid this being a problem we will simply move this directory to the hard drive.</p>
<p>This process is very simple first you need to get persistent root access&#8230;</p>
<p>To do that simply type: sudo -E -s</p>
<p>(you will need to enter your password again)</p>
<p>Once that is done you need to go to the root directory, copy the opt directory into the home directory (which is stored on the hard drive), move the old opt directory to a backup location, and create a symbolic link to the new opt directory on the hard drive. Finally I recommend doing a quick ls to make sure everything looks right.The whole thing is as follows:</p>
<pre lang="bash">cd /
cp  -r /opt /home/opt
mv opt opt-old
ln -s /home/opt /opt
ls /</pre>
<p>The whole process should look about like this:</p>
<p><a href="http://itslennysfault.com/wp-content/uploads/2010/11/01.Netgear_stora_repository_move_Opt.jpg"><img class="aligncenter size-full wp-image-288" title="Netgear stora repository move Opt" src="http://itslennysfault.com/wp-content/uploads/2010/11/01.Netgear_stora_repository_move_Opt.jpg" alt="Netgear stora repository move Opt" width="600" height="144" /></a></p>
<p>&nbsp;</p>
<p><strong>Step 2: Download iPkg repository<br /></strong></p>
<p>Now that we got the opt directory moved we are ready to download iPkg to your stora.</p>
<p>First we&#39;re going to go to our home directory (on the hard drive) and create a tmp folder</p>
<pre lang="bash">cd ~
mkdir tmp</pre>
<p>After that is completed we will go in to the tmp directory and create a folder to download ipkg in to</p>
<pre lang="bash">cd tmp
mkdir ipkg</pre>
<p>Finally we will download the iPkg file from Optware using wget</p>
<pre lang="bash">wget http://ipkg.nslu2-linux.org/feeds/optware/cs08q1armel/cross/stable/ipkg-opt_0.99.163-10_arm.ipk</pre>
<p>Once you type this and enter it will start downloading the package&#8230; the screen should look like this.</p>
<p><a href="http://itslennysfault.com/wp-content/uploads/2010/11/02.getpackage.jpg"><img class="aligncenter size-full wp-image-289" title="Netgear Stora download repository package" src="http://itslennysfault.com/wp-content/uploads/2010/11/02.getpackage.jpg" alt="Netgear Stora download repository package" width="600" height="246" /></a></p>
<p>&nbsp;</p>
<p><strong>Step 3: Unpack and Install iPkg package manager</strong></p>
<p>First we need to unpackage the tar.gz file you just downloaded and put the files in the correct locations. type the following:</p>
<pre lang="bash">tar -xzf ipkg-opt_0.99.163-10_arm.ipk
cp ./data.tar.gz /data.tar.gz
cd /
tar -xzf data.tar.gz
rm  data.tar.gz</pre>
<p>Once you do that and all the files are in the right places we can set up the configuration and do the actual install.</p>
<p>First we need to enter the repository location in to the ipkg.conf file so it knows where to look to do this type the following:</p>
<pre lang="bash">echo src cs08q1armel http://ipkg.nslu2-linux.org/feeds/optware/cs08q1armel/cross/stable &gt;&gt; /opt/etc/ipkg.conf</pre>
<p>Once that is done we can update the repository after that it will be ready to use.</p>
<pre lang="bash">/opt/bin/ipkg update</pre>
<p>The screen should look like this when you&#39;ve finished this section&#8230;</p>
<p><a href="http://itslennysfault.com/wp-content/uploads/2010/11/03.setupPackate.jpg"><img class="aligncenter size-full wp-image-290" title="Netgear stora setup packages" src="http://itslennysfault.com/wp-content/uploads/2010/11/03.setupPackate.jpg" alt="Netgear stora setup packages" width="600" height="186" /></a></p>
<p><strong>Conclusion</strong></p>
<p>You&#39;re all set and ready to install whatever you want on your stora and begin to have some freedom from the restrictions netgear put in place. I recommend setting up the following items right away&#8230;</p>
<ul>
<li><a href="http://itslennysfault.com/setup-path-environment-variables-on-netgear-stora">Set up path / environment variables</a></li>
<li><a href="http://itslennysfault.com/install-nano-text-editor-on-netgear-stora">Install nano</a></li>
<li><a href="http://itslennysfault.com/install-gcc-compiler-on-the-netgear-stora">Install a C Compiler (GCC)</a></li>
</ul>
<p><a class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Fitslennysfault.com%2Fsetup-repository-on-netgear-stora&amp;title=Setup%20Repository%20on%20Netgear%20Stora" id="wpa2a_6"><img src="http://itslennysfault.com/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share"/></a></p>]]></content:encoded>
			<wfw:commentRss>http://itslennysfault.com/setup-repository-on-netgear-stora/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Setup Path / Environment variables on Netgear Stora</title>
		<link>http://itslennysfault.com/setup-path-environment-variables-on-netgear-stora</link>
		<comments>http://itslennysfault.com/setup-path-environment-variables-on-netgear-stora#comments</comments>
		<pubDate>Thu, 18 Nov 2010 18:34:51 +0000</pubDate>
		<dc:creator>Lenny</dc:creator>
				<category><![CDATA[Guides]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[netgear]]></category>
		<category><![CDATA[stora]]></category>

		<guid isPermaLink="false">http://itslennysfault.com/?p=297</guid>
		<description><![CDATA[To avoid having to type the full path to everything you install you need to set up the path environment variable. This is a very simple tutorial, but will save you a ton of headache once you start installing a lot of things. Important Note: Before you can follow this guide you must have root [...]]]></description>
			<content:encoded><![CDATA[<p>To avoid having to type the full path to everything you install you need  to set up the path environment variable. This is a very simple  tutorial, but will save you a ton of headache once you start installing a  lot of things.</p>
<p><span id="more-297"></span><strong>Important Note: </strong>Before you can follow this guide you must have <a href="http://itslennysfault.com/easy-way-to-get-root-on-a-netgear-stora">root access to your stora</a>.</p>
<p>To setup your path variable simply copy and paste the code below and you will be good to go.</p>
<pre lang="bash">echo "PATH=/usr/local/bin:/usr/bin:/bin:/opt/bin:/usr/sbin:/opt/sbin:/usr/sbin:/sbin" &gt; /etc/environment</pre>
<p><strong>OR</strong> if you already have nano installed you an simply edit the path using nano by typing:</p>
<pre lang="bash">nano -w /etc/environment</pre>
<p>then just copy and paste the following in to the editor PATH=/usr/local/bin:/usr/bin:/bin:/opt/bin:/usr/sbin:/opt/sbin:/usr/sbin:/sbin</p>
<p>and press CTRL+X to close and answer Y when it asks you to save</p>
<p>&nbsp;</p>
<p><strong>Finishing up</strong></p>
<p>For these changes to take effect you will need to reboot your stora using the linux shutdown command: shutdown -r now OR you can just reboot it using the web interface. Once the system comes back up you should be able to just type the name of applications instead of the full path. eg nano, ipkg, etc</p>
<p><a class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Fitslennysfault.com%2Fsetup-path-environment-variables-on-netgear-stora&amp;title=Setup%20Path%20%2F%20Environment%20variables%20on%20Netgear%20Stora" id="wpa2a_8"><img src="http://itslennysfault.com/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share"/></a></p>]]></content:encoded>
			<wfw:commentRss>http://itslennysfault.com/setup-path-environment-variables-on-netgear-stora/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Easy way to get root on a Netgear Stora</title>
		<link>http://itslennysfault.com/easy-way-to-get-root-on-a-netgear-stora</link>
		<comments>http://itslennysfault.com/easy-way-to-get-root-on-a-netgear-stora#comments</comments>
		<pubDate>Fri, 25 Jun 2010 00:42:39 +0000</pubDate>
		<dc:creator>Lenny</dc:creator>
				<category><![CDATA[Guides]]></category>
		<category><![CDATA[hack]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[nas]]></category>
		<category><![CDATA[netgear]]></category>
		<category><![CDATA[plug computing]]></category>
		<category><![CDATA[raid]]></category>
		<category><![CDATA[root]]></category>
		<category><![CDATA[stora]]></category>

		<guid isPermaLink="false">http://itslennysfault.com/?p=247</guid>
		<description><![CDATA[The Netgear Stora is a simple NAS system that allows anyone, even with no tech knowledge, to set up a simple network attached home RAID system. I plugged it in, slapped in a second hard drive, pushed the power button, and copied over my files. It was completely up and running within a few minutes. [...]]]></description>
			<content:encoded><![CDATA[<p>The Netgear Stora is a simple NAS system that allows anyone, even with no tech knowledge, to set up a simple network attached home RAID system. I plugged it in, slapped in a second hard drive, pushed the power button, and copied over my files. It was completely up and running within a few minutes. The Netgear Stora provided me an easy hot-swappable RAID system, but I wanted much more. I knew it was a fully functional, stand-alone, low-power linux server. The obvious next step was to root it.</p>
<p><span id="more-247"></span></p>
<p>Gaining root access on the Netgear Stora is amazingly easy. The first thing you need to do is get your product key. There is one located on the bottom of the device and one on the cd that came with it. Mine (for whatever reason) didn&#39;t match. For me the one on the Netgear Stora install CD was the correct one to use. This may not always be the case so try both.</p>
<p><strong>Here is a picture where to find both (I edited out my product id and replaced it with X&#39;s)</strong></p>
<div id="attachment_248" class="wp-caption aligncenter" style="width: 560px"><a href="http://itslennysfault.com/wp-content/uploads/2010/06/NetGear_Stora_bottom.jpg"><img class="size-full wp-image-248" title="NetGear Stora bottom" src="http://itslennysfault.com/wp-content/uploads/2010/06/NetGear_Stora_bottom.jpg" alt="NetGear Stora bottom" width="550" height="432" /></a><p class="wp-caption-text">NetGear Stora bottom</p></div>
<p>&nbsp;</p>
<p>&nbsp;</p>
<div id="attachment_249" class="wp-caption aligncenter" style="width: 560px"><a href="http://itslennysfault.com/wp-content/uploads/2010/06/NetGear_Stora_CD.jpg"><img class="size-full wp-image-249" title="NetGear Stora CD" src="http://itslennysfault.com/wp-content/uploads/2010/06/NetGear_Stora_CD.jpg" alt="NetGear Stora CD" width="550" height="452" /></a><p class="wp-caption-text">NetGear Stora CD</p></div>
<p>&nbsp;</p>
<p><strong>Gaining Root Access</strong></p>
<p>Now that you have your Stora product id all you need to do is login via SSH using any user you have setup on your stora that has administrator access (in the web interface). However, if you just use the user name as is you won&#39;t be allowed access. Instead you have to add &quot;_hipserv2_netgear_XXXX-XXXX-XXXX-XXXX&quot; after the user name (replace the X&#39;s with your actual product key). For my example I will use my name Lenny as the user name and all X&#39;s for the product key. Any user with the administrator access flagged in the Netgear Stora web panel will have the ability to use the sudo command to gain root access.</p>
<p><strong>Here is the process</strong></p>
<p><strong> </strong></p>
<p><strong> </strong></p>
<p><strong> </strong></p>
<p><strong></p>
<div id="attachment_250" class="wp-caption aligncenter" style="width: 610px"><a href="http://itslennysfault.com/wp-content/uploads/2010/06/NetGear_Stora_root.jpg"><img class="size-full wp-image-250" title="NetGear Stora root" src="http://itslennysfault.com/wp-content/uploads/2010/06/NetGear_Stora_root.jpg" alt="NetGear Stora root" width="600" height="404" /></a><p class="wp-caption-text">NetGear Stora root</p></div>
<p></strong></p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p><strong>Why  it works</strong></p>
<p>From what I can tell this is just a lame attempt by the developers to keep the general public form being able to shell into the device while still allowing themselves to get in for debugging / testing. It looks like the distribution of linux packaged with the Netgear Stora is shipped with a custom SSH server that appends a string including the product keys to the authorized user list.</p>
<p>I recommend setting up the following items right away&#8230;</p>
<ul>
<li><a href="http://itslennysfault.com/setup-repository-on-netgear-stora">Install a repository on your netgear stora</a></li>
<li><a href="../setup-path-environment-variables-on-netgear-stora">Set up path / environment variables</a></li>
<li><a href="../install-nano-text-editor-on-netgear-stora">Install nano</a></li>
<li><a href="../install-gcc-compiler-on-the-netgear-stora">Install a C Compiler (GCC)</a></li>
</ul>
<p>&nbsp;</p>
<p><a class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Fitslennysfault.com%2Feasy-way-to-get-root-on-a-netgear-stora&amp;title=Easy%20way%20to%20get%20root%20on%20a%20Netgear%20Stora" id="wpa2a_10"><img src="http://itslennysfault.com/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share"/></a></p>]]></content:encoded>
			<wfw:commentRss>http://itslennysfault.com/easy-way-to-get-root-on-a-netgear-stora/feed</wfw:commentRss>
		<slash:comments>9</slash:comments>
		</item>
	</channel>
</rss>

