<?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>LAMP with ·dotmanila &#187; Linux</title>
	<atom:link href="http://dotmanila.com/blog/tag/linux/feed/" rel="self" type="application/rss+xml" />
	<link>http://dotmanila.com/blog</link>
	<description>Linux, Apache, PHP, MySQL Musings</description>
	<lastBuildDate>Sun, 01 Apr 2012 17:24:01 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Promote a MySQL Slave as Master with Zero Downtime</title>
		<link>http://dotmanila.com/blog/2012/02/promote-a-mysql-slave-as-master-with-zero-downtime/</link>
		<comments>http://dotmanila.com/blog/2012/02/promote-a-mysql-slave-as-master-with-zero-downtime/#comments</comments>
		<pubDate>Wed, 01 Feb 2012 23:32:54 +0000</pubDate>
		<dc:creator>jervin</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[MySQL]]></category>
		<category><![CDATA[replication]]></category>

		<guid isPermaLink="false">http://dotmanila.com/blog/?p=267</guid>
		<description><![CDATA[Whether you are upgrading, decommissioning or putting your current master server in maintenance &#8211; here&#8217;s a quick howto on promoting your slave server as new master for your application writes. This instructions (for my notes and the benefit of the researching readers) covers especially if you have multiple slaves attached to the master. Let&#8217;s assume that your [...]]]></description>
			<content:encoded><![CDATA[<p>Whether you are upgrading, decommissioning or putting your current master server in maintenance &#8211; here&#8217;s a quick howto on promoting your slave server as new master for your application writes. This instructions (for my notes and the benefit of the researching readers) covers especially if you have multiple slaves attached to the master. Let&#8217;s assume that your current active master is host A and the host you&#8217;d like to promote is host B.</p>
<ol>
<li><code>STOP SLAVE;</code> on all slaves including <strong>B</strong> that are attached to <strong>A</strong> directly.</li>
<li>Make sure that <code>log_slave_updates</code> and <code>bin_log</code> is <strong>ON</strong> on <strong>B</strong>.</li>
<li>If you are not taking <strong>A</strong> out of rotation and planning to switch back to it later as your master, you can configure it as slave of <strong>B</strong> forming a master-master pair. Simply take the <code>SHOW MASTER STATUS;</code> coordinates from <strong>B</strong> and use it to <code>CHANGE MASTER TO</code> for <strong>A</strong>.</li>
<li>Save <code>SHOW MASTER STATUS;</code> output from <strong>A</strong>.</li>
<li>Start replication on all the slaves that are attach to <strong>A</strong> again, but only until the coordinates you get from #3 using the syntax <code>START SLAVE UNTIL MASTER_LOG_FILE=&lt;log_file&gt;, MASTER_LOG_POS=&lt;log_pos&gt;</code>. This ensures that all slaves are caught up at exactly the same position so you can safely point them to replicate later to <strong>B</strong>.</li>
<li>Once all slaves have caught up on the same coordinates, now its time to reconfigure the rest of the slaves except <strong>B</strong> to replicate from <strong>B</strong>. Using the <code>SHOW MASTER STATUS;</code> coordinates from <strong>B</strong>, execute a <code>CHANGE MASTER TO MASTER_HOST=B ...</code></li>
<li>Now its time to fetch the remaining events from <strong>A</strong> to <strong>B</strong>, on <strong>B</strong>, <code>STOP SLAVE;</code> then <code>START SLAVE;</code> again, this time replication will retrieve all events since the coordinates we stopped at #4.</li>
<li>Once <strong>B</strong> and its slaves has caught up on replication, you can now point your application to send writes to <strong>B</strong>.</li>
<li>Lastly if you are taking <strong>A</strong> out of rotation but keeping it online, <code>RESET SLAVE;</code> on <strong>B</strong> after <code>Exec_Master_Log_Pos</code> and <code>Read_Master_Log_Pos</code> on <strong>B</strong> have stopped on the same position so that no further writes from <strong>A</strong> is replicated to <strong>B</strong>.</li>
</ol>
<p>Did I miss anything? Of course &#8211; not all failovers are the same, this guide is meant as an overview and must be reviewed to match your situation always. Comments welcome! <img src='http://dotmanila.com/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://dotmanila.com/blog/2012/02/promote-a-mysql-slave-as-master-with-zero-downtime/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Anaconda Invalid Software RAID Metadata Version on Fedora 16</title>
		<link>http://dotmanila.com/blog/2012/01/anaconda-invalid-software-raid-metadata-version-on-fedora-16/</link>
		<comments>http://dotmanila.com/blog/2012/01/anaconda-invalid-software-raid-metadata-version-on-fedora-16/#comments</comments>
		<pubDate>Sat, 21 Jan 2012 14:58:52 +0000</pubDate>
		<dc:creator>jervin</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Networking]]></category>
		<category><![CDATA[Open Source]]></category>
		<category><![CDATA[anaconda]]></category>
		<category><![CDATA[fedora]]></category>
		<category><![CDATA[software raid]]></category>

		<guid isPermaLink="false">http://dotmanila.com/blog/?p=261</guid>
		<description><![CDATA[In case you are upgrading to Fedora 16 and trying to use a software RAID for the /boot partition, at some point Anaconda is bound to complain that the RAID metadata version is invalid. Well this is a known bug and a workaround is available from this bug report. In my case if I just [...]]]></description>
			<content:encoded><![CDATA[<p>In case you are upgrading to Fedora 16 and trying to use a software RAID for the /boot partition, at some point Anaconda is bound to complain that the RAID metadata version is invalid. Well this is a known bug and a workaround is available from this <a href="https://bugzilla.redhat.com/show_bug.cgi?id=750480">bug report</a>.</p>
<p>In my case if I just specify the &#8220;updates&#8221; boot option, Anaconda will try to automatically configure networking &#8211; too bad if you don not have DHCP available. However, if you specify an alternative install method to Anaconda, it will ask you to manually configure your network, in this case you will be able ti use the updates image as well. In short, you just have to specify something like this on your boot options:</p>
<p><code>repo=http://mirror.steadfast.net/fedora/releases/16/Fedora/x86_64/os/ updates=http://dlehman.fedorapeople.org/updates/updates-750480.3.img</code></p>
<p>The only downside is that, obviously, your install media will be over the network. If you have a slow connection then that&#8217;s another story. Do you know any workaround?</p>
]]></content:encoded>
			<wfw:commentRss>http://dotmanila.com/blog/2012/01/anaconda-invalid-software-raid-metadata-version-on-fedora-16/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Failed to read auto-increment value from storage engine</title>
		<link>http://dotmanila.com/blog/2010/11/failed-to-read-auto-increment-value-from-storage-engine/</link>
		<comments>http://dotmanila.com/blog/2010/11/failed-to-read-auto-increment-value-from-storage-engine/#comments</comments>
		<pubDate>Wed, 24 Nov 2010 08:11:11 +0000</pubDate>
		<dc:creator>jervin</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[MySQL]]></category>
		<category><![CDATA[InnoDB]]></category>

		<guid isPermaLink="false">http://dotmanila.com/blog/?p=160</guid>
		<description><![CDATA[If you think the below error is trivial, there might just be two possible causes. ERROR 1467 (HY000) at line 1: Failed to read auto-increment value from storage engine Your table&#8217;s auto increment column datatype is too small i.e. MySQL is not able to generate more auto-increment values beyond TINYINT UNSIGNED because you are trying [...]]]></description>
			<content:encoded><![CDATA[<p>If you think the below error is trivial, there might just be two possible causes.</p>
<p><code>ERROR 1467 (HY000) at line 1: Failed to read auto-increment value from storage engine</code></p>
<ol>
<li>Your table&#8217;s auto increment column datatype is too small i.e. MySQL is not able to generate more auto-increment values beyond TINYINT UNSIGNED because you are trying to insert your 256th record.</li>
<li>It is a bug http://bugs.mysql.com/bug.php?id=36411</li>
</ol>
]]></content:encoded>
			<wfw:commentRss>http://dotmanila.com/blog/2010/11/failed-to-read-auto-increment-value-from-storage-engine/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>mk-parallel-restore Outputs BLOB Data</title>
		<link>http://dotmanila.com/blog/2010/08/mk-parallel-restore-outputs-blob-data/</link>
		<comments>http://dotmanila.com/blog/2010/08/mk-parallel-restore-outputs-blob-data/#comments</comments>
		<pubDate>Sun, 01 Aug 2010 01:54:55 +0000</pubDate>
		<dc:creator>jervin</dc:creator>
				<category><![CDATA[BSD/Mac OSX]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[MySQL]]></category>
		<category><![CDATA[Perl]]></category>
		<category><![CDATA[maatkit]]></category>

		<guid isPermaLink="false">http://dotmanila.com/blog/?p=142</guid>
		<description><![CDATA[Recently I was playing around with the Maatkit tools specifically mk-parallel-dump and mk-parallel-restore for refreshing development database copies with production copies. A problem arises when BLOB data is being displayed on the console and transforming my shell prompt into gibberish and missing the results of the restore. Breaking the restore as soon as the BLOB [...]]]></description>
			<content:encoded><![CDATA[<p>Recently I was playing around with the Maatkit tools specifically mk-parallel-dump and mk-parallel-restore for refreshing development database copies with production copies. A problem arises when BLOB data is being displayed on the console and transforming my shell prompt into gibberish and missing the results of the restore. Breaking the restore as soon as the BLOB starts output, it was revealed that I was getting the &#8220;Got a packet bigger then &#8216;max_allowed_packet&#8217; bytes&#8221; error. After setting this variable to a reasonable value the restore went smoothly.</p>
]]></content:encoded>
			<wfw:commentRss>http://dotmanila.com/blog/2010/08/mk-parallel-restore-outputs-blob-data/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>FFMpeg-PHP: undefined symbol: php_gd_gdImageSetPixel</title>
		<link>http://dotmanila.com/blog/2009/10/ffmpeg-php-undefined-symbol-php_gd_gdimagesetpixel-86/</link>
		<comments>http://dotmanila.com/blog/2009/10/ffmpeg-php-undefined-symbol-php_gd_gdimagesetpixel-86/#comments</comments>
		<pubDate>Fri, 02 Oct 2009 15:01:32 +0000</pubDate>
		<dc:creator>jervin</dc:creator>
				<category><![CDATA[Apache]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[ffmpeg]]></category>
		<category><![CDATA[ffmpeg-php]]></category>
		<category><![CDATA[php-gd]]></category>

		<guid isPermaLink="false">http://dotmanila.com/blog/?p=86</guid>
		<description><![CDATA[I was recently updating ffmpeg-php on one of our servers to the latest SVN release  of the 0.6.3 branch. On a 64bit CentOS 5.3 with PHP 5.2.11, the extension compiled and installed fine however Apache will not load it and spit out the error below: PHP Warning:  PHP Startup: Unable to load dynamic library &#8216;/usr/lib64/php/modules/ffmpeg.so&#8217; [...]]]></description>
			<content:encoded><![CDATA[<p>I was recently updating ffmpeg-php on one of our servers to the latest SVN release  of the 0.6.3 branch. On a 64bit CentOS 5.3 with PHP 5.2.11, the extension compiled and installed fine however Apache will not load it and spit out the error below:</p>
<blockquote><p>PHP Warning:  PHP Startup: Unable to load dynamic library &#8216;/usr/lib64/php/modules/ffmpeg.so&#8217; &#8211; /usr/lib64/php/modules/ffmpeg.so: undefined symbol: php_gd_gdImageSetPixel in Unknown on line 0</p></blockquote>
<p>Surely enough, the GD extension was there, but why is ffmpeg complaining about not finding that shared symbol? Because, ffmpeg is loading first than GD (alphabetically) and such symbol has not been loaded. After adding the GD extension line on top of ffmpeg making sure it loads first the error went away and all is well again.</p>
]]></content:encoded>
			<wfw:commentRss>http://dotmanila.com/blog/2009/10/ffmpeg-php-undefined-symbol-php_gd_gdimagesetpixel-86/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>1280&#215;800 on Dell Inspiron 1501 with Slackware 12.2</title>
		<link>http://dotmanila.com/blog/2009/08/1280x800-on-dell-inspiron-1501-with-slackware-12-2/</link>
		<comments>http://dotmanila.com/blog/2009/08/1280x800-on-dell-inspiron-1501-with-slackware-12-2/#comments</comments>
		<pubDate>Wed, 19 Aug 2009 15:55:03 +0000</pubDate>
		<dc:creator>jervin</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[dell]]></category>
		<category><![CDATA[Slackware]]></category>
		<category><![CDATA[X Server]]></category>
		<category><![CDATA[xorg.conf]]></category>

		<guid isPermaLink="false">http://dotmanila.com/blog/?p=84</guid>
		<description><![CDATA[Finally I got to free up this laptop to be an all around testing machine after I got my wife her new MacBook Pro. Since I&#8217;d like a little more education, I decided to get back to Slackware after a couple of years. Install went fine, nothing much has changed, as this what drives the [...]]]></description>
			<content:encoded><![CDATA[<p>Finally I got to free up this laptop to be an all around testing machine after I got my wife her new MacBook Pro. Since I&#8217;d like a little more education, I decided to get back to Slackware after a couple of years. Install went fine, nothing much has changed, as this what drives the distro and what attributes for it&#8217;s utmost stability, I am not so surprised.</p>
<p>One problem everytime I install a Linux or BSD variant on any laptop is the widescreen resolution. Except for Ubuntu and Fedora, much of them needs manual intervention to have their native widescreen resolution working on that particular distro, Slackware included.</p>
<p>To cut the story short, if you are installing X server for whatever dekstop manager you intend, the default xorg.conf configuration will not help with the widescreen. Simple really, just run xorgsetup, follow your instinct and startx. You should have your beloved widescreen back.</p>
]]></content:encoded>
			<wfw:commentRss>http://dotmanila.com/blog/2009/08/1280x800-on-dell-inspiron-1501-with-slackware-12-2/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Get Detailed Information About Particular IP address Connections Using netstat Command</title>
		<link>http://dotmanila.com/blog/2008/12/get-detailed-information-about-particular-ip-address-connections-using-netstat-command/</link>
		<comments>http://dotmanila.com/blog/2008/12/get-detailed-information-about-particular-ip-address-connections-using-netstat-command/#comments</comments>
		<pubDate>Sun, 14 Dec 2008 11:27:27 +0000</pubDate>
		<dc:creator>jervin</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Networking]]></category>
		<category><![CDATA[Server Security]]></category>
		<category><![CDATA[netstat]]></category>

		<guid isPermaLink="false">http://dotmanila.com/blog/?p=32</guid>
		<description><![CDATA[I was recently investigating a LAMP application bottleneck. Part of which was to monitor web server entry points during peak hours. Looking into segregate connections and what each clients are actually doing I needed some advanced netstat know-how to get thru my goal, so I stumble upon this one from nixCraft...]]></description>
			<content:encoded><![CDATA[<p>I was recently investigating a LAMP application bottleneck. Part of which was to monitor web server entry points during peak hours. Looking into segregate connections and what each clients are actually doing I needed some advanced netstat know-how to get thru my goal, so I stumble upon this one from nixCraft:</p>
<blockquote><p>netstat command and shell pipe feature can be used to dig out more information about particular IP address connection. You can find out total established connections, closing connection, SYN and FIN bits and much more. You can also display summary statistics for each protocol using netstat.</p>
<p>This is useful to find out if your server is under attack or not. You can also list abusive IP address using this method.</p></blockquote>
<p><a href="http://www.cyberciti.biz/tips/netstat-command-tutorial-examples.html" target="_blank">http://www.cyberciti.biz/tips/netstat-command-tutorial-examples.html</a></p>
]]></content:encoded>
			<wfw:commentRss>http://dotmanila.com/blog/2008/12/get-detailed-information-about-particular-ip-address-connections-using-netstat-command/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

