<?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>damonparker.org &#187; Technical</title>
	<atom:link href="http://damonparker.org/blog/category/technical/feed/" rel="self" type="application/rss+xml" />
	<link>http://damonparker.org</link>
	<description>code / ecommerce / life</description>
	<lastBuildDate>Mon, 14 Jun 2010 14:33:17 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0-RC3</generator>
		<item>
		<title>Debugging Wifi Connectivity and Routing</title>
		<link>http://damonparker.org/blog/2010/06/12/debugging-wifi-connectivity-and-routing/</link>
		<comments>http://damonparker.org/blog/2010/06/12/debugging-wifi-connectivity-and-routing/#comments</comments>
		<pubDate>Fri, 11 Jun 2010 21:33:32 +0000</pubDate>
		<dc:creator>damonp</dc:creator>
				<category><![CDATA[Snippets]]></category>
		<category><![CDATA[shell]]></category>

		<guid isPermaLink="false">http://damonparker.org/?p=525</guid>
		<description><![CDATA[Sometimes wifi connectivity issues can be massaged a little by getting a little pushy with it&#8230; turn your internal airport card off. Leave it off for a minute then turn it back on and see if by forcing it to attempt to re-connect to your local network.  Oftentimes this will clear up minor issues. Check [...]]]></description>
			<content:encoded><![CDATA[<p></p><p>Sometimes wifi connectivity issues can be massaged a little by getting a little pushy with it&#8230; turn your internal airport card off. Leave it off for a minute then turn it back on and see if by forcing it to attempt to re-connect to your local network.  Oftentimes this will clear up minor issues.</p>
<p>Check your routing tables:</p>
<div class="codecolorer-container bash default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">netstat -nr</div></div>
<p>Get just the default route:</p>
<div class="codecolorer-container bash default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">netstat -nr <span style="color: #66cc66;">|</span> grep default</div></div>
<p>In action:</p>
<div class="codecolorer-container bash default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #66cc66;">&#91;</span>root<span style="color: #66cc66;">@</span>howie ~<span style="color: #66cc66;">&#93;</span>$ netstat -nr <span style="color: #66cc66;">|</span> grep default<br />
<span style="color: #cc66cc;">5</span>:default &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;192.168.1.1 &nbsp; &nbsp; &nbsp; &nbsp;UGSc &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #cc66cc;">11</span> &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #cc66cc;">5</span> &nbsp; &nbsp; en1</div></div>
 <img src="http://damonparker.org/wp-content/plugins/feed-statistics.php?view=1&post_id=525" width="1" height="1" style="display: none;" /><img src="http://damonparker.org/?ak_action=api_record_view&id=525&type=feed" alt="" />]]></content:encoded>
			<wfw:commentRss>http://damonparker.org/blog/2010/06/12/debugging-wifi-connectivity-and-routing/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Enable Sendmail for PHP mail() in OSX</title>
		<link>http://damonparker.org/blog/2010/02/25/enable-sendmail-for-php-mail-in-osx/</link>
		<comments>http://damonparker.org/blog/2010/02/25/enable-sendmail-for-php-mail-in-osx/#comments</comments>
		<pubDate>Thu, 25 Feb 2010 22:05:41 +0000</pubDate>
		<dc:creator>damonp</dc:creator>
				<category><![CDATA[Snippets]]></category>
		<category><![CDATA[OSX]]></category>
		<category><![CDATA[sendmail]]></category>

		<guid isPermaLink="false">http://damonparker.org/blog/?p=468</guid>
		<description><![CDATA[Since this didn&#8217;t dawn on me for thirty minutes while I pursued other avenues&#8230; In /etc/hostconfig add/edit a line like: MAILSERVER=-YES- Note to self: Look for more OSX server administration clients.]]></description>
			<content:encoded><![CDATA[<p></p><p>Since this didn&#8217;t dawn on me for thirty minutes while I pursued other avenues&#8230;</p>
<p>In /etc/hostconfig add/edit a line like:</p>
<div class="codecolorer-container bash default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #0000ff;">MAILSERVER=</span>-YES-</div></div>
<p>Note to self: Look for more OSX server administration clients.  </p>
 <img src="http://damonparker.org/wp-content/plugins/feed-statistics.php?view=1&post_id=468" width="1" height="1" style="display: none;" /><img src="http://damonparker.org/?ak_action=api_record_view&id=468&type=feed" alt="" />]]></content:encoded>
			<wfw:commentRss>http://damonparker.org/blog/2010/02/25/enable-sendmail-for-php-mail-in-osx/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Apache Log Grepping</title>
		<link>http://damonparker.org/blog/2009/09/14/apache-log-grepping/</link>
		<comments>http://damonparker.org/blog/2009/09/14/apache-log-grepping/#comments</comments>
		<pubDate>Mon, 14 Sep 2009 18:34:51 +0000</pubDate>
		<dc:creator>damonp</dc:creator>
				<category><![CDATA[Snippets]]></category>

		<guid isPermaLink="false">http://damonparker.org/blog/?p=368</guid>
		<description><![CDATA[Nothing beats a full stats package, but with a little grepping and a logfile and we can figure out some quick statistics. Get only hits coming from Google.com/search: grep 'google.com/search' access_log &#124; head -1 Extract only the referrer field: grep 'google.com/search' access_log &#124; head -1 &#124; awk '{print $11}' Get the search terms only: grep [...]]]></description>
			<content:encoded><![CDATA[<p></p><p>Nothing beats a full stats package, but with a little grepping and a logfile and we can figure out some quick statistics.</p>
<p><strong>Get only hits coming from Google.com/search:</strong></p>
<div class="codecolorer-container bash default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">grep <span style="color: #ff0000;">'google.com/search'</span> access_log <span style="color: #66cc66;">|</span> head -<span style="color: #cc66cc;">1</span></div></div>
<p><strong>Extract only the referrer field:</strong></p>
<div class="codecolorer-container bash default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">grep <span style="color: #ff0000;">'google.com/search'</span> access_log <span style="color: #66cc66;">|</span> head -<span style="color: #cc66cc;">1</span> <span style="color: #66cc66;">|</span> awk <span style="color: #ff0000;">'{print $11}'</span></div></div>
<p><strong>Get the search terms only:</strong></p>
<div class="codecolorer-container bash default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">grep <span style="color: #ff0000;">'google.com/search'</span> access_log <span style="color: #66cc66;">|</span> \<br />
&nbsp; head -<span style="color: #cc66cc;">1</span> <span style="color: #66cc66;">|</span> \<br />
&nbsp; awk <span style="color: #ff0000;">'{print $11}'</span> <span style="color: #66cc66;">|</span> \<br />
&nbsp; cut -d\? -f2 <span style="color: #66cc66;">|</span> cut -d\<span style="color: #66cc66;">&amp;</span> -f1 <span style="color: #66cc66;">|</span> \<br />
&nbsp; sed <span style="color: #ff0000;">'s/+/ /g;s/%22/&quot;/g;s/q=//'</span></div></div>
<p>Here&#8217;s a little script that puts it all together.  It finds the unique search terms, cleans out the trash, sorts them and list the top twenty five in order of descending hit count.</p>
<div class="codecolorer-container bash default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #808080; font-style: italic;">#!/bin/sh</span><br />
<span style="color: #0000ff;">LOG=</span><span style="color: #ff0000;">&quot;/var/logs/httpd/access_log&quot;</span><br />
grep <span style="color: #ff0000;">'google.com/search'</span> <span style="color: #0000ff;">$LOG</span> <span style="color: #66cc66;">|</span> \<br />
&nbsp; awk <span style="color: #ff0000;">'{print $11}'</span> <span style="color: #66cc66;">|</span> \<br />
&nbsp; cut -d\? -f2 <span style="color: #66cc66;">|</span> cut -d\<span style="color: #66cc66;">&amp;</span> -f1 <span style="color: #66cc66;">|</span> \<br />
&nbsp; sed <span style="color: #ff0000;">'s/+/ /g;s/%22/&quot;/g;s/q=//'</span> <span style="color: #66cc66;">|</span> \<br />
&nbsp; sed <span style="color: #ff0000;">'s/%[0-9a-fA-F][0-9a-fA-F]/ /g;s/&quot;//g'</span> <span style="color: #66cc66;">|</span> \<br />
&nbsp; grep -v <span style="color: #ff0000;">'='</span> <span style="color: #66cc66;">|</span> sort <span style="color: #66cc66;">|</span> uniq -c <span style="color: #66cc66;">|</span> sort -rn <span style="color: #66cc66;">|</span> head -<span style="color: #cc66cc;">25</span></div></div>
<p>To see them all remove the <code class="codecolorer bash default"><span class="bash"><span style="color: #66cc66;">|</span> head -<span style="color: #cc66cc;">25</span></span></code> statement at the end of the command.</p>
<p>Thanks to an article at <a href="http://www.linuxjournal.com/article/9417">Linux Journal</a> for the examples.</p>
 <img src="http://damonparker.org/wp-content/plugins/feed-statistics.php?view=1&post_id=368" width="1" height="1" style="display: none;" /><img src="http://damonparker.org/?ak_action=api_record_view&id=368&type=feed" alt="" />]]></content:encoded>
			<wfw:commentRss>http://damonparker.org/blog/2009/09/14/apache-log-grepping/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Find setuid root Files</title>
		<link>http://damonparker.org/blog/2009/09/10/find-setuid-root-files/</link>
		<comments>http://damonparker.org/blog/2009/09/10/find-setuid-root-files/#comments</comments>
		<pubDate>Fri, 11 Sep 2009 04:29:20 +0000</pubDate>
		<dc:creator>damonp</dc:creator>
				<category><![CDATA[Snippets]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Security]]></category>

		<guid isPermaLink="false">http://damonparker.org/blog/?p=452</guid>
		<description><![CDATA[Find all setuid / setgid files owned by root:
find / -user root -type f \( -perm -4000 -o -perm -2000 \) -exec ls -ld '{}' \;

Find all setuid / setgid files owned by any user:
find / -type f \( -perm -4000 -o -perm -2000 \) -exec ls -ld '{}' \;]]></description>
			<content:encoded><![CDATA[<p></p><p>Find all setuid / setgid files owned by root:</p>
<div class="codecolorer-container bash default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">find <span style="color: #66cc66;">/</span> -user root -<span style="color: #000066;">type</span> f \<span style="color: #66cc66;">&#40;</span> -perm -<span style="color: #cc66cc;">4000</span> -o -perm -<span style="color: #cc66cc;">2000</span> \<span style="color: #66cc66;">&#41;</span> -<span style="color: #000066;">exec</span> ls -ld <span style="color: #ff0000;">'{}'</span> \;</div></div>
<p>Find all setuid / setgid files owned by any user:</p>
<div class="codecolorer-container bash default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">find <span style="color: #66cc66;">/</span> -<span style="color: #000066;">type</span> f \<span style="color: #66cc66;">&#40;</span> -perm -<span style="color: #cc66cc;">4000</span> -o -perm -<span style="color: #cc66cc;">2000</span> \<span style="color: #66cc66;">&#41;</span> -<span style="color: #000066;">exec</span> ls -ld <span style="color: #ff0000;">'{}'</span> \;</div></div>
 <img src="http://damonparker.org/wp-content/plugins/feed-statistics.php?view=1&post_id=452" width="1" height="1" style="display: none;" /><img src="http://damonparker.org/?ak_action=api_record_view&id=452&type=feed" alt="" />]]></content:encoded>
			<wfw:commentRss>http://damonparker.org/blog/2009/09/10/find-setuid-root-files/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Debugging HTTP Headers with cURL</title>
		<link>http://damonparker.org/blog/2009/08/31/debugging-http-headers-with-curl/</link>
		<comments>http://damonparker.org/blog/2009/08/31/debugging-http-headers-with-curl/#comments</comments>
		<pubDate>Mon, 31 Aug 2009 16:05:39 +0000</pubDate>
		<dc:creator>damonp</dc:creator>
				<category><![CDATA[Snippets]]></category>
		<category><![CDATA[shell]]></category>

		<guid isPermaLink="false">http://damonparker.org/blog/?p=369</guid>
		<description><![CDATA[curl -I http://damonparker.org More info on cURL]]></description>
			<content:encoded><![CDATA[<p></p><div class="codecolorer-container bash default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">curl -I http:<span style="color: #66cc66;">//</span>damonparker.org</div></div>
<p><a href="http://curl.haxx.se/docs/manpage.html">More info on cURL</a></p>
 <img src="http://damonparker.org/wp-content/plugins/feed-statistics.php?view=1&post_id=369" width="1" height="1" style="display: none;" /><img src="http://damonparker.org/?ak_action=api_record_view&id=369&type=feed" alt="" />]]></content:encoded>
			<wfw:commentRss>http://damonparker.org/blog/2009/08/31/debugging-http-headers-with-curl/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>DNS, Lookupd and OS X</title>
		<link>http://damonparker.org/blog/2007/11/15/dns-lookupd-and-os-x/</link>
		<comments>http://damonparker.org/blog/2007/11/15/dns-lookupd-and-os-x/#comments</comments>
		<pubDate>Thu, 15 Nov 2007 19:27:30 +0000</pubDate>
		<dc:creator>damonp</dc:creator>
				<category><![CDATA[Apple / Mac]]></category>

		<guid isPermaLink="false">http://damonparker.org/blog/2007/11/15/dns-lookupd-and-os-x/</guid>
		<description><![CDATA[Pre-Leopard the command to force OS X to flush and reload it&#8217;s DNS cache was: sudo lookupd -flushcache In Leopard, lookupd no longer exists. Instead force a DNS cache refresh with: sudo dscacheutil -flushcache]]></description>
			<content:encoded><![CDATA[<p></p><p>Pre-Leopard the command to force OS X to flush and reload it&#8217;s DNS cache was:</p>
<div class="codecolorer-container bash default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">sudo lookupd -flushcache</div></div>
<p>In Leopard, <em>lookupd</em> no longer exists.  Instead force a DNS cache refresh with:</p>
<div class="codecolorer-container bash default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">sudo dscacheutil -flushcache</div></div>
 <img src="http://damonparker.org/wp-content/plugins/feed-statistics.php?view=1&post_id=384" width="1" height="1" style="display: none;" /><img src="http://damonparker.org/?ak_action=api_record_view&id=384&type=feed" alt="" />]]></content:encoded>
			<wfw:commentRss>http://damonparker.org/blog/2007/11/15/dns-lookupd-and-os-x/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>OSX Scrollbars Top and Bottom</title>
		<link>http://damonparker.org/blog/2007/11/05/osx-scrollbars-top-and-bottom/</link>
		<comments>http://damonparker.org/blog/2007/11/05/osx-scrollbars-top-and-bottom/#comments</comments>
		<pubDate>Mon, 05 Nov 2007 22:00:16 +0000</pubDate>
		<dc:creator>damonp</dc:creator>
				<category><![CDATA[Snippets]]></category>

		<guid isPermaLink="false">http://damonparker.org/blog/2007/11/05/osx-scrollbars-top-and-bottom/</guid>
		<description><![CDATA[In Terminal: defaults write &#34;Apple Global Domain&#34; AppleScrollBarVariant DoubleBoth]]></description>
			<content:encoded><![CDATA[<p></p><p>In Terminal:</p>
<div class="codecolorer-container bash default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">defaults write <span style="color: #ff0000;">&quot;Apple Global Domain&quot;</span> AppleScrollBarVariant DoubleBoth</div></div>
 <img src="http://damonparker.org/wp-content/plugins/feed-statistics.php?view=1&post_id=383" width="1" height="1" style="display: none;" /><img src="http://damonparker.org/?ak_action=api_record_view&id=383&type=feed" alt="" />]]></content:encoded>
			<wfw:commentRss>http://damonparker.org/blog/2007/11/05/osx-scrollbars-top-and-bottom/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>MailAnnounce Applescript Source</title>
		<link>http://damonparker.org/blog/2007/10/09/mailannounce-applescript-source/</link>
		<comments>http://damonparker.org/blog/2007/10/09/mailannounce-applescript-source/#comments</comments>
		<pubDate>Tue, 09 Oct 2007 13:49:41 +0000</pubDate>
		<dc:creator>damonp</dc:creator>
				<category><![CDATA[Apple / Mac]]></category>
		<category><![CDATA[Development]]></category>

		<guid isPermaLink="false">http://damonparker.org/blog/2007/10/09/mailannounce-applescript-source/</guid>
		<description><![CDATA[I have received several requests for the source of my MailAnnounce script that is able to speak the subject of mails using Mail.app and Applescript. Source for version 1 of the script is now available.]]></description>
			<content:encoded><![CDATA[<p></p><p>I have received several requests for the source of my <a href="http://damonparker.org/blog/2006/04/12/mailannounce-applescript-app/">MailAnnounce</a> script that is able to speak the subject of mails using Mail.app and Applescript.</p>
<p>Source for version 1 of the script is now <a href="http://damonparker.org/source/MailAnnounce.scpt.txt">available</a>.</p>
 <img src="http://damonparker.org/wp-content/plugins/feed-statistics.php?view=1&post_id=382" width="1" height="1" style="display: none;" /><img src="http://damonparker.org/?ak_action=api_record_view&id=382&type=feed" alt="" />]]></content:encoded>
			<wfw:commentRss>http://damonparker.org/blog/2007/10/09/mailannounce-applescript-source/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>rpmdb: unable to join the environment</title>
		<link>http://damonparker.org/blog/2007/09/10/rpmdb-unable-to-join-the-environment/</link>
		<comments>http://damonparker.org/blog/2007/09/10/rpmdb-unable-to-join-the-environment/#comments</comments>
		<pubDate>Mon, 10 Sep 2007 17:03:15 +0000</pubDate>
		<dc:creator>damonp</dc:creator>
				<category><![CDATA[SysAdmin]]></category>

		<guid isPermaLink="false">http://damonparker.org/blog/2007/09/10/rpmdb-unable-to-join-the-environment/</guid>
		<description><![CDATA[This weekend I was contacted by a client regarding a server that had run out of room on the main hard drive. Among the things that were corrupted by the drive filling up was the RPM database. When trying to query of upgrade any package, the error message rpmdb: unable to join the environment error: [...]]]></description>
			<content:encoded><![CDATA[<p></p><p>This weekend I was contacted by a client regarding a server that had run out of room on the main hard drive.  Among the things that were corrupted by the drive filling up was the <a href="http://en.wikipedia.org/wiki/RPM_Package_Manager" rel="external">RPM</a> database.</p>
<p>When trying to query of upgrade any package, the error message</p>
<div class="codecolorer-container bash default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">rpmdb: unable to join the environment<br />
error: db4 error<span style="color: #66cc66;">&#40;</span><span style="color: #cc66cc;">11</span><span style="color: #66cc66;">&#41;</span> from dbenv-<span style="color: #66cc66;">&gt;</span>open: Resource temporarily unavailable<br />
error: cannot open Packages index using db3 - Resource temporarily unavailable <span style="color: #66cc66;">&#40;</span><span style="color: #cc66cc;">11</span><span style="color: #66cc66;">&#41;</span><br />
error: cannot open Packages database <span style="color: #b1b100;">in</span> <span style="color: #66cc66;">/</span>var<span style="color: #66cc66;">/</span>lib<span style="color: #66cc66;">/</span>rpm<br />
warning: <span style="color: #66cc66;">/</span>root<span style="color: #66cc66;">/</span>webmin-<span style="color: #cc66cc;">1.360</span>-<span style="color: #cc66cc;">1</span>.noarch.rpm: V3 DSA signature: NOKEY, key ID 11f63c51<br />
rpmdb: unable to join the environment<br />
error: db4 error<span style="color: #66cc66;">&#40;</span><span style="color: #cc66cc;">11</span><span style="color: #66cc66;">&#41;</span> from dbenv-<span style="color: #66cc66;">&gt;</span>open: Resource temporarily unavailable<br />
error: cannot open Packages database <span style="color: #b1b100;">in</span> <span style="color: #66cc66;">/</span>var<span style="color: #66cc66;">/</span>lib<span style="color: #66cc66;">/</span>rpm<br />
rpmdb: unable to join the environment<br />
error: db4 error<span style="color: #66cc66;">&#40;</span><span style="color: #cc66cc;">11</span><span style="color: #66cc66;">&#41;</span> from dbenv-<span style="color: #66cc66;">&gt;</span>open: Resource temporarily unavailable<br />
error: cannot open Packages database <span style="color: #b1b100;">in</span> <span style="color: #66cc66;">/</span>var<span style="color: #66cc66;">/</span>lib<span style="color: #66cc66;">/</span>rpm</div></div>
<p>A search turned up this howto on <a href="http://www.rpm.org/hintskinks/repairdb/" rel="external">repairing the db</a>.</p>
<p>These two commands made quick work of the fix.  First remove any old lock files:</p>
<div class="codecolorer-container bash default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">rm -f <span style="color: #66cc66;">/</span>var<span style="color: #66cc66;">/</span>lib<span style="color: #66cc66;">/</span>rpm<span style="color: #66cc66;">/</span>__db<span style="color: #66cc66;">*</span></div></div>
<p>Then rebuild the RPM database:</p>
<div class="codecolorer-container bash default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">rpm -vv --rebuilddb</div></div>
 <img src="http://damonparker.org/wp-content/plugins/feed-statistics.php?view=1&post_id=380" width="1" height="1" style="display: none;" /><img src="http://damonparker.org/?ak_action=api_record_view&id=380&type=feed" alt="" />]]></content:encoded>
			<wfw:commentRss>http://damonparker.org/blog/2007/09/10/rpmdb-unable-to-join-the-environment/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Quickly Copy MySQL Database to Remote Host</title>
		<link>http://damonparker.org/blog/2007/08/31/quickly-copy-mysql-database-to-remote-host/</link>
		<comments>http://damonparker.org/blog/2007/08/31/quickly-copy-mysql-database-to-remote-host/#comments</comments>
		<pubDate>Fri, 31 Aug 2007 16:29:50 +0000</pubDate>
		<dc:creator>damonp</dc:creator>
				<category><![CDATA[SQL]]></category>
		<category><![CDATA[Snippets]]></category>

		<guid isPermaLink="false">http://damonparker.org/blog/2007/08/31/quickly-copy-mysql-database-to-remote-host/</guid>
		<description><![CDATA[Copy an entire database: mysqldump LOCAL_DBNAME &#124; ssh USER@REMOTE_HOST mysql -p REMOTE_DBNAME Copy a single table: mysqldump LOCAL_DBNAME LOCAL_TABLE &#124; ssh USER@REMOTE_HOST -p REMOTE_DBNAME REMOTE_TABLE This shortcut only works if you can access the local DB without a password. If you have to login to both local and remote MySQL servers, the MySQL password prompts [...]]]></description>
			<content:encoded><![CDATA[<p></p><p>Copy an entire database:</p>
<div class="codecolorer-container bash default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">mysqldump LOCAL_DBNAME <span style="color: #66cc66;">|</span> ssh USER<span style="color: #66cc66;">@</span>REMOTE_HOST mysql -p REMOTE_DBNAME</div></div>
<p>Copy a single table:</p>
<div class="codecolorer-container bash default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">mysqldump LOCAL_DBNAME LOCAL_TABLE <span style="color: #66cc66;">|</span> ssh USER<span style="color: #66cc66;">@</span>REMOTE_HOST -p REMOTE_DBNAME REMOTE_TABLE</div></div>
<p>This shortcut only works if you can access the local DB without a password.  If you have to login to both local and remote MySQL servers, the MySQL password prompts get mashed together.  You could specify the password on the command line like</p>
<div class="codecolorer-container bash default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">-pPASSWORD</div></div>
<p>but your shell may keep the password in its history so that anyone with access to your account could pick through your shell history and retrieve the password.  Using the MySQL password prompt doesn&#8217;t do this.</p>
 <img src="http://damonparker.org/wp-content/plugins/feed-statistics.php?view=1&post_id=377" width="1" height="1" style="display: none;" /><img src="http://damonparker.org/?ak_action=api_record_view&id=377&type=feed" alt="" />]]></content:encoded>
			<wfw:commentRss>http://damonparker.org/blog/2007/08/31/quickly-copy-mysql-database-to-remote-host/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

<!-- Performance optimized by W3 Total Cache. Learn more: http://www.w3-edge.com/wordpress-plugins/

Minified using xcache
Page Caching using xcache
Database Caching 18/56 queries in 0.040 seconds using xcache
Content Delivery Network via cdn.damonparker.org/q9i5a4w8/cds

Served from: damonparker.org @ 2010-07-30 13:59:09 -->