<?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>Fedora &#187; Server</title>
	<atom:link href="http://gofedora.com/archives/category/server/feed/" rel="self" type="application/rss+xml" />
	<link>http://gofedora.com</link>
	<description>How Tos, Tutorials, Tips and Tricks</description>
	<lastBuildDate>Thu, 17 May 2012 04:44:58 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.2</generator>
		<item>
		<title>My New Book on Squid Proxy Server (A Beginner&#8217;s Guide)</title>
		<link>http://gofedora.com/book-squid-proxy-server-beginners-guide/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=book-squid-proxy-server-beginners-guide</link>
		<comments>http://gofedora.com/book-squid-proxy-server-beginners-guide/#comments</comments>
		<pubDate>Mon, 18 Apr 2011 03:32:19 +0000</pubDate>
		<dc:creator>Kulbir Saini</dc:creator>
				<category><![CDATA[Configuration]]></category>
		<category><![CDATA[HowTo]]></category>
		<category><![CDATA[Installation]]></category>
		<category><![CDATA[Internet]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Proxy Server]]></category>
		<category><![CDATA[Security]]></category>
		<category><![CDATA[Server]]></category>
		<category><![CDATA[Squid]]></category>
		<category><![CDATA[Beginner Guide]]></category>
		<category><![CDATA[Configure]]></category>
		<category><![CDATA[Install]]></category>
		<category><![CDATA[Reverse Proxy]]></category>
		<category><![CDATA[Squid 3.1]]></category>
		<category><![CDATA[Squid 3.2]]></category>
		<category><![CDATA[Squid Book]]></category>
		<category><![CDATA[Squid Guide]]></category>
		<category><![CDATA[Squid Proxy Server]]></category>
		<category><![CDATA[Transparent Proxy]]></category>

		<guid isPermaLink="false">http://gofedora.com/?p=1072</guid>
		<description><![CDATA[I have not blogged since a long time mainly because I was a bit busy authoring a book Squid Proxy Server 3.1: Beginner&#8217;s Guide for Packt Publications. The book is an introductory guide to Squid (especially the new features in Squid-3 series) covering both the basic aspects as well as the in dept details for [...]<p><a href="http://gofedora.com/">Fedora Tutorials</a> by <a href="http://saini.co.in/">Kulbir Saini</a>.</p>
]]></description>
			<content:encoded><![CDATA[<div class="addthis_toolbox addthis_default_style " addthis:url='http://gofedora.com/book-squid-proxy-server-beginners-guide/' addthis:title='My New Book on Squid Proxy Server (A Beginner&#8217;s Guide) '  ><a class="addthis_button_facebook_like" fb:like:layout="button_count"></a><a class="addthis_button_tweet"></a><a class="addthis_button_google_plusone" g:plusone:size="medium"></a><a class="addthis_counter addthis_pill_style"></a></div><p></p><p>I have not blogged since a long time mainly because I was a bit busy authoring a book <a href="http://link.packtpub.com/K7JQGy" target="_blank">Squid Proxy Server 3.1: Beginner&#8217;s Guide</a> for Packt Publications. The book is an introductory guide to <a href="http://www.squid-cache.org/" target="_blank">Squid</a> (especially the new features in Squid-3 series) covering both the basic aspects as well as the in dept details for advanced users. The book focuses on learning by doing and provides example scenarios for the concepts discussed throughout the book. Access control configuration, reverse proxying, interception proxying, authentication and other features have been discussed in details with examples.</p>
<p>Checkout the links below:</p>
<ul>
<li><a href="http://www.packtpub.com/toc/squid-proxy-server-31-beginners-guide-table-contents" target="_blank">Table of contents</a></li>
<li><a href="http://www.packtpub.com/sites/default/files/3906-chapter-3-running-squid.pdf?utm_source=packtpub&amp;utm_medium=free&amp;utm_campaign=pdf" target="_blank">Sample Chapter : Running Squid</a></li>
<li><a href="http://www.amazon.co.uk/Squid-Proxy-Server-3-1-Beginner-27s/dp/1849513902/" target="_blank">Amazon link</a></li>
</ul>
<p><a href="http://gofedora.com/">Fedora Tutorials</a> by <a href="http://saini.co.in/">Kulbir Saini</a>.</p>
<div class="addthis_toolbox addthis_default_style " addthis:url='http://gofedora.com/book-squid-proxy-server-beginners-guide/' addthis:title='My New Book on Squid Proxy Server (A Beginner&#8217;s Guide) '  ><a class="addthis_button_facebook_like" fb:like:layout="button_count"></a><a class="addthis_button_tweet"></a><a class="addthis_button_google_plusone" g:plusone:size="medium"></a><a class="addthis_counter addthis_pill_style"></a></div>]]></content:encoded>
			<wfw:commentRss>http://gofedora.com/book-squid-proxy-server-beginners-guide/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Tip: Multiproxy Switch : Easily use multiple proxies in Firefox</title>
		<link>http://gofedora.com/tip-multiproxy-switch-easily-use-multiple-proxies-in-firefox/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=tip-multiproxy-switch-easily-use-multiple-proxies-in-firefox</link>
		<comments>http://gofedora.com/tip-multiproxy-switch-easily-use-multiple-proxies-in-firefox/#comments</comments>
		<pubDate>Fri, 18 Dec 2009 22:53:46 +0000</pubDate>
		<dc:creator>Kulbir Saini</dc:creator>
				<category><![CDATA[Extensions]]></category>
		<category><![CDATA[Firefox]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Proxy Server]]></category>
		<category><![CDATA[Review]]></category>
		<category><![CDATA[Tips - Tricks]]></category>
		<category><![CDATA[Extension]]></category>
		<category><![CDATA[Firefox Extension]]></category>
		<category><![CDATA[Multiple Proxies]]></category>
		<category><![CDATA[Multiple Proxy Servers]]></category>
		<category><![CDATA[Multiproxy Switch]]></category>

		<guid isPermaLink="false">http://gofedora.com/?p=1005</guid>
		<description><![CDATA[A lot of people (especially working people with mobile devices like notebook/netbooks) need to use different proxy servers at home and office. There are several Firefox extensions available to achieve the required functionality but IMHO Multiproxy Switch(Mozilla Addon Page) is the best because Its simple and easy to use. It does what it should. No [...]<p><a href="http://gofedora.com/">Fedora Tutorials</a> by <a href="http://saini.co.in/">Kulbir Saini</a>.</p>
]]></description>
			<content:encoded><![CDATA[<div class="addthis_toolbox addthis_default_style " addthis:url='http://gofedora.com/tip-multiproxy-switch-easily-use-multiple-proxies-in-firefox/' addthis:title='Tip: Multiproxy Switch : Easily use multiple proxies in Firefox '  ><a class="addthis_button_facebook_like" fb:like:layout="button_count"></a><a class="addthis_button_tweet"></a><a class="addthis_button_google_plusone" g:plusone:size="medium"></a><a class="addthis_counter addthis_pill_style"></a></div><p></p><p>A lot of people (especially working people with mobile devices like notebook/netbooks) need to use different proxy servers at home and office. There are several Firefox extensions available to achieve the required functionality but IMHO <a href="http://multiproxyswitch.blogspot.com/" target="_blank">Multiproxy Switch</a>(<a href="https://addons.mozilla.org/en-US/firefox/addon/7330" target="_blank">Mozilla Addon Page</a>) is the best because</p>
<ol>
<li>Its simple and easy to use. It does what it should. No fancy/extra terrestrial stuff. Just switch proxies <img src='http://gofedora.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' title="Tip: Multiproxy Switch : Easily use multiple proxies in Firefox" /> </li>
<li>Easy and Firefox like interface to specify different proxies. Many extensions add their own fancy interfaces for specifying proxies which eventually suck big time.</li>
<li>I am a fan of this one. The No-Proxy list. I could never understand those regular expression based no-proxy lists in FoxyProxy. Multiproxy Switch has Firefox like No-Proxy list which rocks and understandable <img src='http://gofedora.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' title="Tip: Multiproxy Switch : Easily use multiple proxies in Firefox" /> </li>
</ol>
<p>If you happen to come across a better proxy switcher for Firefox, do let us know <img src='http://gofedora.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' title="Tip: Multiproxy Switch : Easily use multiple proxies in Firefox" /> </p>
<div id="link-ad" style="border: 1px dotted black; font-size: 11px; padding: 2px 5px;">
Get free <a href="http://www.exam-builder.com/70-562.htm">70-562 exam</a> questions with your <a href="http://www.exam-builder.com/70-431.htm">70-431 exam</a> pack. Best <a href="http://www.exam-builder.com/VCP-certification-training.htm">vcp training</a> simulations are also available.
</div>
<p><a href="http://gofedora.com/">Fedora Tutorials</a> by <a href="http://saini.co.in/">Kulbir Saini</a>.</p>
<div class="addthis_toolbox addthis_default_style " addthis:url='http://gofedora.com/tip-multiproxy-switch-easily-use-multiple-proxies-in-firefox/' addthis:title='Tip: Multiproxy Switch : Easily use multiple proxies in Firefox '  ><a class="addthis_button_facebook_like" fb:like:layout="button_count"></a><a class="addthis_button_tweet"></a><a class="addthis_button_google_plusone" g:plusone:size="medium"></a><a class="addthis_counter addthis_pill_style"></a></div>]]></content:encoded>
			<wfw:commentRss>http://gofedora.com/tip-multiproxy-switch-easily-use-multiple-proxies-in-firefox/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>How To: Install/Configure GNUMP3d &#8211; Streaming Audio Server</title>
		<link>http://gofedora.com/how-to-install-configure-gnump3d-streaming-audio-server/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=how-to-install-configure-gnump3d-streaming-audio-server</link>
		<comments>http://gofedora.com/how-to-install-configure-gnump3d-streaming-audio-server/#comments</comments>
		<pubDate>Wed, 22 Jul 2009 18:53:18 +0000</pubDate>
		<dc:creator>Kulbir Saini</dc:creator>
				<category><![CDATA[Configuration]]></category>
		<category><![CDATA[HowTo]]></category>
		<category><![CDATA[Installation]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Server]]></category>
		<category><![CDATA[GNUMP3d]]></category>
		<category><![CDATA[Media Server]]></category>
		<category><![CDATA[Music Server]]></category>
		<category><![CDATA[Streaming]]></category>

		<guid isPermaLink="false">http://gofedora.com/?p=589</guid>
		<description><![CDATA[Mission GNUMP3d is the GNU Streaming MP3/Media Server written in perl. Our mission is to setup GNUMP3d and stream audio over LAN or over internet. Below are the essential steps to install and configure GNUMP3d. Download Download latest version of GNUMP3d from GNUMP3d Website. Extract &#91;kulbirsaini@fedora ~&#93;$ tar -xjf gnump3d-x.x.tar.bz2 Install &#91;root@fedora ~&#93;$ cd gnump3d-3.0 [...]<p><a href="http://gofedora.com/">Fedora Tutorials</a> by <a href="http://saini.co.in/">Kulbir Saini</a>.</p>
]]></description>
			<content:encoded><![CDATA[<div class="addthis_toolbox addthis_default_style " addthis:url='http://gofedora.com/how-to-install-configure-gnump3d-streaming-audio-server/' addthis:title='How To: Install/Configure GNUMP3d &#8211; Streaming Audio Server '  ><a class="addthis_button_facebook_like" fb:like:layout="button_count"></a><a class="addthis_button_tweet"></a><a class="addthis_button_google_plusone" g:plusone:size="medium"></a><a class="addthis_counter addthis_pill_style"></a></div><p></p><h3><span style="text-decoration: underline;"><strong>Mission</strong></span></h3>
<p><a href="http://www.gnu.org/software/gnump3d/index.html">GNUMP3d</a> is the GNU Streaming MP3/Media Server written in perl. Our mission is to setup GNUMP3d and stream audio over LAN or over internet. Below are the essential steps to install and configure GNUMP3d.</p>
<h3><span style="text-decoration: underline;"><strong>Download</strong></span></h3>
<p>Download latest version of GNUMP3d from <a href="http://www.gnu.org/software/gnump3d/download.html">GNUMP3d Website</a>.</p>
<h3><span style="text-decoration: underline;"><strong>Extract</strong></span></h3>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #7a0874; font-weight: bold;">&#91;</span>kulbirsaini<span style="color: #000000; font-weight: bold;">@</span>fedora ~<span style="color: #7a0874; font-weight: bold;">&#93;</span>$ <span style="color: #c20cb9; font-weight: bold;">tar</span> <span style="color: #660033;">-xjf</span> gnump3d-x.x.tar.bz2</pre></div></div>

<h3><span style="text-decoration: underline;"><strong>Install</strong></span></h3>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #7a0874; font-weight: bold;">&#91;</span>root<span style="color: #000000; font-weight: bold;">@</span>fedora ~<span style="color: #7a0874; font-weight: bold;">&#93;</span>$ <span style="color: #7a0874; font-weight: bold;">cd</span> gnump3d-<span style="color: #000000;">3.0</span>
<span style="color: #7a0874; font-weight: bold;">&#91;</span>root<span style="color: #000000; font-weight: bold;">@</span>fedora ~<span style="color: #7a0874; font-weight: bold;">&#93;</span>$ <span style="color: #c20cb9; font-weight: bold;">make</span> <span style="color: #c20cb9; font-weight: bold;">install</span> <span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #c20cb9; font-weight: bold;">as</span> root<span style="color: #7a0874; font-weight: bold;">&#41;</span></pre></div></div>

<p>Now gnump3d is installed on your system. Now you need to configure it according to your taste.</p>
<h3><span style="text-decoration: underline;"><strong>Configure</strong></span></h3>
<p>The configuration file is located at <em>/etc/gnump3d/gnump3d.conf</em>. For casual use, you just need to configure <em>port</em>, <em>binding_host</em> and <em>root</em>.</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #666666; font-style: italic;"># Port to which gnump3d will be accessible via web interface or via a media player like xmms or winamp.</span>
port = <span style="color: #000000;">1111</span>
<span style="color: #666666; font-style: italic;"># The IP Address where gnump3d will bind itself.</span>
binding_host = 172.17.8.64
<span style="color: #666666; font-style: italic;"># If you want the stream to be accessible via a fully qualified domain name, set hostname variable.</span>
<span style="color: #666666; font-style: italic;"># You don't need to set this in most cases e.g. while setting up gnump3d on LAN.</span>
<span style="color: #c20cb9; font-weight: bold;">hostname</span> = gofedora.com
<span style="color: #666666; font-style: italic;"># The directory where are your music files resides.</span>
root = <span style="color: #000000; font-weight: bold;">/</span>stuff<span style="color: #000000; font-weight: bold;">/</span>Music<span style="color: #000000; font-weight: bold;">/</span></pre></div></div>

<p>Though you can skip rest of the configuration, you may try to explore other options. My <em>gnump3d.conf</em> file can be download from <a href="http://gofedora.com/wp-content/uploads/linux/gnump3d.conf">here</a>.</p>
<p>Thats all you need to do to configure gnump3d.</p>
<h3><span style="text-decoration: underline;"><strong>Indexing</strong></span></h3>
<p>Now you need to index all you music collection (the audio files in gnump3d root). Run the following command to index</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #7a0874; font-weight: bold;">&#91;</span>root<span style="color: #000000; font-weight: bold;">@</span>fedora ~<span style="color: #7a0874; font-weight: bold;">&#93;</span>$ gnump3d-index <span style="color: #660033;">--verbose</span></pre></div></div>

<h3><span style="text-decoration: underline;"><strong>Run gnump3d</strong></span></h3>
<p>Once the indexing is done, you are all set to run gnump3d. By default gnump3d tries to index all files whenever you start it, to avoid this we need to use &#8211;fast option.</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #7a0874; font-weight: bold;">&#91;</span>root<span style="color: #000000; font-weight: bold;">@</span>fedora ~<span style="color: #7a0874; font-weight: bold;">&#93;</span>$ gnump3d <span style="color: #660033;">--fast</span></pre></div></div>

<p>By default gnump3d runs in foreground. If you want it to go in background and run quietly, run it as follows.</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #7a0874; font-weight: bold;">&#91;</span>root<span style="color: #000000; font-weight: bold;">@</span>fedora ~<span style="color: #7a0874; font-weight: bold;">&#93;</span>$ gnump3d <span style="color: #660033;">--fast</span> <span style="color: #660033;">--background</span></pre></div></div>

<h3><span style="text-decoration: underline;">Accessing Media Server</span></h3>
<p>To access your gnump3d streaming media server, please visit url http://ip_address:port/ .</p>
<h3><span style="text-decoration: underline;"><strong>Run at startup</strong></span></h3>
<p>If you want gnump3d to start when your computer starts add the following line to <em>/etc/rc.local</em> file.</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">gnump3d <span style="color: #660033;">--fast</span> <span style="color: #660033;">--background</span></pre></div></div>

<p>Feel free to comment in case you have a problem.</p>
<p><a href="http://gofedora.com/">Fedora Tutorials</a> by <a href="http://saini.co.in/">Kulbir Saini</a>.</p>
<div class="addthis_toolbox addthis_default_style " addthis:url='http://gofedora.com/how-to-install-configure-gnump3d-streaming-audio-server/' addthis:title='How To: Install/Configure GNUMP3d &#8211; Streaming Audio Server '  ><a class="addthis_button_facebook_like" fb:like:layout="button_count"></a><a class="addthis_button_tweet"></a><a class="addthis_button_google_plusone" g:plusone:size="medium"></a><a class="addthis_counter addthis_pill_style"></a></div>]]></content:encoded>
			<wfw:commentRss>http://gofedora.com/how-to-install-configure-gnump3d-streaming-audio-server/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>How To: Install and Configure GitWeb</title>
		<link>http://gofedora.com/how-to-install-configure-gitweb/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=how-to-install-configure-gitweb</link>
		<comments>http://gofedora.com/how-to-install-configure-gitweb/#comments</comments>
		<pubDate>Wed, 28 Jan 2009 17:38:08 +0000</pubDate>
		<dc:creator>Kulbir Saini</dc:creator>
				<category><![CDATA[Apache]]></category>
		<category><![CDATA[Configuration]]></category>
		<category><![CDATA[Git]]></category>
		<category><![CDATA[HowTo]]></category>
		<category><![CDATA[Installation]]></category>
		<category><![CDATA[LAMP]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Server]]></category>
		<category><![CDATA[Tips - Tricks]]></category>
		<category><![CDATA[Clean URL]]></category>
		<category><![CDATA[Code Repository]]></category>
		<category><![CDATA[GitWeb]]></category>
		<category><![CDATA[Repository Browser]]></category>
		<category><![CDATA[Source Code Management]]></category>

		<guid isPermaLink="false">http://172.17.8.64/gofedora/?p=288</guid>
		<description><![CDATA[Goal Setting up gitweb (web interface for SCM software git) for your project&#8217;s git repository for public access and developer commits via ssh. Assumptions You already have your project&#8217;s git repository. You have hosting space somewhere to host gitweb. You have root access. You are using Apache as webserver. Example for this howto Project : [...]<p><a href="http://gofedora.com/">Fedora Tutorials</a> by <a href="http://saini.co.in/">Kulbir Saini</a>.</p>
]]></description>
			<content:encoded><![CDATA[<div class="addthis_toolbox addthis_default_style " addthis:url='http://gofedora.com/how-to-install-configure-gitweb/' addthis:title='How To: Install and Configure GitWeb '  ><a class="addthis_button_facebook_like" fb:like:layout="button_count"></a><a class="addthis_button_tweet"></a><a class="addthis_button_google_plusone" g:plusone:size="medium"></a><a class="addthis_counter addthis_pill_style"></a></div><p></p><h4><span style="text-decoration: underline;"><strong>Goal</strong></span></h4>
<p>Setting up gitweb (web interface for SCM software git) for your project&#8217;s git repository for public access and developer commits via ssh.</p>
<h4><span style="text-decoration: underline;"><strong>Assumptions</strong></span></h4>
<ol>
<li>You already have your project&#8217;s git repository.</li>
<li>You have hosting space somewhere to host gitweb.</li>
<li>You have root access.</li>
<li>You are using Apache as webserver.</li>
</ol>
<h4><span style="text-decoration: underline;"><strong>Example for this howto</strong></span></h4>
<p>Project : <a href="http://cachevideos.com" target="_blank">VideoCache</a><br />
Domain for gitweb : <a href="http://git.cachevideos.com" target="_blank">git.cachevideos.com</a><br />
URL for git access for videocache : <a href="http://git.cachevideos.com/videocache.git" target="_blank">http://git.cachevideos.com/videocache.git</a><br />
Actual path on server : <em>/home/saini/domains/cachevideos.com/git</em><br />
Git repository : <em>/home/saini/projects/videocache/</em></p>
<h4><span style="text-decoration: underline;"><strong>Installation</strong></span></h4>
<p>Installation is pretty easy. Just one single command would do everything.</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #7a0874; font-weight: bold;">&#91;</span>root<span style="color: #000000; font-weight: bold;">@</span>localhost ~<span style="color: #7a0874; font-weight: bold;">&#93;</span><span style="color: #666666; font-style: italic;"># yum install gitweb (do as root)</span></pre></div></div>

<p>This will create a directory <em>/var/www/git</em> which is default for gitweb.</p>
<p>Copy the directory <em>/var/www/git/</em> to <em>/home/saini/domains/cachevideos.com/git</em></p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #7a0874; font-weight: bold;">&#91;</span>root<span style="color: #000000; font-weight: bold;">@</span>localhost ~<span style="color: #7a0874; font-weight: bold;">&#93;</span><span style="color: #666666; font-style: italic;"># cp -r /var/www/git /home/saini/domains/cachevideos.com/git</span></pre></div></div>

<h4><span style="text-decoration: underline;"><strong>Configuration</strong></span></h4>
<p><span style="text-decoration: underline;"><strong>1. GitWeb</strong></span></p>
<p>Open the file <em>/etc/gitweb.conf</em> (it may or may not be there) and add the following lines to it.</p>

<div class="wp_syntax"><div class="code"><pre class="perl" style="font-family:monospace;"><span style="color: #666666; font-style: italic;"># Change This</span>
<span style="color: #0000ff;">$projectroot</span> <span style="color: #339933;">=</span> <span style="color: #ff0000;">'/home/saini/domains/cachevideos.com/git'</span><span style="color: #339933;">;</span>
<span style="color: #666666; font-style: italic;"># Change This</span>
<span style="color: #0000ff;">$site_name</span> <span style="color: #339933;">=</span> <span style="color: #ff0000;">&quot;Kulbir Saini's git trees.&quot;</span><span style="color: #339933;">;</span>
<span style="color: #666666; font-style: italic;"># Don't Change the variables below</span>
<span style="color: #0000ff;">$my_uri</span> <span style="color: #339933;">=</span> <span style="color: #ff0000;">&quot;/&quot;</span><span style="color: #339933;">;</span>
<span style="color: #0000ff;">$home_link</span> <span style="color: #339933;">=</span> <span style="color: #ff0000;">'/'</span><span style="color: #339933;">;</span>
<span style="color: #0000ff;">@stylesheets</span> <span style="color: #339933;">=</span> <span style="color: #009900;">&#40;</span><span style="color: #ff0000;">&quot;/gitweb.css&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #0000ff;">$favicon</span> <span style="color: #339933;">=</span> <span style="color: #ff0000;">&quot;/git-favicon.png&quot;</span><span style="color: #339933;">;</span>
<span style="color: #0000ff;">$logo</span> <span style="color: #339933;">=</span> <span style="color: #ff0000;">&quot;/git-logo.png&quot;</span><span style="color: #339933;">;</span></pre></div></div>

<p><span style="text-decoration: underline;"><strong>2. Apache</strong></span></p>
<p>Open the file <em>/etc/httpd/conf.d/git.conf</em> and clear all the lines that are already there and add the following lines to it</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">  DocumentRoot <span style="color: #000000; font-weight: bold;">/</span>home<span style="color: #000000; font-weight: bold;">/</span>saini<span style="color: #000000; font-weight: bold;">/</span>domains<span style="color: #000000; font-weight: bold;">/</span>cachevideos.com<span style="color: #000000; font-weight: bold;">/</span><span style="color: #c20cb9; font-weight: bold;">git</span>
  ServerName git.cachevideos.com
  ErrorLog <span style="color: #ff0000;">&quot;/home/saini/domains/cachevideos.com/logs/error_log&quot;</span>
  CustomLog <span style="color: #ff0000;">&quot;/home/saini/domains/cachevideos.com/logs/access_log&quot;</span> combined
  SetEnv  GITWEB_CONFIG  <span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>gitweb.conf
  DirectoryIndex gitweb.cgi
&nbsp;
    Allow from all
    AllowOverride all
    Order allow,deny
    Options +ExecCGI
    AddHandler cgi-script .cgi
&nbsp;
      SetHandler cgi-script
&nbsp;
    RewriteEngine on
    RewriteRule ^<span style="color: #7a0874; font-weight: bold;">&#91;</span>a-zA-Z0-<span style="color: #000000;">9</span>_\-<span style="color: #7a0874; font-weight: bold;">&#93;</span>+\.git<span style="color: #000000; font-weight: bold;">/</span>?<span style="color: #7a0874; font-weight: bold;">&#40;</span>\?.<span style="color: #000000; font-weight: bold;">*</span><span style="color: #7a0874; font-weight: bold;">&#41;</span>?$ <span style="color: #000000; font-weight: bold;">/</span>gitweb.cgi<span style="color: #000000; font-weight: bold;">%</span><span style="color: #7a0874; font-weight: bold;">&#123;</span>REQUEST_URI<span style="color: #7a0874; font-weight: bold;">&#125;</span> <span style="color: #7a0874; font-weight: bold;">&#91;</span>L,PT<span style="color: #7a0874; font-weight: bold;">&#93;</span></pre></div></div>

<p><span style="text-decoration: underline;"><strong>3. Git repository configuration</strong></span></p>
<p>Go to your git repository (<em>/home/saini/projects/videocache/</em>) and make the following changes.</p>
<p><strong>(a).</strong> Open file <em>.git/description</em> and add a short nice description for your project.</p>
<p>videocache  is  a  squid  url  rewriter plugin written in Python to facilitate youtube, metacafe, dailymotion, google, vimeo, msn soapbox,   tvuol.uol.com.br, blip.tv, break.com videos and wrzuta.pl audio caching.</p>
<p><strong>(b).</strong> Open file <em>.git/config</em> and append the following lines</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #7a0874; font-weight: bold;">&#91;</span>gitweb<span style="color: #7a0874; font-weight: bold;">&#93;</span>
  owner = <span style="color: #ff0000;">&quot;Kulbir Saini&quot;</span></pre></div></div>

<h3><span style="text-decoration: underline;"><strong>Copy project&#8217;s git repository for gitweb</strong></span></h3>
<p>Copy the <em>/home/saini/projects/videocache/.git</em> directory to <em>/home/saini/domains/cachevideos.com/git/videocache.git</em></p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #7a0874; font-weight: bold;">&#91;</span>root<span style="color: #000000; font-weight: bold;">@</span>localhost ~<span style="color: #7a0874; font-weight: bold;">&#93;</span><span style="color: #666666; font-style: italic;"># cp -r /home/saini/projects/videocache/.git /home/saini/domains/cachevideos.com/git/videocache.git</span></pre></div></div>

<h4><span style="text-decoration: underline;"><strong>Finishing Step</strong></span></h4>
<p>Restart Apache webserver.</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #7a0874; font-weight: bold;">&#91;</span>root<span style="color: #000000; font-weight: bold;">@</span>localhost ~<span style="color: #7a0874; font-weight: bold;">&#93;</span><span style="color: #666666; font-style: italic;"># service httpd restart</span></pre></div></div>

<p>Now you can browser a list of your projects&#8217; git repositories at <a href="http://git.cachevideos.com/" target="_blank">http://git.cachevideos.com/</a> .</p>
<h4><span style="text-decoration: underline;"><strong>Adding another project repository</strong></span></h4>
<p>Just copy the project repository&#8217;s .git directory to <em>/home/saini/domains/cachevideos.com/git/prjoect_name.git</em>. And it&#8217;ll be shown on the list.</p>
<h4><span style="text-decoration: underline;"><strong>Committing (pushing) to the repository</strong></span></h4>
<p>For committing to the repository via ssh use the following command.</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #666666; font-style: italic;"># Pushing everything (Please see the username)</span>
<span style="color: #7a0874; font-weight: bold;">&#91;</span>root<span style="color: #000000; font-weight: bold;">@</span>localhost videocache<span style="color: #7a0874; font-weight: bold;">&#93;</span><span style="color: #666666; font-style: italic;"># git push --all ssh://saini@git.cachevideos.com/~saini/domains/cachevideos.com/git/videocache.git</span></pre></div></div>

<p>To update tags on the remote repository use this command.</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #666666; font-style: italic;"># Pushing all tags</span>
<span style="color: #7a0874; font-weight: bold;">&#91;</span>root<span style="color: #000000; font-weight: bold;">@</span>localhost videocache<span style="color: #7a0874; font-weight: bold;">&#93;</span><span style="color: #666666; font-style: italic;"># git push --tags ssh://saini@git.cachevideos.com/~saini/domains/cachevideos.com/git/videocache.git</span></pre></div></div>

<p>Well, if you consider just the web interface and committing part for your project, thats all. But things can be fine tuned further. Below are few hacks!</p>
<p><span style="text-decoration: underline;"><strong>1. Enabling nice urls.</strong></span></p>
<p>By default the urls for browsing repository via git web are pretty crappy and difficult to remember. The <strong>RewriteRule</strong> and <strong>RewriteEngine</strong> lines in your Apache configuration file (<em>/etc/httpd/conf.d/git.conf</em>) takes care of that and produce nice and clean urls.</p>
<p>So you can browser the repository via <a href="http://git.cachevideos.com/videocache.git" target="_blank">http://git.cachevideos.com/videocache.git</a> instead of <a href="http://git.cachevideos.com/?p=videocache.git;a=summary" target="_blank">http://git.cachevideos.com/?p=videocache.git;a=summary</a>.</p>
<p><span style="text-decoration: underline;"><strong>2. Enabling remote ls (git-ls-remote or git ls-remote)</strong></span></p>
<p>This is the most trickiest part. If you try the command below, it won&#8217;t produce any output</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #7a0874; font-weight: bold;">&#91;</span>root<span style="color: #000000; font-weight: bold;">@</span>localhost ~<span style="color: #7a0874; font-weight: bold;">&#93;</span><span style="color: #666666; font-style: italic;"># git-ls-remote http://git.cachevideos.com/videocache.git</span></pre></div></div>

<p>You need to go to project&#8217;s repository in gitweb and then run the following command to update the server info for git.</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #7a0874; font-weight: bold;">&#91;</span>root<span style="color: #000000; font-weight: bold;">@</span>localhost ~<span style="color: #7a0874; font-weight: bold;">&#93;</span><span style="color: #666666; font-style: italic;"># cd /home/saini/domains/cachevideos.com/git/videocache.git/</span>
<span style="color: #7a0874; font-weight: bold;">&#91;</span>root<span style="color: #000000; font-weight: bold;">@</span>localhost ~<span style="color: #7a0874; font-weight: bold;">&#93;</span><span style="color: #666666; font-style: italic;"># git-update-server-info</span></pre></div></div>

<p>Try the ls-remote command now and it should succeed by producing all the branches and tags in the remote repository.</p>
<p>But there is a problem, you have to run the above command after every commit to the remote repository. To solve this issue, you can enable post-update hook for the project&#8217;s repository in gitweb. Use the following command to enable it.</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #7a0874; font-weight: bold;">&#91;</span>root<span style="color: #000000; font-weight: bold;">@</span>localhost ~<span style="color: #7a0874; font-weight: bold;">&#93;</span><span style="color: #666666; font-style: italic;"># cd /home/saini/domains/cachevideos.com/git/videocache.git/</span>
<span style="color: #7a0874; font-weight: bold;">&#91;</span>root<span style="color: #000000; font-weight: bold;">@</span>localhost ~<span style="color: #7a0874; font-weight: bold;">&#93;</span><span style="color: #666666; font-style: italic;"># chmod +x post-update</span></pre></div></div>

<p>The above command will update the server info automatically every time you commit.</p>
<p>Thats all you need to do for setting up gitweb. I hope this will be helpful.</p>
<p class="link-exchange">We are the world leaders in providing best <a href="http://www.thepass4sure.us/MB5-858-dumps.html">MB5-858</a> and  <a href="http://www.thepass4sure.biz/MB6-818.html">MB6-818</a> prep solutions. Our incredible offers for <a href="http://www.thepass4sure.me/MB7-840.html">MB7-840</a> and <a href="http://www.mypass4sure.info/70-297-dumps.html">70-297</a> exams are accessible at reasonable prices; <a href="http://www.pass4sures.biz/70-236-testking.html">70-236</a> is very rare in IT world sense.</p>
<p><a href="http://gofedora.com/">Fedora Tutorials</a> by <a href="http://saini.co.in/">Kulbir Saini</a>.</p>
<div class="addthis_toolbox addthis_default_style " addthis:url='http://gofedora.com/how-to-install-configure-gitweb/' addthis:title='How To: Install and Configure GitWeb '  ><a class="addthis_button_facebook_like" fb:like:layout="button_count"></a><a class="addthis_button_tweet"></a><a class="addthis_button_google_plusone" g:plusone:size="medium"></a><a class="addthis_counter addthis_pill_style"></a></div>]]></content:encoded>
			<wfw:commentRss>http://gofedora.com/how-to-install-configure-gitweb/feed/</wfw:commentRss>
		<slash:comments>12</slash:comments>
		</item>
		<item>
		<title>How To: Boot Fedora Faster</title>
		<link>http://gofedora.com/how-to-boot-fedora-faster/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=how-to-boot-fedora-faster</link>
		<comments>http://gofedora.com/how-to-boot-fedora-faster/#comments</comments>
		<pubDate>Tue, 09 Dec 2008 17:57:38 +0000</pubDate>
		<dc:creator>Kulbir Saini</dc:creator>
				<category><![CDATA[Configuration]]></category>
		<category><![CDATA[Fedora]]></category>
		<category><![CDATA[Hacks]]></category>
		<category><![CDATA[HowTo]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Python]]></category>
		<category><![CDATA[Server]]></category>
		<category><![CDATA[Shell]]></category>
		<category><![CDATA[Tips - Tricks]]></category>
		<category><![CDATA[Boot Faster]]></category>
		<category><![CDATA[Daemon Forking]]></category>
		<category><![CDATA[Fork]]></category>
		<category><![CDATA[Startup Time]]></category>
		<category><![CDATA[System Services]]></category>

		<guid isPermaLink="false">http://172.17.8.64/gofedora/?p=297</guid>
		<description><![CDATA[Note: These tricks apply to any Linux based OS. But I have tested them only on Fedora, so can&#8217;t say whether they&#8217;ll work on other Linux(s). My current Fedora installation is now almost one and a half years old. Yes. I am still using Fedora 7 I have Fedora 10 on my other machine. Coming [...]<p><a href="http://gofedora.com/">Fedora Tutorials</a> by <a href="http://saini.co.in/">Kulbir Saini</a>.</p>
]]></description>
			<content:encoded><![CDATA[<div class="addthis_toolbox addthis_default_style " addthis:url='http://gofedora.com/how-to-boot-fedora-faster/' addthis:title='How To: Boot Fedora Faster '  ><a class="addthis_button_facebook_like" fb:like:layout="button_count"></a><a class="addthis_button_tweet"></a><a class="addthis_button_google_plusone" g:plusone:size="medium"></a><a class="addthis_counter addthis_pill_style"></a></div><p></p><p><strong>Note:</strong> These tricks apply to any Linux based OS. But I have tested them only on Fedora, so can&#8217;t say whether they&#8217;ll work on other Linux(s).</p>
<p>My current Fedora installation is now almost one and a half years old. Yes. I am still using Fedora 7 <img src='http://gofedora.com/wp-includes/images/smilies/icon_biggrin.gif' alt=':D' class='wp-smiley' title="How To: Boot Fedora Faster" />  I have Fedora 10 on my other machine. Coming to the agenda, my Fedora installation has grown beyond control and I have services from named, squid, drbl, privoxy, vsftpd, vbox*, smb and what not on a personal desktop. These services really force my system startup to slow down to more than two minutes. While shutting down, its very easy to just cut the power supply but while booting up I can&#8217;t help and it frustrates me. And what frustrates me further that I have 4GB DDR2 RAM and AMD64 X2 5600+ (2.8GHz x 2) and booting time is still more than two minutes.</p>
<h4><span style="text-decoration: underline;"><strong>Agenda</strong></span></h4>
<ul>
<li>Boot Fedora faster using whatever techniques possible.</li>
</ul>
<h4><a name="hack-1"></a></h4>
<p>Remove the services from normal order and delay their execution to a later stage. So, services like network, squid, privoxy, named, vsftpd, smb etc. doesn&#8217;t make sense unless I am not logged in and using them. Let us start them after we have login screen.</p>
<p><a name="step-1-1"></a></p>
<p>Turn off all the services by using the command</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #7a0874; font-weight: bold;">&#91;</span>root<span style="color: #000000; font-weight: bold;">@</span>bordeaux ~<span style="color: #7a0874; font-weight: bold;">&#93;</span><span style="color: #666666; font-style: italic;"># chkconfig service_name off</span></pre></div></div>

<p>where service_name is the service you want to turn off.</p>
<p><a name="step-1-2"></a></p>
<p>Now create a file <em>/etc/startup.sh</em>. Enter a line like this</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #7a0874; font-weight: bold;">&#91;</span>root<span style="color: #000000; font-weight: bold;">@</span>bordeaux ~<span style="color: #7a0874; font-weight: bold;">&#93;</span><span style="color: #666666; font-style: italic;"># service service_name start</span></pre></div></div>

<p>for every service that you have turned off in the Step 1.1 and you want it to be running after your machine starts up. Now, your startup.sh file should look like this</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">service network start <span style="color: #000000; font-weight: bold;">&amp;</span>
service sshd start <span style="color: #000000; font-weight: bold;">&amp;</span>
modprobe it87 <span style="color: #000000; font-weight: bold;">&amp;</span>
modprobe k8temp <span style="color: #000000; font-weight: bold;">&amp;</span>
<span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>bin<span style="color: #000000; font-weight: bold;">/</span>iptraf <span style="color: #660033;">-s</span> eth0 <span style="color: #660033;">-B</span> <span style="color: #000000; font-weight: bold;">&amp;</span>
<span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>bin<span style="color: #000000; font-weight: bold;">/</span>iptraf <span style="color: #660033;">-s</span> lo <span style="color: #660033;">-B</span> <span style="color: #000000; font-weight: bold;">&amp;</span>
service squid start <span style="color: #000000; font-weight: bold;">&amp;</span>
service privoxy start <span style="color: #000000; font-weight: bold;">&amp;</span>
service httpd start <span style="color: #000000; font-weight: bold;">&amp;</span>
service mysqld start <span style="color: #000000; font-weight: bold;">&amp;</span>
service named start <span style="color: #000000; font-weight: bold;">&amp;</span>
service smb start <span style="color: #000000; font-weight: bold;">&amp;</span>
service vboxdrv start <span style="color: #000000; font-weight: bold;">&amp;</span>
service vboxnet start <span style="color: #000000; font-weight: bold;">&amp;</span>
service vsftpd start <span style="color: #000000; font-weight: bold;">&amp;</span></pre></div></div>

<p><a name="step-1-3"></a></p>
<p>Add the following line to <em>/etc/rc.local</em> file</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">/</span>bin<span style="color: #000000; font-weight: bold;">/</span><span style="color: #c20cb9; font-weight: bold;">bash</span> <span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>startup.sh <span style="color: #000000; font-weight: bold;">&amp;</span></pre></div></div>

<p>Done!!! Notice the &amp;s in both files. They are for execution in background so that a process can block boot process. You&#8217;ll observe a drop of 10-20 seconds in system startup time.</p>
<h4><a name="hack-2"></a></h4>
<p><strong>Problem with <a href="#hack-1">Hack #1</a></strong> : The execution is not really parallel. It executes like a process in the background. So we can&#8217;t get the real advantage of parallel execution.</p>
<p><a href="#hack-2">Hack #2</a> solves this problem. Now we don&#8217;t put processes in background. We use daemon forking to fork a separate daemon process which will start all the services for us in parallel. Here we&#8217;ll get the real advantage and startup time will decrease further.</p>
<p><a name="step-2-1"></a></p>
<p>This step is totally similar to <a href="#step-1-1">Step 1.1</a>. So skipping it.</p>
<p><a name="step-2-2"></a></p>
<p>This step is also similar to <a href="#step-1-2">Step 1.2</a>. The <em>/etc/startup.sh</em> file should look like this.</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">service network start
service xinetd start
service crond start
service anacron start
service atd start
service sshd start
service rpcbind start
service rpcgssd start
service rpcimapd start
modprobe it87
modprobe k8temp
<span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>bin<span style="color: #000000; font-weight: bold;">/</span>iptraf <span style="color: #660033;">-s</span> eth0 <span style="color: #660033;">-B</span>
<span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>bin<span style="color: #000000; font-weight: bold;">/</span>iptraf <span style="color: #660033;">-s</span> lo <span style="color: #660033;">-B</span>
service nasd start
service squid start
service privoxy start
service httpd start
service iptables start
service lm_sensors start
service mysqld start
service named start
service nfs start
service nfslock start
service smb start
service vboxdrv start
service vboxnet start
service vsftpd start
service autofs start
service smartd start</pre></div></div>

<p>Notice the absence of &amp;s in the file.</p>
<p><a name="step-2-3"></a></p>
<p>Download the attached <em>startup.py</em> file attached at the end of this post or copy paste the following code to <em>/etc/startup.py</em> file.</p>

<div class="wp_syntax"><div class="code"><pre class="python" style="font-family:monospace;"><span style="color: #808080; font-style: italic;">#!/usr/bin/env python</span>
<span style="color: #808080; font-style: italic;"># (C) Copyright 2008 Kulbir Saini</span>
<span style="color: #808080; font-style: italic;"># License : GPL</span>
<span style="color: #ff7700;font-weight:bold;">import</span> <span style="color: #dc143c;">os</span>
<span style="color: #ff7700;font-weight:bold;">import</span> <span style="color: #dc143c;">sys</span>
<span style="color: #ff7700;font-weight:bold;">def</span> fork_daemon<span style="color: black;">&#40;</span>f<span style="color: black;">&#41;</span>:
    <span style="color: #483d8b;">&quot;&quot;&quot;This function forks a daemon.&quot;&quot;&quot;</span>
    <span style="color: #808080; font-style: italic;"># Perform double fork</span>
    r = <span style="color: #483d8b;">''</span>
    <span style="color: #ff7700;font-weight:bold;">if</span> <span style="color: #dc143c;">os</span>.<span style="color: black;">fork</span><span style="color: black;">&#40;</span><span style="color: black;">&#41;</span>: <span style="color: #808080; font-style: italic;"># Parent</span>
        <span style="color: #808080; font-style: italic;"># Wait for the child so that it doesn't defunct</span>
        <span style="color: #dc143c;">os</span>.<span style="color: black;">wait</span><span style="color: black;">&#40;</span><span style="color: black;">&#41;</span>
        <span style="color: #808080; font-style: italic;"># Return a function</span>
        <span style="color: #ff7700;font-weight:bold;">return</span>  <span style="color: #ff7700;font-weight:bold;">lambda</span> <span style="color: #66cc66;">*</span>x, <span style="color: #66cc66;">**</span>kw: r
    <span style="color: #808080; font-style: italic;"># Otherwise, we are the child</span>
    <span style="color: #808080; font-style: italic;"># Perform second fork</span>
    <span style="color: #dc143c;">os</span>.<span style="color: black;">setsid</span><span style="color: black;">&#40;</span><span style="color: black;">&#41;</span>
    <span style="color: #dc143c;">os</span>.<span style="color: black;">umask</span><span style="color: black;">&#40;</span>077<span style="color: black;">&#41;</span>
    <span style="color: #dc143c;">os</span>.<span style="color: black;">chdir</span><span style="color: black;">&#40;</span><span style="color: #483d8b;">'/'</span><span style="color: black;">&#41;</span>
    <span style="color: #ff7700;font-weight:bold;">if</span> <span style="color: #dc143c;">os</span>.<span style="color: black;">fork</span><span style="color: black;">&#40;</span><span style="color: black;">&#41;</span>:
        <span style="color: #dc143c;">os</span>._exit<span style="color: black;">&#40;</span><span style="color: #ff4500;">0</span><span style="color: black;">&#41;</span>
    <span style="color: #ff7700;font-weight:bold;">def</span> wrapper<span style="color: black;">&#40;</span><span style="color: #66cc66;">*</span>args, <span style="color: #66cc66;">**</span>kwargs<span style="color: black;">&#41;</span>:
        <span style="color: #483d8b;">&quot;&quot;&quot;Wrapper function to be returned from generator.
        Executes the function bound to the generator and then
        exits the process&quot;&quot;&quot;</span>
        f<span style="color: black;">&#40;</span><span style="color: #66cc66;">*</span>args, <span style="color: #66cc66;">**</span>kwargs<span style="color: black;">&#41;</span>
        <span style="color: #dc143c;">os</span>._exit<span style="color: black;">&#40;</span><span style="color: #ff4500;">0</span><span style="color: black;">&#41;</span>
    <span style="color: #ff7700;font-weight:bold;">return</span> wrapper
&nbsp;
<span style="color: #ff7700;font-weight:bold;">def</span> start_services<span style="color: black;">&#40;</span>startup_file<span style="color: black;">&#41;</span>:
    command = <span style="color: #483d8b;">'/bin/bash '</span> + startup_file + <span style="color: #483d8b;">' &gt; /dev/null 2&gt; /dev/null '</span>
    <span style="color: #dc143c;">os</span>.<span style="color: black;">system</span><span style="color: black;">&#40;</span>command<span style="color: black;">&#41;</span>
    <span style="color: #ff7700;font-weight:bold;">return</span>
&nbsp;
<span style="color: #ff7700;font-weight:bold;">if</span> __name__ == <span style="color: #483d8b;">'__main__'</span>:
    forkd = fork_daemon<span style="color: black;">&#40;</span>start_services<span style="color: black;">&#41;</span>
    forkd<span style="color: black;">&#40;</span><span style="color: #dc143c;">sys</span>.<span style="color: black;">argv</span><span style="color: black;">&#91;</span><span style="color: #ff4500;">1</span><span style="color: black;">&#93;</span><span style="color: black;">&#41;</span>
    <span style="color: #ff7700;font-weight:bold;">print</span> <span style="color: #483d8b;">'Executing '</span>, <span style="color: #dc143c;">sys</span>.<span style="color: black;">argv</span><span style="color: black;">&#91;</span><span style="color: #ff4500;">1</span><span style="color: black;">&#93;</span>, <span style="color: #483d8b;">'[  OK  ]'</span></pre></div></div>

<p><a name="step-2-4"></a></p>
<p>Add the following line to your /etc/rc.local file.</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>bin<span style="color: #000000; font-weight: bold;">/</span>python <span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>startup.py <span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>startup.sh</pre></div></div>

<p>Thats it. Done!!! Now you&#8217;ll experience a boost of about 25-30 seconds of decrease in boot time.</p>
<p><span style="text-decoration: underline;"><strong>Stats of my machine</strong></span></p>
<p>With all services started in normal order : 2minutes.<br />
With <a href="#hack-1">Hack #1</a> : 1minute 42 seconds.<br />
With <a href="#hack-2">Hack #2</a> : 1minute.</p>
<p><strong>Warning</strong> : These hacks may break your system and can make it unusable. Use at your own risk.</p>
<p><a href="http://gofedora.com/">Fedora Tutorials</a> by <a href="http://saini.co.in/">Kulbir Saini</a>.</p>
<div class="addthis_toolbox addthis_default_style " addthis:url='http://gofedora.com/how-to-boot-fedora-faster/' addthis:title='How To: Boot Fedora Faster '  ><a class="addthis_button_facebook_like" fb:like:layout="button_count"></a><a class="addthis_button_tweet"></a><a class="addthis_button_google_plusone" g:plusone:size="medium"></a><a class="addthis_counter addthis_pill_style"></a></div>]]></content:encoded>
			<wfw:commentRss>http://gofedora.com/how-to-boot-fedora-faster/feed/</wfw:commentRss>
		<slash:comments>13</slash:comments>
		</item>
		<item>
		<title>Crack: Google Authentication Services are Vulnerable</title>
		<link>http://gofedora.com/crack-google-authentication-services-vulnerable/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=crack-google-authentication-services-vulnerable</link>
		<comments>http://gofedora.com/crack-google-authentication-services-vulnerable/#comments</comments>
		<pubDate>Fri, 05 Dec 2008 18:41:58 +0000</pubDate>
		<dc:creator>Kulbir Saini</dc:creator>
				<category><![CDATA[Bug]]></category>
		<category><![CDATA[Google]]></category>
		<category><![CDATA[Hacks]]></category>
		<category><![CDATA[Internet]]></category>
		<category><![CDATA[News]]></category>
		<category><![CDATA[Proxy Server]]></category>
		<category><![CDATA[Security]]></category>
		<category><![CDATA[Server]]></category>
		<category><![CDATA[Squid]]></category>
		<category><![CDATA[Authentication]]></category>
		<category><![CDATA[Vulnerability]]></category>

		<guid isPermaLink="false">http://172.17.8.64/gofedora/?p=306</guid>
		<description><![CDATA[There is a vulnerability in the way Google authentication service works. Whenever you login to any of the Google&#8217;s online services like GMail, Orkut, Groups, Docs, Youtube, Calendar etc., you are redirected to an authentication server which authenticates against the entered username and password and redirect back to the required service (GMail, Youtube etc.) setting [...]<p><a href="http://gofedora.com/">Fedora Tutorials</a> by <a href="http://saini.co.in/">Kulbir Saini</a>.</p>
]]></description>
			<content:encoded><![CDATA[<div class="addthis_toolbox addthis_default_style " addthis:url='http://gofedora.com/crack-google-authentication-services-vulnerable/' addthis:title='Crack: Google Authentication Services are Vulnerable '  ><a class="addthis_button_facebook_like" fb:like:layout="button_count"></a><a class="addthis_button_tweet"></a><a class="addthis_button_google_plusone" g:plusone:size="medium"></a><a class="addthis_counter addthis_pill_style"></a></div><p></p><p>There is a vulnerability in the way Google authentication service works. Whenever you login to any of the Google&#8217;s online services like GMail, Orkut, Groups, Docs, Youtube, Calendar etc., you are redirected to an authentication server which authenticates against the entered username and password and redirect back to the required service (GMail, Youtube etc.) setting the session variables.</p>
<p>Now, if you are able to grab the url used to set the session variables, you can login as the user to whom that url belongs from any machine on the Internet (need not be the machine belonging to the same subnet) without entering the username and password of the user.</p>
<p>The proxy servers in the organizations can be used to exploit this vulnerability. Squid is the most popular proxy server used. In the default configuration, squid strips the query terms of a url before logging. So, this vulnerability can&#8217;t be exploited. But if you turn off the stripping mechanism by adding the line shown below, then squid will log the complete url.</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">strip_query_terms off</pre></div></div>

<p>So, after turning stripping mechanism off, the log will contain urls which will look like this</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">http:<span style="color: #000000; font-weight: bold;">//</span>www.google.co.in<span style="color: #000000; font-weight: bold;">/</span>accounts<span style="color: #000000; font-weight: bold;">/</span>SetSID?<span style="color: #007800;">ssdc</span>=<span style="color: #000000;">1</span><span style="color: #000000; font-weight: bold;">&amp;</span>amp;<span style="color: #007800;">sidt</span>=Q5UrfB0BAAA<span style="color: #000000; font-weight: bold;">%</span>3D.oHVGErODzffQ<span style="color: #000000; font-weight: bold;">%</span>2Bms<span style="color: #000000; font-weight: bold;">%</span>2FOKfk53g5naReDKehRNHOBsmJlBu3VTNXjF03SbgX<span style="color: #000000; font-weight: bold;">%</span>2FVEEhmImhR4mlu5IAAjM<span style="color: #000000; font-weight: bold;">%</span>2BdbuXvMMSIb0oU8IGCYpnLcSNkbCIrG<span style="color: #000000; font-weight: bold;">%</span>2BQnm81YmX5<span style="color: #000000; font-weight: bold;">%</span>2Brcrq7U6Qx65<span style="color: #000000; font-weight: bold;">%</span>2F1yaQ2NzgmKD94jg0Iw13iXDen3qD5qn6L<span style="color: #000000; font-weight: bold;">%</span>2FhmmYWwTrcOeuTzGbO<span style="color: #000000; font-weight: bold;">%</span>2BAehpjEU3mrWapRafaq3b4kxyigJ68s8QrGQqZTINNE<span style="color: #000000; font-weight: bold;">%</span>2Bs<span style="color: #000000; font-weight: bold;">%</span>2BoIkZWmGt5kNzoT8fkVAsWJeu3CKFkxj4oVMngeDvpwb1nyFpsJCltOzmAr46fTxVJSpvQdx0<span style="color: #000000; font-weight: bold;">%</span>3D.BMLtjUdIDCcuszktZSvYzA<span style="color: #000000; font-weight: bold;">%</span>3D<span style="color: #000000; font-weight: bold;">%</span>3D<span style="color: #000000; font-weight: bold;">&amp;</span>amp;<span style="color: #007800;">continue</span>=http<span style="color: #000000; font-weight: bold;">%</span>3A<span style="color: #000000; font-weight: bold;">%</span>2F<span style="color: #000000; font-weight: bold;">%</span>2Fwww.orkut.com<span style="color: #000000; font-weight: bold;">%</span>2FRedirLogin.aspx<span style="color: #000000; font-weight: bold;">%</span>3Fmsg<span style="color: #000000; font-weight: bold;">%</span>3D0<span style="color: #000000; font-weight: bold;">%</span>26ts<span style="color: #000000; font-weight: bold;">%</span>3D1226148773097<span style="color: #000000; font-weight: bold;">%</span>3A1226148773386<span style="color: #000000; font-weight: bold;">%</span>3A1226148774868<span style="color: #000000; font-weight: bold;">%</span>26auth<span style="color: #000000; font-weight: bold;">%</span>3DDQAAAIcAAAC1pPE1QT4chKgrU4B3oyKZrQRkEVPtYlclpESQoXV_d9x9gdoe75Z0hfJ_22Pn5tVMR7j-uV5YCps3NB48L0bFlDeX-4PGHVT6Loztp_ru3tAy_gxDa9_YAEbz4d9CO4wD2VTKtzax9zvpGgrnJVZQfoWPkkIomUmxDtVGoH7g3fA3UjS0vdBJ2PJtgFMElso</pre></div></div>

<p>Replace <em>.co.in</em> with your tld specific to your country. If you paste this url in any browser, it&#8217;ll directly log you in and you can do whatever you want to that account. Remember that all such urls remains valid only for two minutes. So, if you use that url after two minutes, it&#8217;ll lead nowhere.</p>
<p>At the time of writing this post Orkut, Google Docs, Google Calendar, Google Books and Youtube are vulnerable.</p>
<p>So, make sure your squid has stripping mechanism turned on and your squid server is properly firewalled.</p>
<p>You can watch the Video proof for Orkut on <a href="http://blip.tv/file/1541246/">Blip.tv</a>, <a href="http://in.youtube.com/watch?v=5u81XNqSHJ4">Youtube</a>.</p>
<p><a href="http://gofedora.com/">Fedora Tutorials</a> by <a href="http://saini.co.in/">Kulbir Saini</a>.</p>
<div class="addthis_toolbox addthis_default_style " addthis:url='http://gofedora.com/crack-google-authentication-services-vulnerable/' addthis:title='Crack: Google Authentication Services are Vulnerable '  ><a class="addthis_button_facebook_like" fb:like:layout="button_count"></a><a class="addthis_button_tweet"></a><a class="addthis_button_google_plusone" g:plusone:size="medium"></a><a class="addthis_counter addthis_pill_style"></a></div>]]></content:encoded>
			<wfw:commentRss>http://gofedora.com/crack-google-authentication-services-vulnerable/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Humour: Funny Apache Logs</title>
		<link>http://gofedora.com/humour-funny-apache-logs/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=humour-funny-apache-logs</link>
		<comments>http://gofedora.com/humour-funny-apache-logs/#comments</comments>
		<pubDate>Tue, 02 Dec 2008 18:45:52 +0000</pubDate>
		<dc:creator>Kulbir Saini</dc:creator>
				<category><![CDATA[Apache]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Server]]></category>
		<category><![CDATA[Humour]]></category>
		<category><![CDATA[Log]]></category>
		<category><![CDATA[Webserver]]></category>

		<guid isPermaLink="false">http://172.17.8.64/gofedora/?p=309</guid>
		<description><![CDATA[The other day I was debugging my drupal installation and had a look at the Apache error logs. And this is what I found &#91;root@gofedora html&#93;# tail -f /var/log/httpd/error_log &#91;Fri Nov 28 21:00:16 2008&#93; &#91;warn&#93; long lost child came home! &#40;pid 23229&#41; &#91;Fri Nov 28 21:00:16 2008&#93; &#91;warn&#93; long lost child came home! &#40;pid 23230&#41; [...]<p><a href="http://gofedora.com/">Fedora Tutorials</a> by <a href="http://saini.co.in/">Kulbir Saini</a>.</p>
]]></description>
			<content:encoded><![CDATA[<div class="addthis_toolbox addthis_default_style " addthis:url='http://gofedora.com/humour-funny-apache-logs/' addthis:title='Humour: Funny Apache Logs '  ><a class="addthis_button_facebook_like" fb:like:layout="button_count"></a><a class="addthis_button_tweet"></a><a class="addthis_button_google_plusone" g:plusone:size="medium"></a><a class="addthis_counter addthis_pill_style"></a></div><p></p><p>The other day I was debugging my drupal installation and had a look at the Apache error logs. And this is what I found <img src='http://gofedora.com/wp-includes/images/smilies/icon_biggrin.gif' alt=':D' class='wp-smiley' title="Humour: Funny Apache Logs" /> </p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #7a0874; font-weight: bold;">&#91;</span>root<span style="color: #000000; font-weight: bold;">@</span>gofedora html<span style="color: #7a0874; font-weight: bold;">&#93;</span><span style="color: #666666; font-style: italic;"># tail -f /var/log/httpd/error_log</span>
<span style="color: #7a0874; font-weight: bold;">&#91;</span>Fri Nov <span style="color: #000000;">28</span> <span style="color: #000000;">21</span>:00:<span style="color: #000000;">16</span> <span style="color: #000000;">2008</span><span style="color: #7a0874; font-weight: bold;">&#93;</span> <span style="color: #7a0874; font-weight: bold;">&#91;</span>warn<span style="color: #7a0874; font-weight: bold;">&#93;</span> long lost child came home<span style="color: #000000; font-weight: bold;">!</span> <span style="color: #7a0874; font-weight: bold;">&#40;</span>pid <span style="color: #000000;">23229</span><span style="color: #7a0874; font-weight: bold;">&#41;</span>
<span style="color: #7a0874; font-weight: bold;">&#91;</span>Fri Nov <span style="color: #000000;">28</span> <span style="color: #000000;">21</span>:00:<span style="color: #000000;">16</span> <span style="color: #000000;">2008</span><span style="color: #7a0874; font-weight: bold;">&#93;</span> <span style="color: #7a0874; font-weight: bold;">&#91;</span>warn<span style="color: #7a0874; font-weight: bold;">&#93;</span> long lost child came home<span style="color: #000000; font-weight: bold;">!</span> <span style="color: #7a0874; font-weight: bold;">&#40;</span>pid <span style="color: #000000;">23230</span><span style="color: #7a0874; font-weight: bold;">&#41;</span>
<span style="color: #7a0874; font-weight: bold;">&#91;</span>Fri Nov <span style="color: #000000;">28</span> <span style="color: #000000;">21</span>:00:<span style="color: #000000;">16</span> <span style="color: #000000;">2008</span><span style="color: #7a0874; font-weight: bold;">&#93;</span> <span style="color: #7a0874; font-weight: bold;">&#91;</span>warn<span style="color: #7a0874; font-weight: bold;">&#93;</span> long lost child came home<span style="color: #000000; font-weight: bold;">!</span> <span style="color: #7a0874; font-weight: bold;">&#40;</span>pid <span style="color: #000000;">23231</span><span style="color: #7a0874; font-weight: bold;">&#41;</span>
<span style="color: #7a0874; font-weight: bold;">&#91;</span>Fri Nov <span style="color: #000000;">28</span> <span style="color: #000000;">21</span>:00:<span style="color: #000000;">16</span> <span style="color: #000000;">2008</span><span style="color: #7a0874; font-weight: bold;">&#93;</span> <span style="color: #7a0874; font-weight: bold;">&#91;</span>warn<span style="color: #7a0874; font-weight: bold;">&#93;</span> long lost child came home<span style="color: #000000; font-weight: bold;">!</span> <span style="color: #7a0874; font-weight: bold;">&#40;</span>pid <span style="color: #000000;">23232</span><span style="color: #7a0874; font-weight: bold;">&#41;</span>
<span style="color: #7a0874; font-weight: bold;">&#91;</span>Fri Nov <span style="color: #000000;">28</span> <span style="color: #000000;">21</span>:00:<span style="color: #000000;">16</span> <span style="color: #000000;">2008</span><span style="color: #7a0874; font-weight: bold;">&#93;</span> <span style="color: #7a0874; font-weight: bold;">&#91;</span>warn<span style="color: #7a0874; font-weight: bold;">&#93;</span> long lost child came home<span style="color: #000000; font-weight: bold;">!</span> <span style="color: #7a0874; font-weight: bold;">&#40;</span>pid <span style="color: #000000;">23233</span><span style="color: #7a0874; font-weight: bold;">&#41;</span>
<span style="color: #7a0874; font-weight: bold;">&#91;</span>Fri Nov <span style="color: #000000;">28</span> <span style="color: #000000;">21</span>:00:<span style="color: #000000;">16</span> <span style="color: #000000;">2008</span><span style="color: #7a0874; font-weight: bold;">&#93;</span> <span style="color: #7a0874; font-weight: bold;">&#91;</span>warn<span style="color: #7a0874; font-weight: bold;">&#93;</span> long lost child came home<span style="color: #000000; font-weight: bold;">!</span> <span style="color: #7a0874; font-weight: bold;">&#40;</span>pid <span style="color: #000000;">23234</span><span style="color: #7a0874; font-weight: bold;">&#41;</span>
<span style="color: #7a0874; font-weight: bold;">&#91;</span>Fri Nov <span style="color: #000000;">28</span> <span style="color: #000000;">21</span>:00:<span style="color: #000000;">16</span> <span style="color: #000000;">2008</span><span style="color: #7a0874; font-weight: bold;">&#93;</span> <span style="color: #7a0874; font-weight: bold;">&#91;</span>warn<span style="color: #7a0874; font-weight: bold;">&#93;</span> long lost child came home<span style="color: #000000; font-weight: bold;">!</span> <span style="color: #7a0874; font-weight: bold;">&#40;</span>pid <span style="color: #000000;">23235</span><span style="color: #7a0874; font-weight: bold;">&#41;</span>
<span style="color: #7a0874; font-weight: bold;">&#91;</span>Fri Nov <span style="color: #000000;">28</span> <span style="color: #000000;">21</span>:00:<span style="color: #000000;">16</span> <span style="color: #000000;">2008</span><span style="color: #7a0874; font-weight: bold;">&#93;</span> <span style="color: #7a0874; font-weight: bold;">&#91;</span>warn<span style="color: #7a0874; font-weight: bold;">&#93;</span> long lost child came home<span style="color: #000000; font-weight: bold;">!</span> <span style="color: #7a0874; font-weight: bold;">&#40;</span>pid <span style="color: #000000;">23236</span><span style="color: #7a0874; font-weight: bold;">&#41;</span>
<span style="color: #7a0874; font-weight: bold;">&#91;</span>Fri Nov <span style="color: #000000;">28</span> <span style="color: #000000;">21</span>:00:<span style="color: #000000;">16</span> <span style="color: #000000;">2008</span><span style="color: #7a0874; font-weight: bold;">&#93;</span> <span style="color: #7a0874; font-weight: bold;">&#91;</span>warn<span style="color: #7a0874; font-weight: bold;">&#93;</span> long lost child came home<span style="color: #000000; font-weight: bold;">!</span> <span style="color: #7a0874; font-weight: bold;">&#40;</span>pid <span style="color: #000000;">23237</span><span style="color: #7a0874; font-weight: bold;">&#41;</span>
<span style="color: #7a0874; font-weight: bold;">&#91;</span>Fri Nov <span style="color: #000000;">28</span> <span style="color: #000000;">21</span>:00:<span style="color: #000000;">16</span> <span style="color: #000000;">2008</span><span style="color: #7a0874; font-weight: bold;">&#93;</span> <span style="color: #7a0874; font-weight: bold;">&#91;</span>warn<span style="color: #7a0874; font-weight: bold;">&#93;</span> long lost child came home<span style="color: #000000; font-weight: bold;">!</span> <span style="color: #7a0874; font-weight: bold;">&#40;</span>pid <span style="color: #000000;">23238</span><span style="color: #7a0874; font-weight: bold;">&#41;</span></pre></div></div>

<p>Reminded me of famous Indian saying, &#8220;<strong>Kumbh ke mele mein khoya wapis aa gaya</strong>&#8220;.</p>
<p>And Apache logs it as a warning. You long lost child has come home. You gotta run <img src='http://gofedora.com/wp-includes/images/smilies/icon_razz.gif' alt=':P' class='wp-smiley' title="Humour: Funny Apache Logs" /> </p>
<p><a href="http://gofedora.com/">Fedora Tutorials</a> by <a href="http://saini.co.in/">Kulbir Saini</a>.</p>
<div class="addthis_toolbox addthis_default_style " addthis:url='http://gofedora.com/humour-funny-apache-logs/' addthis:title='Humour: Funny Apache Logs '  ><a class="addthis_button_facebook_like" fb:like:layout="button_count"></a><a class="addthis_button_tweet"></a><a class="addthis_button_google_plusone" g:plusone:size="medium"></a><a class="addthis_counter addthis_pill_style"></a></div>]]></content:encoded>
			<wfw:commentRss>http://gofedora.com/humour-funny-apache-logs/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>IntelligentMirror: RPM and DEB Caching Improved (0.5)</title>
		<link>http://gofedora.com/intelligentmirror-rpm-deb-caching-improved-05/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=intelligentmirror-rpm-deb-caching-improved-05</link>
		<comments>http://gofedora.com/intelligentmirror-rpm-deb-caching-improved-05/#comments</comments>
		<pubDate>Wed, 19 Nov 2008 04:15:28 +0000</pubDate>
		<dc:creator>Kulbir Saini</dc:creator>
				<category><![CDATA[Configuration]]></category>
		<category><![CDATA[GSOC]]></category>
		<category><![CDATA[Installation]]></category>
		<category><![CDATA[IntelligentMirror]]></category>
		<category><![CDATA[Open Source]]></category>
		<category><![CDATA[Proxy Server]]></category>
		<category><![CDATA[Server]]></category>
		<category><![CDATA[Squid]]></category>
		<category><![CDATA[Caching]]></category>
		<category><![CDATA[DEB]]></category>
		<category><![CDATA[Parallel Download]]></category>
		<category><![CDATA[Plugin]]></category>
		<category><![CDATA[Python]]></category>
		<category><![CDATA[RPM]]></category>
		<category><![CDATA[Script]]></category>
		<category><![CDATA[Update Script]]></category>

		<guid isPermaLink="false">http://172.17.8.64/gofedora/?p=462</guid>
		<description><![CDATA[After spending a lot of time with youtube cache, now I am trying to devote some time to update intelligentmirror with required features and enhancements that youtube cache already enjoys. In the same direction here is version 0.5 of intelligentmirror. Improvements Added max_parallel_downloads options to controll the maximum threading fetching from upstream to cache the [...]<p><a href="http://gofedora.com/">Fedora Tutorials</a> by <a href="http://saini.co.in/">Kulbir Saini</a>.</p>
]]></description>
			<content:encoded><![CDATA[<div class="addthis_toolbox addthis_default_style " addthis:url='http://gofedora.com/intelligentmirror-rpm-deb-caching-improved-05/' addthis:title='IntelligentMirror: RPM and DEB Caching Improved (0.5) '  ><a class="addthis_button_facebook_like" fb:like:layout="button_count"></a><a class="addthis_button_tweet"></a><a class="addthis_button_google_plusone" g:plusone:size="medium"></a><a class="addthis_counter addthis_pill_style"></a></div><p></p><p>After spending a lot of time with youtube cache, now I am trying to devote some time to update intelligentmirror with required features and enhancements that youtube cache already enjoys. In the same direction here is version 0.5 of intelligentmirror.</p>
<h3><span style="text-decoration: underline;"><strong>Improvements</strong></span></h3>
<ul>
<li>Added max_parallel_downloads options to controll the maximum threading fetching from upstream to cache the packages.</li>
<li>Fine grained control on logging via max_logfile_size and max_logfile_backups option.</li>
<li>Added setup script to help you install intelligentmirror. No need to execute commands one by one for installation. Just run</li>
</ul>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"> <span style="color: #7a0874; font-weight: bold;">&#91;</span>root<span style="color: #000000; font-weight: bold;">@</span>localhost<span style="color: #7a0874; font-weight: bold;">&#93;</span><span style="color: #666666; font-style: italic;"># python setup.py install [ENTER]</span></pre></div></div>

<ul>
<li>Added update script (<em>update-im</em>). So in case you decide to change the locations for caching rpm/deb packages, just run</li>
</ul>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"> <span style="color: #7a0874; font-weight: bold;">&#91;</span>root<span style="color: #000000; font-weight: bold;">@</span>localhost<span style="color: #7a0874; font-weight: bold;">&#93;</span><span style="color: #666666; font-style: italic;"># update-im [ENTER]</span></pre></div></div>

<p class="rtecenter"><strong>OR</strong></p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"> <span style="color: #7a0874; font-weight: bold;">&#91;</span>root<span style="color: #000000; font-weight: bold;">@</span>localhost<span style="color: #7a0874; font-weight: bold;">&#93;</span><span style="color: #666666; font-style: italic;"># /usr/sbin/update-im [ENTER]</span></pre></div></div>

<ul>
<li>Download scheduler similar to youtube cache is added to facilitate the download queing in case of large number of requests.</li>
<li>More informative logging.</li>
<li>cache.log is not flooding anymore with XMLRPC logs and python tracebacks.</li>
<li>Added extensive exception handling thoughout the program.</li>
</ul>
<h3><span style="text-decoration: underline;"><strong>Availability</strong></span></h3>
<ol>
<li><a href="http://kulbirsaini.fedorapeople.org/stuff/intelligentmirror/" target="_blank">RPMs for Fedora/Red Hat/Cent OS</a></li>
<li><a href="http://kulbirsaini.fedorapeople.org/stuff/intelligentmirror/" target="_blank">Source RPMs for Fedora/Red Hat/Cent OS</a></li>
<li><a href="http://kulbirsaini.fedorapeople.org/stuff/intelligentmirror/" target="_blank">Source Tar balls</a></li>
</ol>
<h3><span style="text-decoration: underline;"><strong>Installation and Configuration</strong></span></h3>
<p><a href="http://kulbirsaini.fedorapeople.org/stuff/intelligentmirror/INSTALL" target="_blank">INSTALL</a> and <a href="http://kulbirsaini.fedorapeople.org/stuff/intelligentmirror/Readme" target="_blank">README</a> files should help you throughout the installation and configuration process.</p>
<p>In case you have questions, ask them here in comments. Suggestions for improvement are welcome <img src='http://gofedora.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' title="IntelligentMirror: RPM and DEB Caching Improved (0.5)" /> </p>
<p><a href="http://gofedora.com/">Fedora Tutorials</a> by <a href="http://saini.co.in/">Kulbir Saini</a>.</p>
<div class="addthis_toolbox addthis_default_style " addthis:url='http://gofedora.com/intelligentmirror-rpm-deb-caching-improved-05/' addthis:title='IntelligentMirror: RPM and DEB Caching Improved (0.5) '  ><a class="addthis_button_facebook_like" fb:like:layout="button_count"></a><a class="addthis_button_tweet"></a><a class="addthis_button_google_plusone" g:plusone:size="medium"></a><a class="addthis_counter addthis_pill_style"></a></div>]]></content:encoded>
			<wfw:commentRss>http://gofedora.com/intelligentmirror-rpm-deb-caching-improved-05/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How To: Configure Caching Nameserver (named)</title>
		<link>http://gofedora.com/configure-caching-nameserver-named/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=configure-caching-nameserver-named</link>
		<comments>http://gofedora.com/configure-caching-nameserver-named/#comments</comments>
		<pubDate>Tue, 18 Nov 2008 18:39:48 +0000</pubDate>
		<dc:creator>Kulbir Saini</dc:creator>
				<category><![CDATA[Administration]]></category>
		<category><![CDATA[Configuration]]></category>
		<category><![CDATA[Hacks]]></category>
		<category><![CDATA[HowTo]]></category>
		<category><![CDATA[Installation]]></category>
		<category><![CDATA[Internet]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Nameserver]]></category>
		<category><![CDATA[Server]]></category>
		<category><![CDATA[Caching]]></category>
		<category><![CDATA[Caching Nameserver]]></category>
		<category><![CDATA[named]]></category>

		<guid isPermaLink="false">http://172.17.8.64/gofedora/?p=329</guid>
		<description><![CDATA[Mission To configure a caching nameserver on a local machine which will cascade to another previously configured and functional nameserver (may or may not be caching. It&#8217;ll generally be your ISP nameserver or the one provided by your organization). Advantage Reduces the delay in domain name resolution drastically as the requests for frequently accessed websites [...]<p><a href="http://gofedora.com/">Fedora Tutorials</a> by <a href="http://saini.co.in/">Kulbir Saini</a>.</p>
]]></description>
			<content:encoded><![CDATA[<div class="addthis_toolbox addthis_default_style " addthis:url='http://gofedora.com/configure-caching-nameserver-named/' addthis:title='How To: Configure Caching Nameserver (named) '  ><a class="addthis_button_facebook_like" fb:like:layout="button_count"></a><a class="addthis_button_tweet"></a><a class="addthis_button_google_plusone" g:plusone:size="medium"></a><a class="addthis_counter addthis_pill_style"></a></div><p></p><h4><span style="text-decoration: underline;"><strong>Mission</strong></span></h4>
<p>To configure a caching nameserver on a local machine which will cascade to another previously configured and functional nameserver (may or may not be caching. It&#8217;ll generally be your ISP nameserver or the one provided by your organization).</p>
<h4><span style="text-decoration: underline;"><strong>Advantage</strong></span></h4>
<ul>
<li>Reduces the delay in domain name resolution drastically as the requests for frequently accessed websites are served from cache.</li>
</ul>
<h4><span style="text-decoration: underline;"><strong>Working</strong></span></h4>
<ul>
<li><em>named</em> gets a request for domain resolution.</li>
<li>It checks whether the request can be satisfied from cache. If the answer is in cache and not stale, the request is satisfied from cache itself saving a lot of time <img src='http://gofedora.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' title="How To: Configure Caching Nameserver (named)" /> </li>
<li>If request can&#8217;t be satisfied from cache, named queries the first parent. If it replies with the answer, then named will cache the response and subsequent requests for the same domain name will be satisfied from the cache.</li>
<li>In case first parent fails to reply, named will query the second parent and so on.</li>
</ul>
<p>(<em>The working is my understanding of caching-nameserver using wireshark as traffic analysis tool and caching-nameserver may not behave exactly as explained above.</em>)</p>
<h4><span style="text-decoration: underline;"><strong>How to install</strong></span></h4>
<p><em><strong>named</strong></em> is by default on most of the systems by the package name &#8216;<em><strong>caching-nameserver</strong></em>&#8216;. If its not present on your system, install using</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #7a0874; font-weight: bold;">&#91;</span>root<span style="color: #000000; font-weight: bold;">@</span>localhost ~<span style="color: #7a0874; font-weight: bold;">&#93;</span><span style="color: #666666; font-style: italic;"># yum install caching-nameserver [ENTER]</span>
<span style="color: #666666; font-style: italic;"># If that doesn't work try this</span>
<span style="color: #7a0874; font-weight: bold;">&#91;</span>root<span style="color: #000000; font-weight: bold;">@</span>localhost ~<span style="color: #7a0874; font-weight: bold;">&#93;</span><span style="color: #666666; font-style: italic;"># yum install bind [ENTER]</span></pre></div></div>

<h4><span style="text-decoration: underline;"><strong>How to configure</strong></span></h4>
<p>The main configuration file for named resides in <em>/var/named/chroot/etc/named.caching-nameserver.conf</em> which is also soft linked from <em>/etc/named.caching-nameserver.conf</em> . named configuration file supports C/C++ style comments.</p>
<p>For a caching nameserver which will cascade to another nameserver, there is nothing much to be configured. You need to configure &#8220;<em><strong>options</strong></em>&#8221; block. Below is a configuration file for a machine with IP address 172.17.8.64 cascading to two nameserver 192.168.36.204 and 192.168.36.210. The comments inline explain what each option does.</p>

<div class="wp_syntax"><div class="code"><pre class="cpp" style="font-family:monospace;">options <span style="color: #008000;">&#123;</span>
  <span style="color: #666666;">// Set the port to 53 which is standard port for DNS.</span>
  <span style="color: #666666;">// Add the IP address on which named will listen separated by semi-colons.</span>
  <span style="color: #666666;">// It'll be your own IP address.</span>
  listen<span style="color: #000040;">-</span>on port <span style="color: #0000dd;">53</span> <span style="color: #008000;">&#123;</span>127.0.0.1<span style="color: #008080;">;</span> 172.17.8.64<span style="color: #008080;">;</span><span style="color: #008000;">&#125;</span><span style="color: #008080;">;</span>
  <span style="color: #666666;">// These are default. Leave them as it is.</span>
  directory   <span style="color: #FF0000;">&quot;/var/named&quot;</span><span style="color: #008080;">;</span>
  dump<span style="color: #000040;">-</span>file   <span style="color: #FF0000;">&quot;/var/named/data/cache_dump.db&quot;</span><span style="color: #008080;">;</span>
  statistics<span style="color: #000040;">-</span>file <span style="color: #FF0000;">&quot;/var/named/data/named_stats.txt&quot;</span><span style="color: #008080;">;</span>
  memstatistics<span style="color: #000040;">-</span>file <span style="color: #FF0000;">&quot;/var/named/data/named_mem_stats.txt&quot;</span><span style="color: #008080;">;</span>
  <span style="color: #666666;">// The machines which are allowed to query this nameserver.</span>
  <span style="color: #666666;">// Normally you'll allow only your machine. But you can allow other machines also.</span>
  <span style="color: #666666;">// The address should be separated by semi-colons. To allow a network 172.16.31.0/24,</span>
  <span style="color: #666666;">// the line would be</span>
  <span style="color: #666666;">// allow-query {localhost; 172.16.31.0/24; };</span>
  <span style="color: #666666;">// Don't forget the semi-colons.</span>
  allow<span style="color: #000040;">-</span>query     <span style="color: #008000;">&#123;</span> localhost<span style="color: #008080;">;</span> 172.17.8.64<span style="color: #008080;">;</span> <span style="color: #008000;">&#125;</span><span style="color: #008080;">;</span>
  recursion yes<span style="color: #008080;">;</span>
  <span style="color: #666666;">// The parent nameservers. List all the nameserver which you can query.</span>
  forwarders <span style="color: #008000;">&#123;</span> 192.168.36.204<span style="color: #008080;">;</span> 192.168.36.210<span style="color: #008080;">;</span> <span style="color: #008000;">&#125;</span><span style="color: #008080;">;</span>
  forward first<span style="color: #008080;">;</span>
<span style="color: #008000;">&#125;</span><span style="color: #008080;">;</span>
logging <span style="color: #008000;">&#123;</span>
        channel default_debug <span style="color: #008000;">&#123;</span>
                file <span style="color: #FF0000;">&quot;data/named.run&quot;</span><span style="color: #008080;">;</span>
                severity dynamic<span style="color: #008080;">;</span>
        <span style="color: #008000;">&#125;</span><span style="color: #008080;">;</span>
<span style="color: #008000;">&#125;</span><span style="color: #008080;">;</span>
zone <span style="color: #FF0000;">&quot;.&quot;</span> IN <span style="color: #008000;">&#123;</span>
  type hint<span style="color: #008080;">;</span>
  file <span style="color: #FF0000;">&quot;named.ca&quot;</span><span style="color: #008080;">;</span>
<span style="color: #008000;">&#125;</span><span style="color: #008080;">;</span>
include <span style="color: #FF0000;">&quot;/etc/named.rfc1912.zones&quot;</span><span style="color: #008080;">;</span></pre></div></div>

<h4><span style="text-decoration: underline;"><strong>Start caching-nameserver</strong></span></h4>
<p>Now start the caching-nameserver using the following command</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #7a0874; font-weight: bold;">&#91;</span>root<span style="color: #000000; font-weight: bold;">@</span>localhost ~<span style="color: #7a0874; font-weight: bold;">&#93;</span><span style="color: #666666; font-style: italic;"># server named start [ENTER]</span></pre></div></div>

<p class="rtecenter"><strong>OR</strong></p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #7a0874; font-weight: bold;">&#91;</span>root<span style="color: #000000; font-weight: bold;">@</span>localhost ~<span style="color: #7a0874; font-weight: bold;">&#93;</span><span style="color: #666666; font-style: italic;"># /etc/init.d/named start [ENTER]</span></pre></div></div>

<p>To make named start every time your reboot your machine use following command</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #7a0874; font-weight: bold;">&#91;</span>root<span style="color: #000000; font-weight: bold;">@</span>localhost ~<span style="color: #7a0874; font-weight: bold;">&#93;</span><span style="color: #666666; font-style: italic;"># chkconfig named on [ENTER]</span></pre></div></div>

<h4><span style="text-decoration: underline;"><strong>Using caching-nameserver</strong></span></h4>
<p>To use your caching-nameserver, open /etc/resolv.conf file and add the following line</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">nameserver 127.0.0.1</pre></div></div>

<p>Comment all other lines in the file, so that finally the file looks like</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">; generated by <span style="color: #000000; font-weight: bold;">/</span>sbin<span style="color: #000000; font-weight: bold;">/</span>dhclient-script
<span style="color: #666666; font-style: italic;">#search wlan.iiit.ac.in</span>
<span style="color: #666666; font-style: italic;">#nameserver 192.168.36.204</span>
<span style="color: #666666; font-style: italic;">#nameserver 192.168.36.210</span>
nameserver 127.0.0.1</pre></div></div>

<p>Now your system will use your own nameserver (in caching mode) for resolving all domain names. To test if your nameserver use the following command</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #7a0874; font-weight: bold;">&#91;</span>root<span style="color: #000000; font-weight: bold;">@</span>localhost ~<span style="color: #7a0874; font-weight: bold;">&#93;</span><span style="color: #666666; font-style: italic;"># dig fedora.co.in [ENTER]</span></pre></div></div>

<p>Now if you use that command for the second time, the resolution time will be around 2-3 milli seconds while first time it would be around 400-700 milli seconds.</p>
<p><span style="text-decoration: underline;"><strong>Example</strong></span></p>
<p>Below is two subsequent runs of dig for fedora.co.in . Notice the Query time.</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #7a0874; font-weight: bold;">&#91;</span>root<span style="color: #000000; font-weight: bold;">@</span>bordeaux SPECS<span style="color: #7a0874; font-weight: bold;">&#93;</span><span style="color: #666666; font-style: italic;"># dig fedora.co.in</span>
; <span style="color: #000000; font-weight: bold;">&amp;</span>lt;<span style="color: #000000; font-weight: bold;">&amp;</span>lt;<span style="color: #000000; font-weight: bold;">&amp;</span>gt;<span style="color: #000000; font-weight: bold;">&amp;</span>gt; DiG 9.4.2rc1 <span style="color: #000000; font-weight: bold;">&amp;</span>lt;<span style="color: #000000; font-weight: bold;">&amp;</span>lt;<span style="color: #000000; font-weight: bold;">&amp;</span>gt;<span style="color: #000000; font-weight: bold;">&amp;</span>gt; fedora.co.in
<span style="color: #000000; font-weight: bold;">;;</span> global options:  printcmd
<span style="color: #000000; font-weight: bold;">;;</span> Got answer:
<span style="color: #000000; font-weight: bold;">;;</span> -<span style="color: #000000; font-weight: bold;">&amp;</span>gt;<span style="color: #000000; font-weight: bold;">&amp;</span>gt;HEADER<span style="color: #000000; font-weight: bold;">&amp;</span>lt;<span style="color: #000000; font-weight: bold;">&amp;</span>lt;- opcode: QUERY, status: NOERROR, <span style="color: #c20cb9; font-weight: bold;">id</span>: <span style="color: #000000;">7839</span>
<span style="color: #000000; font-weight: bold;">;;</span> flags: qr rd ra; QUERY: <span style="color: #000000;">1</span>, ANSWER: <span style="color: #000000;">1</span>, AUTHORITY: <span style="color: #000000;">1</span>, ADDITIONAL: <span style="color: #000000;">1</span>
<span style="color: #000000; font-weight: bold;">;;</span> QUESTION SECTION:
;fedora.co.in.                  IN      A
<span style="color: #000000; font-weight: bold;">;;</span> ANSWER SECTION:
fedora.co.in.           <span style="color: #000000;">83629</span>   IN      A       72.249.126.241
<span style="color: #000000; font-weight: bold;">;;</span> AUTHORITY SECTION:
fedora.co.in.           <span style="color: #000000;">79709</span>   IN      NS      ns.fedora.co.in.
<span style="color: #000000; font-weight: bold;">;;</span> ADDITIONAL SECTION:
ns.fedora.co.in.        <span style="color: #000000;">79709</span>   IN      A       72.249.126.241
<span style="color: #000000; font-weight: bold;">;;</span> Query <span style="color: #000000; font-weight: bold;">time</span>: <span style="color: #000000;">531</span> msec
<span style="color: #000000; font-weight: bold;">;;</span> SERVER: 127.0.0.1<span style="color: #666666; font-style: italic;">#53(127.0.0.1)</span>
<span style="color: #000000; font-weight: bold;">;;</span> WHEN: Wed Nov <span style="color: #000000;">19</span> <span style="color: #000000;">18</span>:04:<span style="color: #000000;">47</span> <span style="color: #000000;">2008</span>
<span style="color: #000000; font-weight: bold;">;;</span> MSG SIZE  rcvd: <span style="color: #000000;">79</span>
<span style="color: #7a0874; font-weight: bold;">&#91;</span>root<span style="color: #000000; font-weight: bold;">@</span>bordeaux SPECS<span style="color: #7a0874; font-weight: bold;">&#93;</span><span style="color: #666666; font-style: italic;"># dig fedora.co.in</span>
; <span style="color: #000000; font-weight: bold;">&amp;</span>lt;<span style="color: #000000; font-weight: bold;">&amp;</span>lt;<span style="color: #000000; font-weight: bold;">&amp;</span>gt;<span style="color: #000000; font-weight: bold;">&amp;</span>gt; DiG 9.4.2rc1 <span style="color: #000000; font-weight: bold;">&amp;</span>lt;<span style="color: #000000; font-weight: bold;">&amp;</span>lt;<span style="color: #000000; font-weight: bold;">&amp;</span>gt;<span style="color: #000000; font-weight: bold;">&amp;</span>gt; fedora.co.in
<span style="color: #000000; font-weight: bold;">;;</span> global options:  printcmd
<span style="color: #000000; font-weight: bold;">;;</span> Got answer:
<span style="color: #000000; font-weight: bold;">;;</span> -<span style="color: #000000; font-weight: bold;">&amp;</span>gt;<span style="color: #000000; font-weight: bold;">&amp;</span>gt;HEADER<span style="color: #000000; font-weight: bold;">&amp;</span>lt;<span style="color: #000000; font-weight: bold;">&amp;</span>lt;- opcode: QUERY, status: NOERROR, <span style="color: #c20cb9; font-weight: bold;">id</span>: <span style="color: #000000;">64233</span>
<span style="color: #000000; font-weight: bold;">;;</span> flags: qr rd ra; QUERY: <span style="color: #000000;">1</span>, ANSWER: <span style="color: #000000;">1</span>, AUTHORITY: <span style="color: #000000;">1</span>, ADDITIONAL: <span style="color: #000000;">1</span>
<span style="color: #000000; font-weight: bold;">;;</span> QUESTION SECTION:
;fedora.co.in.                  IN      A
<span style="color: #000000; font-weight: bold;">;;</span> ANSWER SECTION:
fedora.co.in.           <span style="color: #000000;">83625</span>   IN      A       72.249.126.241
<span style="color: #000000; font-weight: bold;">;;</span> AUTHORITY SECTION:
fedora.co.in.           <span style="color: #000000;">79705</span>   IN      NS      ns.fedora.co.in.
<span style="color: #000000; font-weight: bold;">;;</span> ADDITIONAL SECTION:
ns.fedora.co.in.        <span style="color: #000000;">79705</span>   IN      A       72.249.126.241
<span style="color: #000000; font-weight: bold;">;;</span> Query <span style="color: #000000; font-weight: bold;">time</span>: <span style="color: #000000;">1</span> msec
<span style="color: #000000; font-weight: bold;">;;</span> SERVER: 127.0.0.1<span style="color: #666666; font-style: italic;">#53(127.0.0.1)</span>
<span style="color: #000000; font-weight: bold;">;;</span> WHEN: Wed Nov <span style="color: #000000;">19</span> <span style="color: #000000;">18</span>:04:<span style="color: #000000;">51</span> <span style="color: #000000;">2008</span>
<span style="color: #000000; font-weight: bold;">;;</span> MSG SIZE  rcvd: <span style="color: #000000;">79</span>
<span style="color: #7a0874; font-weight: bold;">&#91;</span>root<span style="color: #000000; font-weight: bold;">@</span>bordeaux SPECS<span style="color: #7a0874; font-weight: bold;">&#93;</span><span style="color: #666666; font-style: italic;">#</span></pre></div></div>

<p><a href="http://gofedora.com/">Fedora Tutorials</a> by <a href="http://saini.co.in/">Kulbir Saini</a>.</p>
<div class="addthis_toolbox addthis_default_style " addthis:url='http://gofedora.com/configure-caching-nameserver-named/' addthis:title='How To: Configure Caching Nameserver (named) '  ><a class="addthis_button_facebook_like" fb:like:layout="button_count"></a><a class="addthis_button_tweet"></a><a class="addthis_button_google_plusone" g:plusone:size="medium"></a><a class="addthis_counter addthis_pill_style"></a></div>]]></content:encoded>
			<wfw:commentRss>http://gofedora.com/configure-caching-nameserver-named/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>IntelligentMirror Gets Even More Intelligent (1.0.1)</title>
		<link>http://gofedora.com/intelligentmirror-intelligent-1-0-1/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=intelligentmirror-intelligent-1-0-1</link>
		<comments>http://gofedora.com/intelligentmirror-intelligent-1-0-1/#comments</comments>
		<pubDate>Tue, 23 Sep 2008 04:09:14 +0000</pubDate>
		<dc:creator>Kulbir Saini</dc:creator>
				<category><![CDATA[Configuration]]></category>
		<category><![CDATA[GSOC]]></category>
		<category><![CDATA[Installation]]></category>
		<category><![CDATA[IntelligentMirror]]></category>
		<category><![CDATA[Open Source]]></category>
		<category><![CDATA[Proxy Server]]></category>
		<category><![CDATA[Server]]></category>
		<category><![CDATA[Squid]]></category>
		<category><![CDATA[Caching]]></category>
		<category><![CDATA[DEB]]></category>
		<category><![CDATA[Plugin]]></category>
		<category><![CDATA[Python]]></category>
		<category><![CDATA[RPM]]></category>

		<guid isPermaLink="false">http://172.17.8.64/gofedora/?p=456</guid>
		<description><![CDATA[Warning : This version of IntelligentMirror is compatible with only squid-2.7 as of now. It is NOT compatible even with squid-3.0. IntelligentMirror Version 1.0.1 I have been following squid development regularly (at least the part in which I am interested) and they have introduced a new directive in squid-2.7 known as StoreUrlRewrite (storeurl_rewrite_program). Using this [...]<p><a href="http://gofedora.com/">Fedora Tutorials</a> by <a href="http://saini.co.in/">Kulbir Saini</a>.</p>
]]></description>
			<content:encoded><![CDATA[<div class="addthis_toolbox addthis_default_style " addthis:url='http://gofedora.com/intelligentmirror-intelligent-1-0-1/' addthis:title='IntelligentMirror Gets Even More Intelligent (1.0.1) '  ><a class="addthis_button_facebook_like" fb:like:layout="button_count"></a><a class="addthis_button_tweet"></a><a class="addthis_button_google_plusone" g:plusone:size="medium"></a><a class="addthis_counter addthis_pill_style"></a></div><p></p><p><strong><span style="color: red;">Warning : This version of IntelligentMirror is compatible with only squid-2.7 as of now. It is NOT compatible even with squid-3.0.</span></strong></p>
<h3><span style="text-decoration: underline;"><strong>IntelligentMirror Version 1.0.1</strong></span></h3>
<p>I have been following squid development regularly (at least the part in which I am interested) and they have introduced a new directive in squid-2.7 known as StoreUrlRewrite (storeurl_rewrite_program). Using this directive you can instruct squid to cache url A (http://abc.com/foo/bar/version/crap.rpm) as url B (http://proxy.fedora.co.in/intelligentmirror/crap.rpm). In simple words you can direct squid to cache any url as any other url without any extra efforts.</p>
<p>So keeping the above directive in mind, I have worked out a different version of intelligentmirror especially for squid-2.7.</p>
<h3><span style="text-decoration: underline;"><strong>IntelligentMirror : Old method of operation</strong></span></h3>
<ol>
<li>IntelligentMirror gets a client request for a URL.</li>
<li>Check: if URL is not in (RPM, metadata file)
<ul>
<li>Then its none of our business.</li>
<li>Let proxy handle it the normal way.</li>
<li>Done and exit.</li>
</ul>
</li>
<li>Check: if RPM/metadata is available in cache
<ul>
<li>Stream the RPM/metadata from cache.</li>
<li>Done and exit.</li>
</ul>
</li>
<li>Check: if RPM/metadata is not available in cache
<ul>
<li>Download in parallel for caching in some dir and stream.</li>
<li>Done and exit.</li>
</ul>
</li>
</ol>
<h3><span style="text-decoration: underline;"><strong>IntelligentMirror : New method of operation</strong></span></h3>
<ol>
<li>IntelligentMirror gets a client request for a URL.</li>
<li>Check: if request for rpm
<ol>
<li>Direct squid to cache the request as http://&lt;same_host_all_the_time&gt;/intelligentmirror/&lt;rpmname&gt;.rpm</li>
</ol>
</li>
<li>Check: if request for deb
<ol>
<li>Direct squid to cache the request as http://&lt;same_host_all_the_time&gt;/intelligentmirror/&lt;debname&gt;.deb</li>
</ol>
</li>
<li>Done and exit.</li>
</ol>
<p>So your squid will see every request for an rpm package as a request http://&lt;same_host_all_the_time&gt;/intelligentmirror/&lt;rpmname&gt;.rpm. So, if you happen to request the same rpm from a different mirror, it&#8217;ll still be served from cache <img src='http://gofedora.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' title="IntelligentMirror Gets Even More Intelligent (1.0.1)" /> </p>
<h3><span style="text-decoration: underline;"><strong>Improvements</strong></span></h3>
<ol>
<li>No need to check if the url supplied by squid is for rpm or not because storeurl_rewrite_program has an acl controller attached which will invoke intelligentmirror for urls ending in .rpm .</li>
<li>No need to check if the <strong>url is already cached or not</strong>. No need to worry about the directory where you are going to store the packages. <strong>No human intervention</strong> is needed in maintaining the cache. Almighty squid is doing everything for us.</li>
<li>No need to worry <strong>if the target package has changed</strong> because of the resigning or whatever because squid will do that for you.</li>
<li>No need to actually download the package in parallel for caching because squid is already doing that.</li>
<li>No need to worry about the <strong>hashing algorithms and storage optimizations</strong> for the cached content.</li>
</ol>
<h3><span style="text-decoration: underline;"><strong>Availability</strong></span></h3>
<ol>
<li><a href="http://kulbirsaini.fedorapeople.org/stuff/intelligentmirror/intelligentmirror-1.0.1-1/" target="_blank">RPM for Fedora/Red Hat</a></li>
<li><a href="http://kulbirsaini.fedorapeople.org/stuff/intelligentmirror/intelligentmirror-1.0.1-1/" target="_blank">Source RPM for Fedora/Red Hat</a></li>
<li><a href="http://kulbirsaini.fedorapeople.org/stuff/intelligentmirror/intelligentmirror-1.0.1-1/" target="_blank">Source Tarball</a></li>
</ol>
<h3><span style="text-decoration: underline;"><strong>Install and Configure</strong></span></h3>
<p>The <a href="http://kulbirsaini.fedorapeople.org/stuff/intelligentmirror/intelligentmirror-1.0.1-1/INSTALL" target="_blank">install</a> and <a href="http://kulbirsaini.fedorapeople.org/stuff/intelligentmirror/intelligentmirror-1.0.1-1/Readme" target="_blank">configure</a> files should be enough to guide you through the installation if you choose the tar ball way. Otherwise you can always install from rpm from the above link.</p>
<p><strong>Note1: You have to configure your squid to use intelligentmirror as a plugin even if you install via rpm. Check the configure file at the above link.</strong></p>
<p><strong>Note2: StoreUrlRewrite will probably be available in squid-3.1.</strong></p>
<p><a href="http://gofedora.com/">Fedora Tutorials</a> by <a href="http://saini.co.in/">Kulbir Saini</a>.</p>
<div class="addthis_toolbox addthis_default_style " addthis:url='http://gofedora.com/intelligentmirror-intelligent-1-0-1/' addthis:title='IntelligentMirror Gets Even More Intelligent (1.0.1) '  ><a class="addthis_button_facebook_like" fb:like:layout="button_count"></a><a class="addthis_button_tweet"></a><a class="addthis_button_google_plusone" g:plusone:size="medium"></a><a class="addthis_counter addthis_pill_style"></a></div>]]></content:encoded>
			<wfw:commentRss>http://gofedora.com/intelligentmirror-intelligent-1-0-1/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

