<?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>Blog of a LAMP Developer based in Richmond, Surrey</title>
	<atom:link href="http://www.lampdeveloper.co.uk/feed" rel="self" type="application/rss+xml" />
	<link>http://www.lampdeveloper.co.uk</link>
	<description>A day in the life of a Lamp Developer</description>
	<lastBuildDate>Sat, 13 Nov 2010 11:16:57 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Find and compare the fastest web hosting</title>
		<link>http://www.lampdeveloper.co.uk/linux/fastest-web-hosting.html</link>
		<comments>http://www.lampdeveloper.co.uk/linux/fastest-web-hosting.html#comments</comments>
		<pubDate>Mon, 08 Nov 2010 19:43:57 +0000</pubDate>
		<dc:creator>Jamie</dc:creator>
				<category><![CDATA[Linux]]></category>

		<guid isPermaLink="false">http://www.lampdeveloper.co.uk/?p=214</guid>
		<description><![CDATA[Compare web hosting companies and find out which is the fastest in the country.
Find the fastest web hosting in the UK

    

	]]></description>
			<content:encoded><![CDATA[<p><a href="http://fasthosts.net/">Compare web hosting </a>companies and find out which is the fastest in the country.</p>
<p>Find the <a title="Fastest hosting by country" href="http://fasthosts.net/fastest_host_by_country/United%20Kingdom">fastest web hosting</a> in the UK</p>
<p class="addtoany_share_save_container">
    <a class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save?sitename=Blog%20of%20a%20LAMP%20Developer%20based%20in%20Richmond%2C%20Surrey&amp;siteurl=http%3A%2F%2Fwww.lampdeveloper.co.uk%2F&amp;linkname=Find%20and%20compare%20the%20fastest%20web%20hosting&amp;linkurl=http%3A%2F%2Fwww.lampdeveloper.co.uk%2Flinux%2Ffastest-web-hosting.html"><img src="http://www.lampdeveloper.co.uk/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share/Save/Bookmark"/></a>

	</p>]]></content:encoded>
			<wfw:commentRss>http://www.lampdeveloper.co.uk/linux/fastest-web-hosting.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Smudge IT is no more. (Well kinda)</title>
		<link>http://www.lampdeveloper.co.uk/linux/smudge-it-is-no-more-well-kinda.html</link>
		<comments>http://www.lampdeveloper.co.uk/linux/smudge-it-is-no-more-well-kinda.html#comments</comments>
		<pubDate>Wed, 18 Aug 2010 14:44:13 +0000</pubDate>
		<dc:creator>Jamie</dc:creator>
				<category><![CDATA[Linux]]></category>

		<guid isPermaLink="false">http://www.lampdeveloper.co.uk/?p=205</guid>
		<description><![CDATA[I recently decided to sell my hosting side of the business.
If any customers are reading this, then thanks for all your support over the years.
Watch this space for new products and new branches of the business.

    

	]]></description>
			<content:encoded><![CDATA[<p>I recently decided to sell my <a href="http://www.smudge-it.co.uk/" target="_blank">hosting</a> side of the business.</p>
<p>If any customers are reading this, then thanks for all your support over the years.</p>
<p>Watch this space for new products and new branches of the business.</p>
<p class="addtoany_share_save_container">
    <a class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save?sitename=Blog%20of%20a%20LAMP%20Developer%20based%20in%20Richmond%2C%20Surrey&amp;siteurl=http%3A%2F%2Fwww.lampdeveloper.co.uk%2F&amp;linkname=Smudge%20IT%20is%20no%20more.%20%28Well%20kinda%29&amp;linkurl=http%3A%2F%2Fwww.lampdeveloper.co.uk%2Flinux%2Fsmudge-it-is-no-more-well-kinda.html"><img src="http://www.lampdeveloper.co.uk/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share/Save/Bookmark"/></a>

	</p>]]></content:encoded>
			<wfw:commentRss>http://www.lampdeveloper.co.uk/linux/smudge-it-is-no-more-well-kinda.html/feed</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Validating XML files, including Google sitemap and atom XML using PHP</title>
		<link>http://www.lampdeveloper.co.uk/php/validating-xml-files-including-google-sitemap-and-atom-xml-using-php.html</link>
		<comments>http://www.lampdeveloper.co.uk/php/validating-xml-files-including-google-sitemap-and-atom-xml-using-php.html#comments</comments>
		<pubDate>Wed, 11 Aug 2010 15:07:05 +0000</pubDate>
		<dc:creator>Jamie</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[google sitemap]]></category>
		<category><![CDATA[xml]]></category>

		<guid isPermaLink="false">http://www.lampdeveloper.co.uk/?p=187</guid>
		<description><![CDATA[The following method is pulled from a class, in a php command line tool, that I created to generate google sitemap files and also Google Base atom files.
What I wanted to do was, vailidate the generated xml files against a schema, before saving them.
You can do this via the command using xmllint.
xmllint &#8211;schema atom.xsd.xml &#8211;valid [...]]]></description>
			<content:encoded><![CDATA[<p>The following method is pulled from a class, in a php command line tool, that I created to generate google sitemap files and also Google Base atom files.</p>
<p>What I wanted to do was, vailidate the generated xml files against a schema, before saving them.</p>
<p>You can do this via the command using xmllint.</p>
<p>xmllint &#8211;schema atom.xsd.xml &#8211;valid &#8211;noout /xmlfiles/.test.xml.tmp</p>
<p>However you can easily do this in PHP.</p>
<p>Here are the schema files. <a rel="attachment wp-att-190" href="http://www.lampdeveloper.co.uk/php/validating-xml-files-including-google-sitemap-and-atom-xml-using-php.html/attachment/siteindex"></a></p>
<p><a rel="attachment wp-att-191" href="http://www.lampdeveloper.co.uk/php/validating-xml-files-including-google-sitemap-and-atom-xml-using-php.html/attachment/sitemap"></a><a rel="attachment wp-att-190" href="http://www.lampdeveloper.co.uk/php/validating-xml-files-including-google-sitemap-and-atom-xml-using-php.html/attachment/siteindex">siteindex</a><br />
<a rel="attachment wp-att-191" href="http://www.lampdeveloper.co.uk/php/validating-xml-files-including-google-sitemap-and-atom-xml-using-php.html/attachment/sitemap">sitemap</a><br />
<a rel="attachment wp-att-189" href="http://www.lampdeveloper.co.uk/php/validating-xml-files-including-google-sitemap-and-atom-xml-using-php.html/attachment/atom-xsd">atom.xsd</a></p>
<pre name="code" class="php">

static function validate_google_xml($xmlfile, $type)
{

print(&quot;Validating {$xmlfile} \n&quot;);

$xdoc = new DomDocument;
if($type == &#039;siteindex&#039;)
{
$schema = self::$scriptDir.&#039;siteindex.xsd&#039;;
@$xdoc-&gt;Load($xmlfile);
if (@$xdoc-&gt;schemaValidate($schema))
{
return true;
}
}elseif($type == &#039;sitemap&#039;)
{
$schema = self::$scriptDir.&#039;sitemap.xsd&#039;;
//echo $schema ; die;
@$xdoc-&gt;Load($xmlfile);
if (@$xdoc-&gt;schemaValidate($schema))
{
return true;
}

}elseif($type == &#039;atom&#039;)
{
$schema = self::$scriptDir.&#039;atom.xsd.xml&#039;;
//echo $schema ; die;
@$xdoc-&gt;Load($xmlfile);
if (@$xdoc-&gt;schemaValidate($schema))
{
return true;
}

}

}
</pre>
<p class="addtoany_share_save_container">
    <a class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save?sitename=Blog%20of%20a%20LAMP%20Developer%20based%20in%20Richmond%2C%20Surrey&amp;siteurl=http%3A%2F%2Fwww.lampdeveloper.co.uk%2F&amp;linkname=Validating%20XML%20files%2C%20including%20Google%20sitemap%20and%20atom%20XML%20using%20PHP&amp;linkurl=http%3A%2F%2Fwww.lampdeveloper.co.uk%2Fphp%2Fvalidating-xml-files-including-google-sitemap-and-atom-xml-using-php.html"><img src="http://www.lampdeveloper.co.uk/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share/Save/Bookmark"/></a>

	</p>]]></content:encoded>
			<wfw:commentRss>http://www.lampdeveloper.co.uk/php/validating-xml-files-including-google-sitemap-and-atom-xml-using-php.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Screenshots of SmudgeVMM alpha</title>
		<link>http://www.lampdeveloper.co.uk/linux/screenshots-of-smudgevmm-alpha.html</link>
		<comments>http://www.lampdeveloper.co.uk/linux/screenshots-of-smudgevmm-alpha.html#comments</comments>
		<pubDate>Fri, 16 Apr 2010 17:08:03 +0000</pubDate>
		<dc:creator>Jamie</dc:creator>
				<category><![CDATA[Cakephp]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[SmudgeVMM]]></category>
		<category><![CDATA[virtual machine manager]]></category>

		<guid isPermaLink="false">http://www.lampdeveloper.co.uk/?p=177</guid>
		<description><![CDATA[Thank you to all the people who have enquired about Smudge Virtual Machine Manager
The software is coming along nicely. We hope to have the new website and the beta, available by the end of next month.
Here are a few teaser screen shots.

    

	]]></description>
			<content:encoded><![CDATA[<p>Thank you to all the people who have enquired about <a href="http://virtualmachinemanager.com/">Smudge Virtual Machine Manager</a></p>
<p>The software is coming along nicely. We hope to have the new website and the beta, available by the end of next month.</p>
<p>Here are a few teaser screen shots.</p>

<a href='http://www.lampdeveloper.co.uk/linux/screenshots-of-smudgevmm-alpha.html/attachment/smudgevmm-1' title='smudgevmm-1'><img width="150" height="150" src="http://www.lampdeveloper.co.uk/wp-content/secretuploads/2010/04/smudgevmm-1-150x150.gif" class="attachment-thumbnail" alt="" title="smudgevmm-1" /></a>
<a href='http://www.lampdeveloper.co.uk/linux/screenshots-of-smudgevmm-alpha.html/attachment/smudgevmm-2' title='smudgevmm-2'><img width="150" height="150" src="http://www.lampdeveloper.co.uk/wp-content/secretuploads/2010/04/smudgevmm-2-150x150.gif" class="attachment-thumbnail" alt="" title="smudgevmm-2" /></a>

<p class="addtoany_share_save_container">
    <a class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save?sitename=Blog%20of%20a%20LAMP%20Developer%20based%20in%20Richmond%2C%20Surrey&amp;siteurl=http%3A%2F%2Fwww.lampdeveloper.co.uk%2F&amp;linkname=Screenshots%20of%20SmudgeVMM%20alpha&amp;linkurl=http%3A%2F%2Fwww.lampdeveloper.co.uk%2Flinux%2Fscreenshots-of-smudgevmm-alpha.html"><img src="http://www.lampdeveloper.co.uk/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share/Save/Bookmark"/></a>

	</p>]]></content:encoded>
			<wfw:commentRss>http://www.lampdeveloper.co.uk/linux/screenshots-of-smudgevmm-alpha.html/feed</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>SmudgeVMM &#8211; Svmm &#8211; Smudgeit Virtual Machine Manager</title>
		<link>http://www.lampdeveloper.co.uk/linux/smudgevmm-svmm-smudgeit-virtual-machine-manager.html</link>
		<comments>http://www.lampdeveloper.co.uk/linux/smudgevmm-svmm-smudgeit-virtual-machine-manager.html#comments</comments>
		<pubDate>Mon, 15 Feb 2010 10:12:40 +0000</pubDate>
		<dc:creator>Jamie</dc:creator>
				<category><![CDATA[Cakephp]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Smudge virtual machine manager]]></category>
		<category><![CDATA[SmudgeVMM]]></category>
		<category><![CDATA[SVMM]]></category>
		<category><![CDATA[Xen web gui]]></category>

		<guid isPermaLink="false">http://www.lampdeveloper.co.uk/?p=173</guid>
		<description><![CDATA[I&#8217;m currently involved in a a new php project that will allow users to manager Xen virtual containers, through a simple web interface or robust API.
SmudgeVMM is being written in CakePHP and will run as a stand alone webservice, on any Centos Xen server.
Features include: Multiple interfaces (WAN and LAN), SAS storage (iscsi and NAS), [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;m currently involved in a a new php project that will allow users to manager Xen virtual containers, through a simple web interface or robust API.</p>
<p><a title="SmudgeVMM, SVMM" href="http://virtualmachinemanager.com" target="_blank">SmudgeVMM</a> is being written in CakePHP and will run as a stand alone webservice, on any Centos Xen server.</p>
<p>Features include: Multiple interfaces (WAN and LAN), SAS storage (iscsi and NAS), package templates, support for most flavors of linux, integration with most hosting shopping carts, reseller and multi user level permissions along with complete Xen VPS container management.</p>
<p class="addtoany_share_save_container">
    <a class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save?sitename=Blog%20of%20a%20LAMP%20Developer%20based%20in%20Richmond%2C%20Surrey&amp;siteurl=http%3A%2F%2Fwww.lampdeveloper.co.uk%2F&amp;linkname=SmudgeVMM%20%26%238211%3B%20Svmm%20%26%238211%3B%20Smudgeit%20Virtual%20Machine%20Manager&amp;linkurl=http%3A%2F%2Fwww.lampdeveloper.co.uk%2Flinux%2Fsmudgevmm-svmm-smudgeit-virtual-machine-manager.html"><img src="http://www.lampdeveloper.co.uk/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share/Save/Bookmark"/></a>

	</p>]]></content:encoded>
			<wfw:commentRss>http://www.lampdeveloper.co.uk/linux/smudgevmm-svmm-smudgeit-virtual-machine-manager.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Reducing an ext3 Logical Volume&#8217;s Size</title>
		<link>http://www.lampdeveloper.co.uk/linux/reducing-a-ext3-logical-volumes-size.html</link>
		<comments>http://www.lampdeveloper.co.uk/linux/reducing-a-ext3-logical-volumes-size.html#comments</comments>
		<pubDate>Thu, 14 Jan 2010 12:10:00 +0000</pubDate>
		<dc:creator>Jamie</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[e2fsck]]></category>
		<category><![CDATA[lvreduce]]></category>
		<category><![CDATA[reduce lvm]]></category>
		<category><![CDATA[shrink lvm]]></category>

		<guid isPermaLink="false">http://www.lampdeveloper.co.uk/?p=169</guid>
		<description><![CDATA[Here are the commands to reduce an ext3 file system and also the Logical Volume that holds it.
Warning please make sure you leave enough space for the files inside, or data may be lost.
First make sure the files system isn&#8217;t mounted then.
e2fsck -f /dev/VolGroup00/disk1_rootimg
resize2fs -p /dev/VolGroup00/disk1_rootimg 15G
lvreduce &#8211;size 15G /dev/VolGroup00/disk1_rootimg
resize2fs /dev/VolGroup00/disk1_rootimg
This should reduce the file [...]]]></description>
			<content:encoded><![CDATA[<p>Here are the commands to reduce an ext3 file system and also the Logical Volume that holds it.</p>
<p>Warning please make sure you leave enough space for the files inside, or data may be lost.</p>
<p>First make sure the files system isn&#8217;t mounted then.</p>
<p>e2fsck -f /dev/VolGroup00/disk1_rootimg<br />
resize2fs -p /dev/VolGroup00/disk1_rootimg 15G<br />
lvreduce &#8211;size 15G /dev/VolGroup00/disk1_rootimg<br />
resize2fs /dev/VolGroup00/disk1_rootimg</p>
<p>This should reduce the file system to 15G</p>
<p class="addtoany_share_save_container">
    <a class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save?sitename=Blog%20of%20a%20LAMP%20Developer%20based%20in%20Richmond%2C%20Surrey&amp;siteurl=http%3A%2F%2Fwww.lampdeveloper.co.uk%2F&amp;linkname=Reducing%20an%20ext3%20Logical%20Volume%26%238217%3Bs%20Size&amp;linkurl=http%3A%2F%2Fwww.lampdeveloper.co.uk%2Flinux%2Freducing-a-ext3-logical-volumes-size.html"><img src="http://www.lampdeveloper.co.uk/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share/Save/Bookmark"/></a>

	</p>]]></content:encoded>
			<wfw:commentRss>http://www.lampdeveloper.co.uk/linux/reducing-a-ext3-logical-volumes-size.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Generating a file list, for a Joomla Component XML info file</title>
		<link>http://www.lampdeveloper.co.uk/linux/generating-a-file-list-for-a-joomla-component-xml-info-file.html</link>
		<comments>http://www.lampdeveloper.co.uk/linux/generating-a-file-list-for-a-joomla-component-xml-info-file.html#comments</comments>
		<pubDate>Tue, 08 Dec 2009 10:00:07 +0000</pubDate>
		<dc:creator>Jamie</dc:creator>
				<category><![CDATA[Apple OSX]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[generate]]></category>
		<category><![CDATA[joomla]]></category>
		<category><![CDATA[xml]]></category>

		<guid isPermaLink="false">http://www.lampdeveloper.co.uk/?p=161</guid>
		<description><![CDATA[I&#8217;ve had to do some work for a company recently.
It involved me creating Joomla components and those annoying XML files, listing all the files and folders to install.
If you want a quick command to generate the xml, you can cd to the directory then run
find * -type f -exec  echo &#8216;&#60;filename&#62;&#8217;{}&#8217;&#60;/filename&#62;&#8217; \;
find * -type d [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve had to do some work for a company recently.</p>
<p>It involved me creating Joomla components and those annoying XML files, listing all the files and folders to install.</p>
<p>If you want a quick command to generate the xml, you can cd to the directory then run</p>
<p>find * -type f -exec  echo &#8216;&lt;filename&gt;&#8217;{}&#8217;&lt;/filename&gt;&#8217; \;</p>
<p>find * -type d -exec  echo &#8216;&lt;folder&gt;&#8217;{}&#8217;&lt;/folder&gt;&#8217; \;</p>
<p>Then you can copy the output from the terminal and paste between the files tags.</p>
<p>&lt;files folder=&#8221;components/com_test&#8221;&gt;<br />
&lt;filename&gt;controller.php&lt;/filename&gt;<br />
&lt;filename&gt;css/test.css&lt;/filename&gt;<br />
&lt;filename&gt;views/test/tmpl/index.html&lt;/filename&gt;<br />
&lt;filename&gt;test.php&lt;/filename&gt;<br />
&lt;folder&gt;css&lt;/folder&gt;<br />
&lt;folder&gt;images&lt;/folder&gt;<br />
&lt;folder&gt;install_sql&lt;/folder&gt;<br />
&lt;folder&gt;models&lt;/folder&gt;<br />
&lt;folder&gt;player&lt;/folder&gt;<br />
&lt;folder&gt;views&lt;/folder&gt;<br />
&lt;folder&gt;views/user&lt;/folder&gt;<br />
&lt;folder&gt;views/user/tmpl&lt;/folder&gt;<br />
&lt;folder&gt;views/test&lt;/folder&gt;<br />
&lt;folder&gt;views/test/tmpl&lt;/folder&gt;<br />
&lt;/files&gt;</p>
<p>I repeated this for the administrator/components/com_test and components/com_test folders</p>
<p class="addtoany_share_save_container">
    <a class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save?sitename=Blog%20of%20a%20LAMP%20Developer%20based%20in%20Richmond%2C%20Surrey&amp;siteurl=http%3A%2F%2Fwww.lampdeveloper.co.uk%2F&amp;linkname=Generating%20a%20file%20list%2C%20for%20a%20Joomla%20Component%20XML%20info%20file&amp;linkurl=http%3A%2F%2Fwww.lampdeveloper.co.uk%2Flinux%2Fgenerating-a-file-list-for-a-joomla-component-xml-info-file.html"><img src="http://www.lampdeveloper.co.uk/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share/Save/Bookmark"/></a>

	</p>]]></content:encoded>
			<wfw:commentRss>http://www.lampdeveloper.co.uk/linux/generating-a-file-list-for-a-joomla-component-xml-info-file.html/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>New VPS Server</title>
		<link>http://www.lampdeveloper.co.uk/linux/new-vps-server.html</link>
		<comments>http://www.lampdeveloper.co.uk/linux/new-vps-server.html#comments</comments>
		<pubDate>Mon, 06 Jul 2009 22:40:11 +0000</pubDate>
		<dc:creator>Jamie</dc:creator>
				<category><![CDATA[Apache]]></category>
		<category><![CDATA[Linux]]></category>

		<guid isPermaLink="false">http://www.lampdeveloper.co.uk/?p=147</guid>
		<description><![CDATA[I&#8217;m now running the site on a new Xen VPS server with Smudgeit. The site is running smoothly and no issues to report.
I chose to go with a UK Centos Xen VPS Server.

    

	]]></description>
			<content:encoded><![CDATA[<p>I&#8217;m now running the site on a new <a href="http://www.smudge-it.co.uk/xen-linux-vps">Xen VPS server</a> with <a href="http://www.smudge-it.co.uk">Smudgeit</a>. The site is running smoothly and no issues to report.<br />
I chose to go with a <a href="http://www.smudge-it.co.uk/centos-vps">UK Centos Xen VPS Server</a>.</p>
<p class="addtoany_share_save_container">
    <a class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save?sitename=Blog%20of%20a%20LAMP%20Developer%20based%20in%20Richmond%2C%20Surrey&amp;siteurl=http%3A%2F%2Fwww.lampdeveloper.co.uk%2F&amp;linkname=New%20VPS%20Server&amp;linkurl=http%3A%2F%2Fwww.lampdeveloper.co.uk%2Flinux%2Fnew-vps-server.html"><img src="http://www.lampdeveloper.co.uk/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share/Save/Bookmark"/></a>

	</p>]]></content:encoded>
			<wfw:commentRss>http://www.lampdeveloper.co.uk/linux/new-vps-server.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>HyperVM Manual Alternative for creating Xen Domu using LVM</title>
		<link>http://www.lampdeveloper.co.uk/linux/hypervm-manual-alternative-for-creating-xen-domu-using-lvm.html</link>
		<comments>http://www.lampdeveloper.co.uk/linux/hypervm-manual-alternative-for-creating-xen-domu-using-lvm.html#comments</comments>
		<pubDate>Fri, 26 Jun 2009 17:40:47 +0000</pubDate>
		<dc:creator>Jamie</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[centos]]></category>
		<category><![CDATA[hypervm alternative]]></category>

		<guid isPermaLink="false">http://www.lampdeveloper.co.uk/?p=133</guid>
		<description><![CDATA[After the sad death of K T Ligesh I decided, like many people, to move away from HyperVM.
I searched and tried many control panels.
Openqrm &#8211; I found this over kill
karesansui &#8211; This is very nice looking and polished but seemed quite slow.
VDS Manager &#8211; Still in beta for Xen
I&#8217;ve now decided to create the VM&#8217;s [...]]]></description>
			<content:encoded><![CDATA[<p>After the sad death of K T Ligesh I decided, like many people, to move away from HyperVM.</p>
<p>I searched and tried many control panels.</p>
<p><a href="http://www.openqrm.com/" target="_blank">Openqrm</a> &#8211; I found this over kill<br />
<a href="http://www.karesansui-project.info/" target="_blank">karesansui</a> &#8211; This is very nice looking and polished but seemed quite slow.<br />
<a href="http://www.ispsystem.com/en/software/vdsmanager/" target="_blank">VDS Manager</a> &#8211; Still in beta for Xen</p>
<p>I&#8217;ve now decided to create the VM&#8217;s by hand. I then hope to make a PHP control panel of my own. Here are my steps for creating Xen VPS&#8217;s using the command line and Centos 5.</p>
<p>I&#8217;m going to create a vm called testvm</p>
<p>First I needed to find out what Volume groups exist on my system and what the VG Name was</p>
<p><em>lvdisplay</em></p>
<p>VG Name                <strong>VolGroup00</strong></p>
<p>Create the disks for the VM and format</p>
<p><em>lvcreate -L8.5G -n testvm_rootimg VolGroup00<br />
lvcreate -L 384M -n testvm_vmswap VolGroup00<br />
mke2fs /dev/VolGroup00/testvm_rootimg<br />
tune2fs -j /dev/VolGroup00/testvm_rootimg<br />
mkswap /dev/VolGroup00/testvm_vmswap</em><br />
<em>mkdir /mnt/img<br />
mkdir /mnt/vm</em></p>
<p>Now mount your disk image. I&#8217;ve created a custom hardened Centos distro, but you could use <a href="http://mirror1.smudge-it.co.uk/jailtime/" target="_blank">Jailtime Images</a></p>
<p><em>mount -o loop centos.5-3.64-smudge.img  /mnt/img<br />
mount /dev/VolGroup00/looop_rootimg /mnt/vm</em></p>
<p>Copy the image onto your new partition</p>
<p>cp -a /mnt/img/* /mnt/vm/</p>
<p>Now all you need to do is configure the hostname, ip etc on the VM.</p>
<p>vi /mnt/vm/etc/sysconfig/network-scripts/ifcfg-eth0</p>
<p>DEVICE=eth0<br />
BOOTPROTO=static<br />
IPADDR=87.xxx.xxx.xxx<br />
NETMASK=255.255.255.xxx<br />
ONBOOT=yes</p>
<p>Change the hostname</p>
<p>vi /mnt/vm/etc/sysconfig/network</p>
<p>If your using Jailtime images people have advised to change this line to the following:</p>
<p><em>vi /mnt/vm/etc/inittab<br />
1:2345:respawn:/sbin/mingetty console</em></p>
<p><em>vi /mnt/vm/etc/ssh/sshd_config<br />
PermitRootLogin yes</em></p>
<p><em>vi /mnt/vm/etc/fstab</em></p>
<p>Add the line:</p>
<p><em>/dev/sda2     swap   swap     defaults     0     0</em></p>
<p><em>umount /mnt/img /mnt/vm</em></p>
<p>You will need a ram disk to boot from. This can be created by running:</p>
<p><em>mkinitrd /boot/xen-guest-initrd `uname -r` &#8211;with xenblk &#8211;with xennet &#8211;preload xenblk &#8211;preload xennet </em>&#8211;omit-scsi-modules</p>
<p>Now all you need to do is create the config file and give it an IP/ Mac address.Please check which kernel you are using first and change &#8211; kernel = &#8220;/boot/vmlinuz-2.6.18-128.1.14.el5xen&#8221;&#8230;</p>
<p>kernel = &#8220;/boot/vmlinuz-2.6.18-128.1.14.el5xen&#8221;<br />
ramdisk    = &#8216;/boot/xen-guest-initrd&#8217;<br />
maxmem = 192<br />
memory = 192<br />
vcpus = 1<br />
name = &#8220;testvm&#8221;<br />
vif = [ 'ip=87.xxx.xxx.xxx,bridge=xenbr0, rate = 1000KB/s, mac=aa:00:23:b0:de:34' ]<br />
serial     = &#8216;pty&#8217;<br />
disk       = ['phy:/dev/VolGroup00/testvm_rootimg,sda1,w', 'phy:/dev/VolGroup00/testvm_vmswap,sda2,w']<br />
root = &#8216;/dev/sda1 ro&#8217;<br />
on_poweroff = &#8216;destroy&#8217;<br />
on_reboot   = &#8216;restart&#8217;<br />
on_crash    = &#8216;restart&#8217;</p>
<p>All is ready to go.</p>
<p>Just run:</p>
<p><em>xm create testvm</em></p>
<p>And you VPS should be now running:</p>
<p>check with<br />
<em>xm console testvm</em></p>
<p>Hope this helps.</p>
<p><a href="http://www.smudge-it.co.uk" target="_blank">Smudge IT</a> will be lauching  a new site and <a href="http://www.smudge-it.co.uk">Xen Vps</a> systems soon. Watch this space..</p>
<p class="addtoany_share_save_container">
    <a class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save?sitename=Blog%20of%20a%20LAMP%20Developer%20based%20in%20Richmond%2C%20Surrey&amp;siteurl=http%3A%2F%2Fwww.lampdeveloper.co.uk%2F&amp;linkname=HyperVM%20Manual%20Alternative%20for%20creating%20Xen%20Domu%20using%20LVM&amp;linkurl=http%3A%2F%2Fwww.lampdeveloper.co.uk%2Flinux%2Fhypervm-manual-alternative-for-creating-xen-domu-using-lvm.html"><img src="http://www.lampdeveloper.co.uk/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share/Save/Bookmark"/></a>

	</p>]]></content:encoded>
			<wfw:commentRss>http://www.lampdeveloper.co.uk/linux/hypervm-manual-alternative-for-creating-xen-domu-using-lvm.html/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Archiving Mysql Data Tables using CakePHP or just SQL</title>
		<link>http://www.lampdeveloper.co.uk/mysql/handy-way-to-copy-data-between-mysql-databases.html</link>
		<comments>http://www.lampdeveloper.co.uk/mysql/handy-way-to-copy-data-between-mysql-databases.html#comments</comments>
		<pubDate>Fri, 05 Jun 2009 12:20:24 +0000</pubDate>
		<dc:creator>Jamie</dc:creator>
				<category><![CDATA[Cakephp]]></category>
		<category><![CDATA[MYSQL]]></category>
		<category><![CDATA[PHP]]></category>

		<guid isPermaLink="false">http://www.lampdeveloper.co.uk/?p=126</guid>
		<description><![CDATA[I used to go down the road of doing a for each on my source table, which I always hated and thought was bad.
This way I can use table locking for MyISAM or transactions, for InnoDB, to make sure the data gets copied across.
I mainly use this method for archiving tables and keep the primary [...]]]></description>
			<content:encoded><![CDATA[<p>I used to go down the road of doing a for each on my source table, which I always hated and thought was bad.</p>
<p>This way I can use table locking for MyISAM or transactions, for InnoDB, to make sure the data gets copied across.</p>
<p>I mainly use this method for archiving tables and keep the primary keys the same.</p>
<p>I have 2 tables created called ads and adsarchives.</p>
<p>What you do is make a copy of your database structure called adsarchives,  and change the primary key so that it doesn&#8217;t auto increment. This mean that you can&#8217;t copy the same data twice. Also the second query won&#8217;t delete your data from the source on a fail.</p>
<p>( Oh by the way, my first example is using Cakephp on a MyISAM table) It would be much better to do transactions for this. But I wasn&#8217;t updating an InnoDB table.</p>
<pre name="code" class="php">

function archiveads($monthsold=false){

if(is_numeric($monthsold) &amp; $monthsold &gt; 1){

$range = date(&#039;Y-m-d H:i:s&#039;, strtotime(&quot;-{$monthsold} months&quot;));

$db =&amp; ConnectionManager::getDataSource($this-&gt;useDbConfig);

$this-&gt;query(&#039;LOCK TABLES ads READ, adsarchives WRITE&#039;);
$this-&gt;query(&quot;INSERT INTO adsarchives SELECT ads.* FROM ads WHERE ads.enddate &lt; &#039;{$range}&#039;&quot;);

$error = $db-&gt;lastError();

$this-&gt;query(&#039;UNLOCK TABLES&#039;);

if(!$error) { $this-&gt;query(&quot;DELETE FROM ads WHERE  ads.enddate &lt; &#039;{$range}&#039;&quot;) ; return true;}else{

$this-&gt;log(&#039;FATAL Error archiving the Ads |&#039;.$error);

}

}else{

return false;
}

}
</pre>
<p>If you want the raw SQl way of doing it try this. I&#8217;m archiving 3 month old data.</p>
<pre name="code" class="sql">

LOCK TABLES ads READ, adsarchives WRITE;
SET @age=(CURRENT_DATE()- INTERVAL 3 MONTH), @today=CURRENT_DATE();

INSERT INTO adsarchives
SELECT ads.*
FROM ads WHERE ads.enddate &lt; @age;

UNLOCK TABLES;
DELETE FROM ads WHERE  ads.enddate &lt; @age;
</pre>
<p class="addtoany_share_save_container">
    <a class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save?sitename=Blog%20of%20a%20LAMP%20Developer%20based%20in%20Richmond%2C%20Surrey&amp;siteurl=http%3A%2F%2Fwww.lampdeveloper.co.uk%2F&amp;linkname=Archiving%20Mysql%20Data%20Tables%20using%20CakePHP%20or%20just%20SQL&amp;linkurl=http%3A%2F%2Fwww.lampdeveloper.co.uk%2Fmysql%2Fhandy-way-to-copy-data-between-mysql-databases.html"><img src="http://www.lampdeveloper.co.uk/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share/Save/Bookmark"/></a>

	</p>]]></content:encoded>
			<wfw:commentRss>http://www.lampdeveloper.co.uk/mysql/handy-way-to-copy-data-between-mysql-databases.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

