<?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>platform agnostic &#187; configuration</title>
	<atom:link href="http://www.deepakg.com/prog/category/configuration/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.deepakg.com/prog</link>
	<description></description>
	<lastBuildDate>Tue, 29 Jun 2010 19:08:50 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>Installing VMWare tools on Debain Lenny/Etch</title>
		<link>http://www.deepakg.com/prog/2009/09/installing-vmware-tools-on-debain-lennyetch/</link>
		<comments>http://www.deepakg.com/prog/2009/09/installing-vmware-tools-on-debain-lennyetch/#comments</comments>
		<pubDate>Fri, 18 Sep 2009 19:26:38 +0000</pubDate>
		<dc:creator>deepakg</dc:creator>
				<category><![CDATA[configuration]]></category>
		<category><![CDATA[debian]]></category>
		<category><![CDATA[installation]]></category>
		<category><![CDATA[ubuntu]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[virtualization]]></category>

		<guid isPermaLink="false">http://www.deepakg.com/prog/?p=74</guid>
		<description><![CDATA[If you are building an X-less command-line-only Debian VM, here is what you&#8217;ll need to do in order to install VMWare tools so that you can use features like shared folders: 1. Login as root or su. 2. Make sure you have installed the kernel sources and build tools. apt-get install build-essential Then run: apt-get [...]]]></description>
			<content:encoded><![CDATA[<p>If you are building an X-less command-line-only Debian VM, here is what you&#8217;ll need to do in order to install VMWare tools so that you can use features like shared folders:</p>
<p>1. Login as root or su.<br />
2. Make sure you have installed the kernel sources and build tools. </p>
<p><code>apt-get install build-essential</code></p>
<p>Then run:</p>
<p><code>apt-get install linux-headers</code></p>
<p>This will probably give you a message saying: &#8220;Package linux-headers is a virtual package provided by:&#8221;, followed by a list of available kernel versions. Choose your version by looking it up:</p>
<p><code>cat /proc/version</code></p>
<p>or</p>
<p><code>uname -a</code></p>
<p>e.g. in my case I chose:</p>
<p><code>apt-get install linux-headers-2.6-2-amd64</code></p>
<p>3. Next choose Virtual Machine -> Install VMWare Tools option from the menu (this assumes VMWare Fusion running on Mac but there should be a similar option for VMWare Workstation on Linux and Windows as well).</p>
<p>Now mount the VMWare tools virtual CD:</p>
<p><code><br />
mount /cdrom<br />
cd /cdrom<br />
</code></p>
<p>Copy VMWare tool source code to /tmp and extract the files (the actual filename will depend on your VMWare version [which the VMWare installer would have reported in case of a mismatch]):</p>
<p><code>cp VMWareTools-7.9.6-173382.tar.gz /tmp<br />
cd /tmp<br />
tar -xzvf VMWareTools-7.9.6-173382.tar.gz<br />
</code></p>
<p>At this stage you should have a folder called vmware-tools-distrib inside your /tmp folder. Visit this folder and run vmware-install.pl, then follow the on-screen instructions.</p>
<p><code>cd /tmp/vmware-tools-distrib<br />
./vmware-install.pl<br />
</code></p>
<p>Now at one stage the VMWare tool installer complained about my installed gcc (4.3) version being different from the gcc version that was used to compile my kernel (4.1). Press Ctrl+C to abort the installer at this stage. </p>
<p>Turns out that gcc is merely a symbolic link in /usr/bin folder. Chances are that you&#8217;ll have 2 versions of gcc on your system (e.g. Lenny comes with /usr/bin/gcc-4.3 and /usr/bin/gcc-4.1). Just make the symlink point to the version of gcc that was used to compile your kernel:</p>
<p><code>cd /usr/bin<br />
rm gcc<br />
ln -s /usr/bin/gcc-4.1 gcc<br />
</code></p>
<p>Run vmware-install.pl again and this time things should go through. Restart your VM to finish the installation. You should now be able to see folders shared from the host machine under /mnt/hgfs.</p>
<p>Most of these steps should also apply to Ubuntu.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.deepakg.com/prog/2009/09/installing-vmware-tools-on-debain-lennyetch/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Install and enable Apache2::Request on Ubuntu Server 8.10</title>
		<link>http://www.deepakg.com/prog/2009/01/install-and-enable-apache2request-on-ubuntu-server-810/</link>
		<comments>http://www.deepakg.com/prog/2009/01/install-and-enable-apache2request-on-ubuntu-server-810/#comments</comments>
		<pubDate>Tue, 13 Jan 2009 16:40:17 +0000</pubDate>
		<dc:creator>deepakg</dc:creator>
				<category><![CDATA[configuration]]></category>
		<category><![CDATA[installation]]></category>
		<category><![CDATA[perl]]></category>
		<category><![CDATA[ubuntu]]></category>
		<category><![CDATA[Apache2::Request]]></category>
		<category><![CDATA[libapreq2]]></category>
		<category><![CDATA[mod_apreq2]]></category>
		<category><![CDATA[mod_perl]]></category>

		<guid isPermaLink="false">http://www.deepakg.com/prog/?p=39</guid>
		<description><![CDATA[A mod_perl handler can parse the incoming client request (querystring, form post data etc) using Apache2::Request. It is *not* installed when you install mod_perl. Getting it working is a 3 step process. First issue the following command: sudo apt-get install libapreq2 This installs 2 things &#8211; the libapreq2 shared library, and an Apache module &#8211; [...]]]></description>
			<content:encoded><![CDATA[<p>A mod_perl handler can parse the incoming client request (querystring, form post data etc) using Apache2::Request. It is *not* installed when you install mod_perl. Getting it working is a 3 step process. </p>
<p>First issue the following command:</p>
<p><code>sudo apt-get install libapreq2</code></p>
<p>This installs 2 things &#8211; the libapreq2 shared library, and an Apache module &#8211; mod_apreq2.</p>
<p>Next we install the Perl bindings &#8211; Apache2::Request &#8211; which we use in our handler code. </p>
<p><code>sudo apt-get install libapache2-request-perl</code></p>
<p>At this stage if you restart Apache, it will load your Perl handler without any complaints. However if you visit a handler that uses Apache2::Request, it&#8217;ll error out with the following entry in error.log:</p>
<p><code><br />
/usr/sbin/apache2: symbol lookup error: /usr/lib/perl5/auto/APR/Request/Apache2/Apache2.so: undefined symbol: apreq_handle_apache2<br />
</code></p>
<p>This is because unlike <a href="/prog/2009/01/installing-mod_perl-on-ubuntu-server/">our mod_perl installation</a>, apt-get doesn&#8217;t enable mod_apreq2 after installing it. We enable it manually by creating a symbolic link to /etc/apache2/mods-available/apreq.load under /etc/apache2/mods-enabled/:</p>
<p><code><br />
sudo bash<br />
cd /etc/apache2/mods-enabled<br />
ln -s ../mods-available/apreq.load<br />
apache2ctl restart<br />
</code></p>
<p>Updated: You can also run a2enmod to enable an Apache module and use a2dismod to disable it.</p>
<p>Visit your handler url again and this time it should work withour errors. Here is the modified handler from the <a href="/prog/2009/01/installing-mod_perl-on-ubuntu-server/">mod_perl installation post</a> that now uses Apache2::Request to enable you to test if your installation is working correctly:</p>
<pre>
package Hello;
use strict;

use Apache2::RequestRec ();
use Apache2::RequestIO ();

use Apache2::Const -compile => qw(OK);

use Apache2::Request;

sub handler {
    my $r = shift;

    $r->content_type('text/plain');

    my $req = Apache2::Request->new($r);
    my $name = $req->param("name");
    $name = $name ? $name : "World";

    print "Hello $name, the time here is " . localtime() . "\n";

    return Apache2::Const::OK;
}

1;
</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.deepakg.com/prog/2009/01/install-and-enable-apache2request-on-ubuntu-server-810/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Installing mod_perl on Ubuntu Server 8.10</title>
		<link>http://www.deepakg.com/prog/2009/01/installing-mod_perl-on-ubuntu-server/</link>
		<comments>http://www.deepakg.com/prog/2009/01/installing-mod_perl-on-ubuntu-server/#comments</comments>
		<pubDate>Fri, 09 Jan 2009 18:59:41 +0000</pubDate>
		<dc:creator>deepakg</dc:creator>
				<category><![CDATA[configuration]]></category>
		<category><![CDATA[installation]]></category>
		<category><![CDATA[perl]]></category>
		<category><![CDATA[ubuntu]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[mod_perl]]></category>

		<guid isPermaLink="false">http://www.deepakg.com/prog/?p=8</guid>
		<description><![CDATA[I am at a stage in life where I am going to be writing a lot of Perl code again. My preferred OS is Mac OS since it already comes with Perl 5.8.8 and Apache 2.2.9 (as of Mac OS 10.5.6). Unfortunately, mod_perl that ships with Mac OS, is broken (segfaults!). You can use fink [...]]]></description>
			<content:encoded><![CDATA[<p>I am at a stage in life where I am going to be writing a lot of Perl code again. My preferred OS is Mac OS since it already comes with Perl 5.8.8 and Apache 2.2.9 (as of Mac OS 10.5.6). Unfortunately, mod_perl that ships with Mac OS, is broken (segfaults!). You can use fink or macports to pull Apache/Perl/mod_perl that work but I figured that if I use Ubuntu, I also get to be close to my Debian production environment. Here is how I got a fresh Ubuntu 8.10 Server VM ready with mod_perl:</p>
<h5>Getting started</h5>
<p>At one stage during the installation of Ubuntu server, you&#8217;ll be asked what components you want installed. Pick LAMP at the very least. After booting up for the first time (and logging in), fire up the following commands:<br />
<code><br />
sudo bash #fire up a root shell so that we don't have to sudo every command<br />
apt-get update<br />
apt-get dist-update<br />
reboot</code></p>
<p><code> </code></p>
<p><code>#install things that could come in handy later<br />
sudo bash<br />
apt-get emacs #skip this if you prefer vi - it's already there<br />
apt-get install linux-headers-server build-essential<br />
</code></p>
<p>At this stage you&#8217;ll have the latest kernel running. I find the default 80&#215;24 display a little too restrictive. We&#8217;ll fix that by editing <code>/boot/grub/menu.lst</code>. Open the file in emacs or whatever editor you like, and scroll down to the end to a bunch of options that look like title, uuid, kernel, initrd. Append vga=0x31A to the end of the first kernel statement. e.g. in my case<br />
<code><br />
kernel		/boot/vmlinuz-2.6.27-9-server root=UUID=d9f9cc35-d880-494d-8cd3-92da418a438b ro quiet splash<br />
</code></p>
<p>became<br />
<code><br />
kernel		/boot/vmlinuz-2.6.27-9-server root=UUID=d9f9cc35-d880-494d-8cd3-92da418a438b ro quiet splash <strong>vga=0x31A</strong><br />
</code></p>
<p>Reboot.</p>
<p>vga=0x31A gives me a resolution of 1280&#215;1024 and 64k colors. Here are other options that you can play with:</p>
<pre>#  FRAMEBUFFER RESOLUTION SETTINGS
#     +-------------------------------------------------+
#          | 640x480    800x600    1024x768   1280x1024
#      ----+--------------------------------------------
#      256 | 0x301=769  0x303=771  0x305=773   0x307=775
#      32K | 0x310=784  0x313=787  0x316=790   0x319=793
#      64K | 0x311=785  0x314=788  0x317=791   0x31A=794
#      16M | 0x312=786  0x315=789  0x318=792   0x31B=795
#     +-------------------------------------------------+</pre>
<h5>Installing mod_perl</h5>
<p>At this stage we already have Apache and Perl installed. If you do:<br />
<code>tail /var/log/apache2/error.log</code>, you&#8217;ll see that out of the box, you only get support for PHP.<br />
<code><br />
[Sun Dec 14 12:04:05 2008] [notice] Apache/2.2.9 (Ubuntu) PHP/5.2.6-2ubuntu4 with Suhosin-Patch configured -- resuming normal operations<br />
</code></p>
<p>Here is how you add mod_perl support:</p>
<p><code><br />
sudo bash<br />
apt-get install libapache2-mod-perl2</code></p>
<p><code>#restart apache so that it loads mod_perl<br />
apache2ctl restart</p>
<p>#make sure that it did indeed load<br />
tail /var/log/apache2/error.log</p>
<p></code></p>
<p><code>#if all went well, you'll see something to the effect of (emphasis mine):<br />
[Sun Dec 14 12:19:17 2008] [notice] Apache/2.2.9 (Ubuntu) PHP/5.2.6-2ubuntu4 with Suhosin-Patch <strong>mod_perl/2.0.4 Perl/v5.10.0</strong> configured -- resuming normal operations<br />
</code></p>
<h5>Testing our mod_perl installation</h5>
<p>Let&#8217;s write a simple mod_perl response handler to make sure our installation was successful. Create Hello.pm in your home directory &#8211; which is <code>/home/deepakg/</code> on my machine:</p>
<pre>package Hello;
use strict;

use Apache2::RequestRec ();
use Apache2::RequestIO ();

use Apache2::Const -compile =&gt; qw(OK);

sub handler {
    my $r = shift;

    $r-&gt;content_type('text/plain');
    print "Hello World, the time here is " . localtime() . "\n";

    return Apache2::Const::OK;
}

1;</pre>
<p>Then to make sure that we didn&#8217;t make any typos:<br />
<code><br />
perl -c Hello.pm<br />
Hello.pm syntax OK<br />
</code></p>
<p>Next, open <code>/etc/apache2/apache2.conf</code> and type the following right at the end:</p>
<pre>PerlRequire /home/deepakg/Hello.pm
&lt;Location /time&gt;
   SetHandler perl-script
   PerlResponseHandler Hello
&lt;/Location&gt;</pre>
<p>Restart apache and check the Apache error log to make sure that it started without any issues:<br />
<code><br />
sudo apache2ctl restart<br />
tail /var/log/apache2/error.log<br />
</code></p>
<p>Install lynx, so that you can check your handy work:<br />
<code><br />
sudo apt-get install lynx</code></p>
<p><code> </code></p>
<p><code># and once it is installed<br />
lynx http://localhost/time<br />
</code></p>
<p>If everything is working then you&#8217;ll be greeted with something like this:<br />
<code><br />
Hello World, the time here is Sat Jan 10 15:25:51 2009<br />
</code><br />
Of course, the actual date and time will vary on your system <img src='http://www.deepakg.com/prog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> .</p>
<h5>Miscellaneous</h5>
<p>If the time shown by the script above looks awkward, your time zone might not have been configured correctly. Configure the time zone to where you are:<br />
<code><br />
sudo dpkg-reconfigure tzdata<br />
</code></p>
<p>And then may be tweak the clock by hand if needed:<br />
<code><br />
sudo date MMDDhhmm #MM - month, DD - date, hh - hour (24 format), mm - minute<br />
</code></p>
]]></content:encoded>
			<wfw:commentRss>http://www.deepakg.com/prog/2009/01/installing-mod_perl-on-ubuntu-server/feed/</wfw:commentRss>
		<slash:comments>12</slash:comments>
		</item>
	</channel>
</rss>

<!-- Dynamic Page Served (once) in 0.398 seconds -->
