<?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/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
	>

<channel>
	<title>The Gahooa Perspective &#187; Linux</title>
	<atom:link href="http://blog.gahooa.com/category/linux/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.gahooa.com</link>
	<description>Thoughts on Life, Engineering, Technology, Business, and more...</description>
	<lastBuildDate>Fri, 23 Jul 2010 07:09:40 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
<cloud domain='blog.gahooa.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://www.gravatar.com/blavatar/167b7031b951e9f11655a8ef27c12d71?s=96&#038;d=http://s2.wp.com/i/buttonw-com.png</url>
		<title>The Gahooa Perspective &#187; Linux</title>
		<link>http://blog.gahooa.com</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://blog.gahooa.com/osd.xml" title="The Gahooa Perspective" />
	<atom:link rel='hub' href='http://blog.gahooa.com/?pushpress=hub'/>
		<item>
		<title>How to checkout and track a remote git branch</title>
		<link>http://blog.gahooa.com/2010/07/09/how-to-checkout-and-track-a-remote-git-branch/</link>
		<comments>http://blog.gahooa.com/2010/07/09/how-to-checkout-and-track-a-remote-git-branch/#comments</comments>
		<pubDate>Fri, 09 Jul 2010 18:16:08 +0000</pubDate>
		<dc:creator>Jason Garber</dc:creator>
				<category><![CDATA[Engineering]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Open Source]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[Technique]]></category>
		<category><![CDATA[git]]></category>
		<category><![CDATA[git branch]]></category>
		<category><![CDATA[version control]]></category>

		<guid isPermaLink="false">http://blog.gahooa.com/?p=239</guid>
		<description><![CDATA[One of those really handy things to remember&#8230;  When git &#8220;tracks&#8221; a branch, it basically sets up an entry in .git/config which tells git what to do with push and pull.  For example: I had a remote branch called Task/Round3.3. I wanted to work on it locally, but have push and pull work right. So [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.gahooa.com&blog=6218261&post=239&subd=gahooa&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<p>One of those really handy things to remember&#8230;  When git &#8220;tracks&#8221; a branch, it basically sets up an entry in .git/config which tells git what to do with push and pull.  For example:</p>
<p>I had a remote branch called Task/Round3.3.</p>
<p><strong>I wanted to work on it locally, but have push and pull work right.</strong></p>
<p>So I ran this:</p>
<pre><span style="color:#0000ff;">git checkout -b Task/Round3.3 --track origin/Task/Round3.3</span></pre>
<p>To which git said:</p>
<pre><span style="color:#0000ff;">Branch Task/Round3.3 set up to track remote branch refs/remotes/origin/Task/Round3.3.
Switched to a new branch "Task/Round3.3"</span></pre>
<p>And in .git/config, these lines were added:</p>
<pre><span style="color:#0000ff;">[branch "Task/Round3.3"]
remote = origin
merge = refs/heads/Task/Round3.3</span></pre>
<p>Now, when I checkout Task/Round3.3, I am able to say `git pull` and `git push`, and it will do the &#8220;right thing&#8221;&#8230;</p>
<br /> Tagged: <a href='http://blog.gahooa.com/tag/git/'>git</a>, <a href='http://blog.gahooa.com/tag/git-branch/'>git branch</a>, <a href='http://blog.gahooa.com/tag/version-control/'>version control</a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/gahooa.wordpress.com/239/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/gahooa.wordpress.com/239/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/gahooa.wordpress.com/239/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/gahooa.wordpress.com/239/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/gahooa.wordpress.com/239/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/gahooa.wordpress.com/239/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/gahooa.wordpress.com/239/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/gahooa.wordpress.com/239/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/gahooa.wordpress.com/239/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/gahooa.wordpress.com/239/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.gahooa.com&blog=6218261&post=239&subd=gahooa&ref=&feed=1" />]]></content:encoded>
			<wfw:commentRss>http://blog.gahooa.com/2010/07/09/how-to-checkout-and-track-a-remote-git-branch/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="" medium="image">
			<media:title type="html">gahooa</media:title>
		</media:content>
	</item>
		<item>
		<title>Ubuntu Post-Install tips&#8230;</title>
		<link>http://blog.gahooa.com/2010/06/14/ubuntu-post-install-tips/</link>
		<comments>http://blog.gahooa.com/2010/06/14/ubuntu-post-install-tips/#comments</comments>
		<pubDate>Mon, 14 Jun 2010 21:10:51 +0000</pubDate>
		<dc:creator>Jason Garber</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Open Source]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[System Administration]]></category>
		<category><![CDATA[Technique]]></category>
		<category><![CDATA[Ubuntu]]></category>
		<category><![CDATA[Ubuntu Partner Repositories]]></category>
		<category><![CDATA[Ubuntu Setup]]></category>

		<guid isPermaLink="false">http://blog.gahooa.com/?p=231</guid>
		<description><![CDATA[I received this from a friend, and thought I would post it here in case anyone would find it useful. After Installing Ubuntu, basically I do this: Go to: System -&#62; Administration -&#62; Software Sources -&#62; Other Sofware, and enable partner repository. After that, we can this on a Terminal: sudo apt-get update sudo apt-get dist-upgrade sudo [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.gahooa.com&blog=6218261&post=231&subd=gahooa&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<p><strong>I received this from a friend, and thought I would post it here in case anyone would find it useful.</strong></p>
<blockquote><p>After Installing Ubuntu, basically I do this:</p>
<p>Go to:<br />
System -&gt; Administration -&gt; Software Sources -&gt; Other Sofware, and enable partner repository.</p>
<p>After that, we can this on a Terminal:</p>
<p>sudo apt-get update<br />
sudo apt-get dist-upgrade<br />
sudo apt-get install ubuntu-restricted-extras<br />
sudo /usr/share/doc/libdvdread4/install-css.sh</p></blockquote>
<br /> Tagged: <a href='http://blog.gahooa.com/tag/ubuntu/'>Ubuntu</a>, <a href='http://blog.gahooa.com/tag/ubuntu-partner-repositories/'>Ubuntu Partner Repositories</a>, <a href='http://blog.gahooa.com/tag/ubuntu-setup/'>Ubuntu Setup</a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/gahooa.wordpress.com/231/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/gahooa.wordpress.com/231/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/gahooa.wordpress.com/231/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/gahooa.wordpress.com/231/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/gahooa.wordpress.com/231/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/gahooa.wordpress.com/231/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/gahooa.wordpress.com/231/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/gahooa.wordpress.com/231/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/gahooa.wordpress.com/231/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/gahooa.wordpress.com/231/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.gahooa.com&blog=6218261&post=231&subd=gahooa&ref=&feed=1" />]]></content:encoded>
			<wfw:commentRss>http://blog.gahooa.com/2010/06/14/ubuntu-post-install-tips/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="" medium="image">
			<media:title type="html">gahooa</media:title>
		</media:content>
	</item>
		<item>
		<title>nginx restart error</title>
		<link>http://blog.gahooa.com/2010/02/24/nginx-restart-error/</link>
		<comments>http://blog.gahooa.com/2010/02/24/nginx-restart-error/#comments</comments>
		<pubDate>Thu, 25 Feb 2010 03:32:10 +0000</pubDate>
		<dc:creator>Jason Garber</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[System Administration]]></category>
		<category><![CDATA[Technique]]></category>
		<category><![CDATA[nginx]]></category>
		<category><![CDATA[nginx configuration]]></category>
		<category><![CDATA[nginx error]]></category>

		<guid isPermaLink="false">http://blog.gahooa.com/?p=209</guid>
		<description><![CDATA[Was playing around with nginx on Centos 5 (EPEL package). Most of the time I ran: service nginx restart I would get this message in the /var/log/nginx/error.log file: panic: MUTEX_LOCK (22) [op.c:352]. After some hunting around, it appears to be a known bug in nginx (perhaps perl in nginx?)&#8230; Anyway, a simple workaround is to [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.gahooa.com&blog=6218261&post=209&subd=gahooa&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<p>Was playing around with nginx on Centos 5 (EPEL package).</p>
<p>Most of the time I ran:</p>
<pre class="brush: plain;">service nginx restart</pre>
<p>I would get this message in the /var/log/nginx/error.log file:</p>
<pre class="brush: plain;">panic: MUTEX_LOCK (22) [op.c:352].</pre>
<p>After some hunting around, it appears to be a known bug in nginx (perhaps perl in nginx?)&#8230; Anyway, a simple workaround is to do this:</p>
<pre class="brush: plain;">
service nginx stop
service nginx start
</pre>
<p>Or, simply edit <strong>/etc/init.d/nginx, and add the sleep 1 line:</strong></p>
<pre class="brush: plain;">
51 restart() {
52     configtest || return $?
53     stop
54     sleep 1
55     start
56 }
</pre>
<p>Nice workround!</p>
<br /> Tagged: <a href='http://blog.gahooa.com/tag/nginx/'>nginx</a>, <a href='http://blog.gahooa.com/tag/nginx-configuration/'>nginx configuration</a>, <a href='http://blog.gahooa.com/tag/nginx-error/'>nginx error</a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/gahooa.wordpress.com/209/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/gahooa.wordpress.com/209/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/gahooa.wordpress.com/209/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/gahooa.wordpress.com/209/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/gahooa.wordpress.com/209/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/gahooa.wordpress.com/209/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/gahooa.wordpress.com/209/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/gahooa.wordpress.com/209/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/gahooa.wordpress.com/209/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/gahooa.wordpress.com/209/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.gahooa.com&blog=6218261&post=209&subd=gahooa&ref=&feed=1" />]]></content:encoded>
			<wfw:commentRss>http://blog.gahooa.com/2010/02/24/nginx-restart-error/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="" medium="image">
			<media:title type="html">gahooa</media:title>
		</media:content>
	</item>
		<item>
		<title>Example Automated MySQL Backup Script</title>
		<link>http://blog.gahooa.com/2009/12/26/example-automated-mysql-backup-script/</link>
		<comments>http://blog.gahooa.com/2009/12/26/example-automated-mysql-backup-script/#comments</comments>
		<pubDate>Sat, 26 Dec 2009 18:23:21 +0000</pubDate>
		<dc:creator>Jason Garber</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[System Administration]]></category>
		<category><![CDATA[Technique]]></category>
		<category><![CDATA[backup]]></category>
		<category><![CDATA[Backup Script]]></category>
		<category><![CDATA[MySQL]]></category>

		<guid isPermaLink="false">http://blog.gahooa.com/?p=190</guid>
		<description><![CDATA[Rather than use --all-databases, which will prevent you from being able to selectively restore any single database, consider the following: Ideally, you should have a daily backup, with some history. It should be bulletproof (--force), it should be logged (&#62;&#62; ...log), it should be compressed (&#124; gzip), it should keep separate copies of each database, [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.gahooa.com&blog=6218261&post=190&subd=gahooa&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<p>Rather than use <code>--all-databases</code>, which will prevent you from being able to selectively restore any single database, consider the following:</p>
<p>Ideally, you should have a daily backup, with some history.  It should be bulletproof (<code>--force</code>), it should be logged (<code>&gt;&gt; ...log</code>), it should be compressed (<code>| gzip</code>), it should keep separate copies of each database, and it should automatically pick up any databases that are added.</p>
<p><strong>Consider, rather, a shell script like this:</strong></p>
<pre>
<pre class="brush: bash;">
#!/bin/bash

Host=server.domain.com
BDir=/home/backup/backup/mysql

Dump=&quot;/usr/bin/mysqldump --skip-extended-insert --force&quot;
MySQL=/usr/bin/mysql

Today=$(date &quot;+%a&quot;)

# Get a list of all databases
Databases=$(echo &quot;SHOW DATABASES&quot; | $MySQL -h $Host)

for db in $Databases; do
        date=`date`
        file=&quot;$BDir/$Host-$db-$Today.sql.gz&quot;
        echo &quot;Backing up '$db' from '$Host' on '$date' to: &quot;
        echo &quot;   $file&quot;
        $Dump -h $Host $db | gzip &gt; $file
done
</pre>
</pre>
<p>Which is assuming that you have a file <code>~/.my.cnf</code> (chmod 600), that has:</p>
<pre>
<pre class="brush: plain;">
[client]
user = &quot;BACKUP&quot;
password = &quot;SOMEPASS8342783492&quot;
</pre>
</pre>
<p>Make sure that whatever user you are using for <code>BACKUP</code> has this grant statement:</p>
<pre>
<pre class="brush: sql;">
GRANT
  SELECT, SHOW VIEW ON *.*
  TO BACKUP@localhost
  IDENTIFIED BY 'SOMEPASS8342783492';
</pre>
</pre>
<p>So simply add this to a nightly cronjob, and you have a daily backup that rotates each 7 days week.</p>
<pre>
<pre class="brush: plain;">
0 3 * * *   backup-mysql &gt;&gt; backup-mysql.log 2&gt;&gt; backup-mysql.log
</pre>
</pre>
<hr />
<p>The backup directory then contains:</p>
<pre>-rw-r--r-- 1 backup backup 2217482184 Sep  3 13:35 base.appcove.net-VOS4_0-20090903.sql.gz
-rw-rw-r-- 1 backup backup 2505876287 Dec 25 00:48 base.appcove.net-VOS4_0-Fri.sql.gz
-rw-r--r-- 1 backup backup 2500384029 Dec 21 00:48 base.appcove.net-VOS4_0-Mon.sql.gz
-rw-r--r-- 1 backup backup 2506849331 Dec 26 00:48 base.appcove.net-VOS4_0-Sat.sql.gz
-rw-r--r-- 1 backup backup 2499859469 Dec 20 00:48 base.appcove.net-VOS4_0-Sun.sql.gz
-rw-rw-r-- 1 backup backup 2505046147 Dec 24 00:48 base.appcove.net-VOS4_0-Thu.sql.gz
-rw-rw-r-- 1 backup backup 2502277743 Dec 22 00:48 base.appcove.net-VOS4_0-Tue.sql.gz
-rw-r--r-- 1 backup backup 2504169910 Dec 23 00:48 base.appcove.net-VOS4_0-Wed.sql.gz
-rw-r--r-- 1 backup backup   76983829 Dec 25 00:49 base.appcove.net-VOS4_Mail_0-Fri.sql.gz
-rw-r--r-- 1 backup backup   76983829 Dec 21 00:49 base.appcove.net-VOS4_Mail_0-Mon.sql.gz
-rw-r--r-- 1 backup backup   76983829 Dec 26 00:49 base.appcove.net-VOS4_Mail_0-Sat.sql.gz
-rw-r--r-- 1 backup backup   76983829 Dec 20 00:48 base.appcove.net-VOS4_Mail_0-Sun.sql.gz
-rw-rw-r-- 1 backup backup   76983829 Dec 24 00:49 base.appcove.net-VOS4_Mail_0-Thu.sql.gz
-rw-rw-r-- 1 backup backup   76983829 Dec 22 00:49 base.appcove.net-VOS4_Mail_0-Tue.sql.gz
-rw-r--r-- 1 backup backup   76983829 Dec 23 00:49 base.appcove.net-VOS4_Mail_0-Wed.sql.gz
-rw-r--r-- 1 backup backup  304803726 Dec 25 00:49 base.appcove.net-WeSell_0-Fri.sql.gz
-rw-r--r-- 1 backup backup  303480087 Dec 21 00:49 base.appcove.net-WeSell_0-Mon.sql.gz
-rw-r--r-- 1 backup backup  304710121 Dec 26 00:49 base.appcove.net-WeSell_0-Sat.sql.gz
-rw-r--r-- 1 backup backup  303791294 Dec 20 00:49 base.appcove.net-WeSell_0-Sun.sql.gz
-rw-rw-r-- 1 backup backup  305315415 Dec 24 00:49 base.appcove.net-WeSell_0-Thu.sql.gz
-rw-rw-r-- 1 backup backup  302516217 Dec 22 00:49 base.appcove.net-WeSell_0-Tue.sql.gz
-rw-r--r-- 1 backup backup  303314217 Dec 23 00:49 base.appcove.net-WeSell_0-Wed.sql.gz
-rw-r--r-- 1 backup backup     135301 Dec 25 00:30 dc40.appcove.net-mysql-Fri.sql.gz
-rw-r--r-- 1 backup backup     135301 Dec 21 00:30 dc40.appcove.net-mysql-Mon.sql.gz
-rw-r--r-- 1 backup backup     135301 Dec 26 00:30 dc40.appcove.net-mysql-Sat.sql.gz
-rw-r--r-- 1 backup backup     135301 Dec 20 00:30 dc40.appcove.net-mysql-Sun.sql.gz
-rw-rw-r-- 1 backup backup     135301 Dec 24 00:30 dc40.appcove.net-mysql-Thu.sql.gz
-rw-rw-r-- 1 backup backup     135301 Dec 22 00:30 dc40.appcove.net-mysql-Tue.sql.gz
-rw-r--r-- 1 backup backup     135301 Dec 23 00:30 dc40.appcove.net-mysql-Wed.sql.gz
</pre>
<br /> Tagged: backup, Backup Script, MySQL, System Administration <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/gahooa.wordpress.com/190/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/gahooa.wordpress.com/190/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/gahooa.wordpress.com/190/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/gahooa.wordpress.com/190/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/gahooa.wordpress.com/190/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/gahooa.wordpress.com/190/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/gahooa.wordpress.com/190/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/gahooa.wordpress.com/190/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/gahooa.wordpress.com/190/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/gahooa.wordpress.com/190/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.gahooa.com&blog=6218261&post=190&subd=gahooa&ref=&feed=1" />]]></content:encoded>
			<wfw:commentRss>http://blog.gahooa.com/2009/12/26/example-automated-mysql-backup-script/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="" medium="image">
			<media:title type="html">gahooa</media:title>
		</media:content>
	</item>
		<item>
		<title>Python 3.1 and mod_wsgi performance notes</title>
		<link>http://blog.gahooa.com/2009/10/11/python-3-1-and-mod_wsgi-performance-notes/</link>
		<comments>http://blog.gahooa.com/2009/10/11/python-3-1-and-mod_wsgi-performance-notes/#comments</comments>
		<pubDate>Sun, 11 Oct 2009 09:40:31 +0000</pubDate>
		<dc:creator>Jason Garber</dc:creator>
				<category><![CDATA[AppCove]]></category>
		<category><![CDATA[Engineering]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[reSearch]]></category>
		<category><![CDATA[Apache]]></category>
		<category><![CDATA[mod_wsgi]]></category>
		<category><![CDATA[Performance]]></category>
		<category><![CDATA[Python]]></category>
		<category><![CDATA[python 3]]></category>

		<guid isPermaLink="false">http://blog.gahooa.com/?p=154</guid>
		<description><![CDATA[We&#8217;re researching the use of Python and mod_wsgi running under apache for developing some extensive web applications.  Here are some notes on a performance test that we recently ran. ================================================================== Server: x86_64 Python 3.1.1 mod_wsgi 3.0c5 apache 2.2 RHEL 5.3 quad core xenon 8 GB ram Development system &#8211; not in production use. ================================================================== Application: [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.gahooa.com&blog=6218261&post=154&subd=gahooa&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<p>We&#8217;re researching the use of Python and mod_wsgi running under apache for developing some extensive web applications.  Here are some notes on a performance test that we recently ran.<br />
==================================================================<br />
Server:</p>
<p>x86_64<br />
Python 3.1.1<br />
mod_wsgi 3.0c5<br />
apache 2.2<br />
RHEL 5.3<br />
quad core xenon<br />
8 GB ram</p>
<p>Development system &#8211; not in production use.</p>
<p>==================================================================<br />
Application:</p>
<p>1 import time<br />
2<br />
3 def application(environ, start_response):<br />
4     status = &#8217;200 OK&#8217;<br />
5<br />
6     output = &#8220;hello world!&#8221;<br />
7<br />
8     #time.sleep(1)<br />
9<br />
10     response_headers = [<br />
11         ('Content-type', 'text/plain'),<br />
12         ('Content-Length', str(len(output))),<br />
13         ]<br />
14<br />
15     start_response(status, response_headers)<br />
16<br />
17     return [output]</p>
<p>==================================================================<br />
Apache Configuration:</p>
<p>WSGISocketPrefix run/wsgi<br />
&lt;VirtualHost *&gt;<br />
ServerName <a style="color:#2a5db0;" href="http://shankproject.jason.star.ionzoft.net/" target="_blank">shankproject.jason.star.ionzoft.net</a><br />
DocumentRoot /home/jason/Code/ShankProject/Web<br />
WSGIScriptAlias /Admin /home/jason/Code/ShankProject/WSGI/<br />
Admin.wsgi<br />
WSGIDaemonProcess <a style="color:#2a5db0;" href="http://shankproject.jason.star.ionzoft.net/" target="_blank">shankproject.jason.star.ionzoft.net</a> threads=15<br />
WSGIProcessGroup <a style="color:#2a5db0;" href="http://shankproject.jason.star.ionzoft.net/" target="_blank">shankproject.jason.star.ionzoft.net</a><br />
&lt;/VirtualHost&gt;</p>
<p>==================================================================<br />
Tests:</p>
<p>&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;<br />
# Baseline with one process and 15 threads<br />
# 15 threads total</p>
<p>threads=15<br />
no process definition</p>
<p>WITHOUT time.sleep(1)<br />
concurrency = 1  &gt;&gt; 1800 / second<br />
concurrency = 100 &gt;&gt; 3900 / second</p>
<p>WITH time.sleep(1)<br />
concurrency = 1  &gt;&gt; 1 / second<br />
concurrency = 100  &gt;&gt; 14 / second</p>
<p>&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;<br />
# Get a marginal improvement by doubling the threads to 30<br />
# 30 threads total</p>
<p>threads=30<br />
no process definition</p>
<p>WITHOUT time.sleep(1)<br />
concurrency = 1  &gt;&gt; 1680 / second<br />
concurrency = 100 &gt;&gt; 3500 / second</p>
<p>WITH time.sleep(1)<br />
concurrency = 1  &gt;&gt; 1 / second<br />
concurrency = 100  &gt;&gt; 30 / second</p>
<p>&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;<br />
# Take processes from 1 to 3<br />
# 90 threads total</p>
<p>threads=30<br />
processes=3</p>
<p>WITHOUT time.sleep(1)<br />
concurrency = 1  &gt;&gt; 1770 / second<br />
concurrency = 100 &gt;&gt; 3500 / second</p>
<p>WITH time.sleep(1)<br />
concurrency = 1  &gt;&gt; 1 / second<br />
concurrency = 100  &gt;&gt; 88 / second</p>
<p>&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;<br />
# Take processes from 3 to 6<br />
# Take threads from 30 to 15<br />
# 90 threads total</p>
<p>threads=30<br />
processes=3</p>
<p>WITHOUT time.sleep(1)<br />
concurrency = 1  &gt;&gt; 1550 / second<br />
concurrency = 100 &gt;&gt; 3300 / second</p>
<p>WITH time.sleep(1)<br />
concurrency = 1  &gt;&gt; 1 / second<br />
concurrency = 100  &gt;&gt; 88 / second</p>
<p>==================================================================<br />
Conclusion:</p>
<p>mod_wsgi performance is outstanding.  Even running slower requests, it<br />
can still handle significant concurrency in daemon mode without any<br />
apparent issues.</p>
<p>Questions:<br />
Is there any information on the balance between more processes less<br />
threads and more threads less processes?</p>
<p>Thanks!</p>
<br /> Tagged: Apache, mod_wsgi, Performance, Python, python 3 <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/gahooa.wordpress.com/154/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/gahooa.wordpress.com/154/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/gahooa.wordpress.com/154/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/gahooa.wordpress.com/154/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/gahooa.wordpress.com/154/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/gahooa.wordpress.com/154/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/gahooa.wordpress.com/154/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/gahooa.wordpress.com/154/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/gahooa.wordpress.com/154/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/gahooa.wordpress.com/154/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.gahooa.com&blog=6218261&post=154&subd=gahooa&ref=&feed=1" />]]></content:encoded>
			<wfw:commentRss>http://blog.gahooa.com/2009/10/11/python-3-1-and-mod_wsgi-performance-notes/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="" medium="image">
			<media:title type="html">gahooa</media:title>
		</media:content>
	</item>
		<item>
		<title>Interesting Thoughts on Cloud Server Performance</title>
		<link>http://blog.gahooa.com/2009/08/01/interesting-thoughts-on-cloud-server-performance/</link>
		<comments>http://blog.gahooa.com/2009/08/01/interesting-thoughts-on-cloud-server-performance/#comments</comments>
		<pubDate>Sat, 01 Aug 2009 21:47:29 +0000</pubDate>
		<dc:creator>Jason Garber</dc:creator>
				<category><![CDATA[Engineering]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[System Administration]]></category>
		<category><![CDATA[AB]]></category>
		<category><![CDATA[Apache]]></category>
		<category><![CDATA[Benchmarking]]></category>
		<category><![CDATA[Cloud Server]]></category>
		<category><![CDATA[Performance]]></category>

		<guid isPermaLink="false">http://blog.gahooa.com/?p=145</guid>
		<description><![CDATA[Apache load testing on a Cloud Server &#8211; Jason &#8211; 7/31/2009 I recently created a cloud server for a wordpress blog, and configured it to the point that the blog was working OK.  Then I decided to check the performance aspects of the server, as it was a small 256 MB + 10GB machine. Using [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.gahooa.com&blog=6218261&post=145&subd=gahooa&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<p><strong><span style="font-size:medium;">Apache load testing on a Cloud Server</span></strong><span style="font-weight:normal;"><strong><span style="font-size:medium;"><span style="font-size:medium;"> &#8211; Jason &#8211; 7/31/2009</span></span></strong></span></p>
<div></div>
<div>I recently created a cloud server for a wordpress blog, and configured it to the point that the blog was working OK.  Then I decided to check the performance aspects of the server, as it was a small <strong><span style="color:#0000ff;">256 MB + 10GB</span></strong> machine.</div>
<div>Using apachebench (ab), I ran some load tests on the blog home page.  <strong>The server choked to death.</strong> It was swapping so bad, that RackSpace Cloud sent me this email:</div>
<blockquote><p><span style="font-family:arial;"><em>This is an automatic notification to let you know that your Cloud Server, </em><a style="color:#2a5db0;" href="http://city.appcove.com/" target="_blank"><em>city.appcove.com</em></a><em>, is showing a considerable amount of consistent swapping activity. Quite often this is an indicator that your application or database are not as efficient as they could be. It also may indicate that you need to upgrade your Cloud Server for more RAM.</em></span></p></blockquote>
<div>That&#8217;s strange&#8230;</div>
<div>I found that the response rate was:</div>
<p style="padding-left:30px;"><strong>4 requests per second, 10 concurrent connections</strong></p>
<div>When the concurrency was raised to 50, the server died.  It took 10 minutes for it to calm down enough that I could LOG IN and KILL apache.</div>
<div>&#8211;</div>
<div>So upon further investingation, I found that the default httpd.conf configuration was <strong>WAY TOO LARGE</strong>:</div>
<div></div>
<div>We&#8217;re only working with 256 MB ram here, so if each apache process takes up any amount of memory at all, we have a low limit.</div>
<p style="padding-left:30px;"><span style="font-family:'Courier New';">&lt;IfModule prefork.c&gt;</span><br />
<span style="font-family:'Courier New';">StartServers       8</span><br />
<span style="font-family:'Courier New';">MinSpareServers    5</span><br />
<span style="font-family:'Courier New';">MaxSpareServers   20</span><br />
<span style="font-family:'Courier New';color:#0000ff;">ServerLimit      256</span><br />
<span style="font-family:'Courier New';color:#0000ff;">MaxClients       256</span><br />
<span style="font-family:'Courier New';">MaxRequestsPerChild  4000</span><br />
<span style="font-family:'Courier New';">&lt;/IfModule&gt;</span></p>
<div>
<div>Only after drastically reducing the configuration to the following, did we get reasonable performance:</div>
</div>
<p style="padding-left:30px;"><span style="font-family:'Courier New';">&lt;IfModule prefork.c&gt;</span><br />
<span style="font-family:'Courier New';"><span style="color:#0000ff;">StartServers       4</span></span><br />
<span style="font-family:'Courier New';"><span style="color:#0000ff;">MinSpareServers    2</span></span><br />
<span style="font-family:'Courier New';"><span style="color:#0000ff;">MaxSpareServers   4</span></span><br />
<span style="font-family:'Courier New';"><span style="color:#0000ff;">ServerLimit      4</span></span><br />
<span style="font-family:'Courier New';"><span style="color:#0000ff;">MaxClients       4</span></span><br />
<span style="font-family:'Courier New';">MaxRequestsPerChild  4000</span><br />
<span style="font-family:'Courier New';">&lt;/IfModule&gt;</span></p>
<div>
<div></div>
</div>
<div>
<div>As it turns out, the performance went up considerably:</div>
</div>
<p style="padding-left:30px;"><strong>16 requests per second, 50 concurrent connections</strong></p>
<div>
<div>
<div>Still, I thought that it could get better.  So I looked into installing some PHP opcode caching software.</div>
</div>
</div>
<blockquote><p><a id="n41." title="http://www.php.net/manual/en/intro.apc.php" href="http://www.php.net/manual/en/intro.apc.php"><em>http://www.php.net/manual/en/intro.apc.php</em></a></p>
<p><em>The Alternative PHP Cache (APC) is a free and open opcode cache for PHP. Its goal is to provide a free, open, and robust framework for caching and optimizing PHP intermediate code.</em></p></blockquote>
<div>
<div></div>
<div>As it turns out, it was easy to install.</div>
</div>
<p style="padding-left:30px;"><span style="font-family:'Courier New';"># yum install php-pecl-apc</span></p>
<div>
<div>And after restarting apache:</div>
</div>
<p style="padding-left:30px;"><strong>47 requests per second, 50 concurrent connections</strong></p>
<div>
<div>Even during this load test, the site was still responsive from a web browser.</div>
<div></div>
<div>Not bad for a cheap little Cloud Server, eh?</div>
</div>
<br /> Tagged: AB, Apache, Benchmarking, Cloud Server, Performance <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/gahooa.wordpress.com/145/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/gahooa.wordpress.com/145/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/gahooa.wordpress.com/145/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/gahooa.wordpress.com/145/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/gahooa.wordpress.com/145/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/gahooa.wordpress.com/145/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/gahooa.wordpress.com/145/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/gahooa.wordpress.com/145/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/gahooa.wordpress.com/145/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/gahooa.wordpress.com/145/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.gahooa.com&blog=6218261&post=145&subd=gahooa&ref=&feed=1" />]]></content:encoded>
			<wfw:commentRss>http://blog.gahooa.com/2009/08/01/interesting-thoughts-on-cloud-server-performance/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
	
		<media:content url="" medium="image">
			<media:title type="html">gahooa</media:title>
		</media:content>
	</item>
		<item>
		<title>Updating a cert on the Cisco 11500 Series Content Services Switches (CSS)</title>
		<link>http://blog.gahooa.com/2009/04/06/updating-a-cert-on-the-cisco-11500-series-content-services-switches-css/</link>
		<comments>http://blog.gahooa.com/2009/04/06/updating-a-cert-on-the-cisco-11500-series-content-services-switches-css/#comments</comments>
		<pubDate>Tue, 07 Apr 2009 03:21:52 +0000</pubDate>
		<dc:creator>Jason Garber</dc:creator>
				<category><![CDATA[AppCove]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[System Administration]]></category>
		<category><![CDATA[Technique]]></category>
		<category><![CDATA[Cisco CSS]]></category>
		<category><![CDATA[SSL Certificates]]></category>

		<guid isPermaLink="false">http://blog.gahooa.com/?p=121</guid>
		<description><![CDATA[Upgrading a SSL certificate using the Cisco 11500 Series Content Services Switch (CSS) <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.gahooa.com&blog=6218261&post=121&subd=gahooa&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<p>Having recently moved some of our hosting infrastructure to the excellent <a href="http://www.rackspace.com/solutions/managed_hosting/colocation/index.php">Rackspace Platform group</a>, we inherited the management of the <a href="http://www.cisco.com/en/US/products/hw/contnetw/ps792/">Cisco 11500 Series Content Services Switches (CSS)</a>, which we use for general load balancing + ssl termination.</p>
<blockquote><p>As a side note, it&#8217;s really powerful, fast, and well, plain nice.  Not having to manage SSL certs on each apache instance is really nice, and all the LAN communication is done over plain old HTTP.</p></blockquote>
<p>This blog post is a regurgitation of some notes I took internally.  Perhaps someone who finds themselves managing this device will benefit&#8230;</p>
<hr />The task at hand was re-issuing and updating one of our primary wildcard certificates that powers a lot of subdomains.</p>
<h3>The first step is to generate the key, csr, and crt&#8230;</h3>
<p>All these files should be:</p>
<ul>
<li>Named the same as the domain that SSL is being generated for.</li>
<li>use WILD for a wildcard subdomain</li>
<li>Use this format &#8220;www.domain.com-0810.key&#8221;, where 08 is the from year and 10 is the to year</li>
<li>(the short version is because of name length limits on the CSS)</li>
</ul>
<p><span style="font-weight:bold;">Start by generating the key and csr</span></p>
<p>This should be done in the ciscoftp role under the ~/load directory</p>
<pre># openssl genrsa -out WILD.vosecure.com-0810.key 1024
# openssl req -new -key WILD.vosecure.com-0810.key -out WILD.vosecure.com-0810.csr</pre>
<p><span style="font-weight:bold;">Then get the certificate issued by (global sign)</span></p>
<p>Put the certificate into the the ~/load directory.  When done, it should look like:</p>
<pre>-rw-rw-r-- 1 ciscoftp ciscoftp  3139 Apr  6 15:59 WILD.vosecure.com-0810.crt
-rw-rw-r-- 1 ciscoftp ciscoftp   773 Apr  6 15:49 WILD.vosecure.com-0810.csr
-rw-rw-r-- 1 ciscoftp ciscoftp   883 Apr  6 15:47 WILD.vosecure.com-0810.key</pre>
<p><span style="font-weight:bold;">Put the crt and key onto the load balancer</span></p>
<p>To do this, use the &#8220;copy command&#8221; on the load balancer</p>
<pre>20132-201292# copy ssl ftp base import WILD.vosecure.com-0810.crt PEM "rack"
20132-201292# copy ssl ftp base import WILD.vosecure.com-0810.key PEM "rack"

Then make the associations...

20132-201292# config
20132-201292(config)# ssl associate cert WILD.vosecure.com-0810.crt WILD.vosecure.com-0810.crt
20132-201292(config)# ssl associate cert WILD.vosecure.com-0810.key WILD.vosecure.com-0810.key</pre>
<h3>Now, it&#8217;s time to install it.  <span style="color:#ff0000;">Requires SSL downtime!</span></h3>
<ol>
<li>Suspend the SSL content rule</li>
<li>Suspend the SSL service</li>
<li>Suspend the SSL proxy list</li>
<li>Run the updates</li>
<li>Activate the SSL proxy list</li>
<li>Activate the SSL service</li>
<li>Activate the SSL content rule</li>
</ol>
<p><span style="font-weight:bold;">Here are the exact commands:</span></p>
<pre>20132-201292# config
20132-201292(config)# owner vosecure.com
20132-201292(config-owner[vosecure.com])# content 74.205.111.161-ssl
20132-201292(config-owner-content[vosecure.com-74.205.111.161-ssl])# suspend

20132-201292# config
20132-201292(config)# service ssl-service
20132-201292(config-service[ssl-service])# suspend

20132-201292# config
20132-201292(config)# ssl-proxy-list ssl-proxy</pre>
<p style="color:#f00;">In the following commands, we remove the whole ssl-server so that it shows up at the bottom in one concise unit.  Otherwise, the startup-config and running-config become fragmented.</p>
<pre>20132-201292(config-ssl-proxy-list[ssl-proxy])# suspend
20132-201292(config-ssl-proxy-list[ssl-proxy])# no ssl-server 6
20132-201292(config-ssl-proxy-list[ssl-proxy])# ssl-server 6
20132-201292(config-ssl-proxy-list[ssl-proxy])# ssl-server 6 rsakey WILD.vosecure.com-0810.key
20132-201292(config-ssl-proxy-list[ssl-proxy])# ssl-server 6 rsacert WILD.vosecure.com-0810.crt
20132-201292(config-ssl-proxy-list[ssl-proxy])# ssl-server 6 vip address 192.168.1.161
20132-201292(config-ssl-proxy-list[ssl-proxy])# ssl-server 6 cipher rsa-with-rc4-128-sha 192.168.1.161 81
20132-201292(config-ssl-proxy-list[ssl-proxy])# active

20132-201292# config
20132-201292(config)# service ssl-service
20132-201292(config-service[ssl-service])# active

20132-201292# config
20132-201292(config)# owner vosecure.com
20132-201292(config-owner[vosecure.com])# content 74.205.111.161-ssl
20132-201292(config-owner-content[vosecure.com-74.205.111.161-ssl])# active

<span style="color:#f00;">Test test test.  Firefox, IE, Chrome...</span>

20132-201292# copy running-config ftp base running-config

<span style="color:#f00;">Review changes with git diff</span>

20132-201292# write memory

20132-201292# copy startup-config ftp base startup-config</pre>
<h3>And&#8230; Here is the git diff</h3>
<pre>diff --git a/load/startup-config b/load/startup-config
index 7042490..36fbbaa 100644
--- a/load/startup-config
+++ b/load/startup-config
@@ -1,4 +1,4 @@
-!Generated on 04/06/2009 16:05:48
+!Generated on 04/06/2009 21:51:02
!Active version: sg0810205

@@ -64,6 +64,8 @@ configure
<span style="color:#339966;">+  ssl associate rsakey WILD.vosecure.com-0810.key WILD.vosecure.com-0810.key
+  ssl associate cert WILD.vosecure.com-0810.crt WILD.vosecure.com-0810.crt

</span>!*********************** SSL PROXY LIST ***********************
ssl-proxy-list ssl-proxy
<span style="color:#ff6600;">-  ssl-server 6
-  ssl-server 6 rsakey vosecure.com(080421-04300)-key
-  ssl-server 6 rsacert vosecure.com(080421-04300)-cert
-  ssl-server 6 vip address 192.168.1.161
-  ssl-server 6 cipher rsa-with-rc4-128-sha 192.168.1.161 81</span>
@@ -146,6 +141,11 @@ ssl-proxy-list ssl-proxy
<span style="color:#339966;">+  ssl-server 6
+  ssl-server 6 rsakey WILD.vosecure.com-0810.key
+  ssl-server 6 rsacert WILD.vosecure.com-0810.crt
+  ssl-server 6 vip address 192.168.1.161
+  ssl-server 6 cipher rsa-with-rc4-128-sha 192.168.1.161 81</span>
active</pre>
<br /> Tagged: Cisco CSS, SSL Certificates, System Administration <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/gahooa.wordpress.com/121/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/gahooa.wordpress.com/121/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/gahooa.wordpress.com/121/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/gahooa.wordpress.com/121/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/gahooa.wordpress.com/121/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/gahooa.wordpress.com/121/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/gahooa.wordpress.com/121/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/gahooa.wordpress.com/121/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/gahooa.wordpress.com/121/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/gahooa.wordpress.com/121/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.gahooa.com&blog=6218261&post=121&subd=gahooa&ref=&feed=1" />]]></content:encoded>
			<wfw:commentRss>http://blog.gahooa.com/2009/04/06/updating-a-cert-on-the-cisco-11500-series-content-services-switches-css/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="" medium="image">
			<media:title type="html">gahooa</media:title>
		</media:content>
	</item>
		<item>
		<title>I highly recommend yum  + createrepo + rpmbuild</title>
		<link>http://blog.gahooa.com/2009/03/08/i-highly-recommend-yum-createrepo-rpmbuild/</link>
		<comments>http://blog.gahooa.com/2009/03/08/i-highly-recommend-yum-createrepo-rpmbuild/#comments</comments>
		<pubDate>Sun, 08 Mar 2009 05:30:00 +0000</pubDate>
		<dc:creator>Jason Garber</dc:creator>
				<category><![CDATA[AppCove]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[System Administration]]></category>
		<category><![CDATA[Technique]]></category>
		<category><![CDATA[Apache]]></category>
		<category><![CDATA[EPEL]]></category>
		<category><![CDATA[RHEL]]></category>
		<category><![CDATA[RPM]]></category>
		<category><![CDATA[YUM]]></category>

		<guid isPermaLink="false">http://blog.gahooa.com/?p=93</guid>
		<description><![CDATA[As I was discussing lightly before, I have recently been involved in building quite a few RPMs for our server clusters at AppCove. Where we have arrived: Our (new) primary production cluster consists of multiple RedHat Enterprise Linux 5 boxes in different capacities (webserver, appserver, database master, database slave, etc&#8230;). Each machine is registered with [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.gahooa.com&blog=6218261&post=93&subd=gahooa&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<p>As I was discussing lightly <a href="http://blog.gahooa.com/2009/03/01/installing-source-rpms-to-your-home-directory/">before</a>, I have recently been involved in building quite a few RPMs for our server clusters at <a href="http://www.appcove.com">AppCove</a>.</p>
<hr />
<h2>Where we have arrived:</h2>
<p>Our (new) primary production cluster consists of multiple RedHat Enterprise Linux 5 boxes in different capacities (webserver, appserver, database master, database slave, etc&#8230;).</p>
<p>Each machine is registered with 3 yum repositories:</p>
<ol>
<li>RHEL (RedHat Enterprise Linux)</li>
<li>EPEL (Extra Packages for Enterprise Linux)</li>
<li>ACN (AppCove Network)</li>
</ol>
<p><strong>All</strong> of our custom software packages and custom builds of open source software are placed into individual RPMs, and entered into our ACN repository.</p>
<p>From there, it is a snap to update any given server with the correct version of the software that server needs.</p>
<p>We have a dedicated build area, versioned with <a href="http://git-scm.com/">git</a>, that is used to build and package all of the custom software that is needed.</p>
<p><em>(note, RPMs are not used for web application deployment &#8212; <a href="http://samba.anu.edu.au/rsync/">rsync</a> via <a href="http://en.wikipedia.org/wiki/Secure_Shell">ssh</a> is used for that)</em></p>
<hr />
<h2>Recommendation:</h2>
<p>Having worked through the process from start to finish, I must say that I would <strong>highly</strong> recommend the following tools to anyone who is responsible for <a href="http://www.redhat.com/rhel/">RedHat Enterprise</a>, <a href="http://www.centos.org/">Centos</a>, or <a href="http://fedoraproject.org/">Fedora</a> system administration.</p>
<ul>
<li><a href="http://git-scm.com/">git</a> &#8211; to keep your .spec files versioned</li>
<li><a href="http://www.rpm.org/max-rpm-snapshot/rpmbuild.8.html">rpmbuild</a> &#8211; to build the rpms</li>
<li><a href="http://createrepo.baseurl.org/">createrepo</a> &#8211; to create your very own yum repository</li>
<li><a href="http://www.apache.org/">apache</a> &#8211; to serve the yum repository</li>
<li><a href="http://yum.baseurl.org/">yum</a> &#8211; to obtain, install, and upgrade your rpms</li>
</ul>
<p>Additionally, if you are using RedHat Enterprise or Centos, I would highly recommend using <a href="http://fedoraproject.org/wiki/EPEL">Extra Packages for Enterprise Linux (EPEL)</a> to get a few of those &#8220;other&#8221; packages that don&#8217;t come with your OS (git, for example).</p>
<p>&#8211;<br />
Learning how to build RPMs was a fairly steep curve.  But it wasn&#8217;t long.  It is one of those things that if you know it you say &#8220;<em>that&#8217;s easy</em>&#8221; and if you don&#8217;t you say &#8220;<em>what the ???</em>&#8220;</p>
<p>yum+rpm was invented (I assume) to make life easier for countless system administrators and software publishers.  So it&#8217;s not the kind of thing that everyone is involved in.</p>
<p>I was a bit tough to figure out the caveats of how to <span style="text-decoration:underline;">correctly</span> build RPM&#8217;s <span style="text-decoration:underline;">that work</span>.  The documentation is a bit sparse.  A bit here and a bit there.</p>
<hr />
<h2>What are the benefits?</h2>
<p>Many.  Let me list a few.</p>
<p><strong>Your system stays really clean. </strong> With RPMs, you can uninstall <span style="text-decoration:underline;">everything you installed</span><strong> </strong>without leaving extra files laying around.</p>
<p><strong>Upgrades are a snap. </strong>Once you have registered your own yum repository on a system, you can upgrade a given package by running:</p>
<pre style="padding-left:30px;">yum upgrade your-package</pre>
<p><strong>All your systems can be on the same &#8220;page&#8221;.</strong> It is very easy, using yum, to ensure that all of your systems are using the <strong>exact</strong> same version of software.</p>
<p><strong>Custom builds are super easy to maintain.</strong> We custom-compile php, python, and various other software.  Once the .spec files are in place, <strong>all </strong>of your software can be re-packaged with a single command.</p>
<p>In our specific case, we wanted to have the <a href="http://www.danga.com/memcached/">memcached</a> client statically compiled into <a href="http://www.php.net/">PHP</a>.  With a few extra commands in the .spec file, it was a snap to pull in the source from <a href="http://pecl.php.net/">pecl</a>, and update `configure` to take it into account.</p>
<p><strong>All builds can take place in one place. </strong>With one set of documentation, one consistent set of development tools, etc&#8230;  We have a user called `build` on one of the hosts that is specifically used for building all of the RPMs.</p>
<hr />
<h2>Where to learn?</h2>
<p>The best way to learn, as usual, is to jump in and figure it out.   There is some really good documentation buried in the <a href="http://www.rpm.org">rpm.org</a> site.   It is a book called <strong>Maximum RPM</strong>, origninally published by redhat.  The current snapshot of the book is <a href="http://www.rpm.org/max-rpm-snapshot/">available online</a>.</p>
<p style="padding-left:30px;"><a href="http://www.rpm.org/max-rpm-snapshot/">http://www.rpm.org/max-rpm-snapshot/</a></p>
<p>Google is another good resource, depending on what it is you are looking for.</p>
<br /> Tagged: Apache, EPEL, Linux, RHEL, RPM, System Administration, YUM <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/gahooa.wordpress.com/93/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/gahooa.wordpress.com/93/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/gahooa.wordpress.com/93/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/gahooa.wordpress.com/93/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/gahooa.wordpress.com/93/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/gahooa.wordpress.com/93/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/gahooa.wordpress.com/93/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/gahooa.wordpress.com/93/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/gahooa.wordpress.com/93/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/gahooa.wordpress.com/93/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.gahooa.com&blog=6218261&post=93&subd=gahooa&ref=&feed=1" />]]></content:encoded>
			<wfw:commentRss>http://blog.gahooa.com/2009/03/08/i-highly-recommend-yum-createrepo-rpmbuild/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="" medium="image">
			<media:title type="html">gahooa</media:title>
		</media:content>
	</item>
		<item>
		<title>Installing Source RPMs to your home directory</title>
		<link>http://blog.gahooa.com/2009/03/01/installing-source-rpms-to-your-home-directory/</link>
		<comments>http://blog.gahooa.com/2009/03/01/installing-source-rpms-to-your-home-directory/#comments</comments>
		<pubDate>Mon, 02 Mar 2009 02:46:55 +0000</pubDate>
		<dc:creator>Jason Garber</dc:creator>
				<category><![CDATA[AppCove]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[System Administration]]></category>
		<category><![CDATA[Technique]]></category>
		<category><![CDATA[Bloglet]]></category>
		<category><![CDATA[RedHat]]></category>
		<category><![CDATA[RHEL]]></category>
		<category><![CDATA[RPM]]></category>
		<category><![CDATA[SRPM]]></category>

		<guid isPermaLink="false">http://blog.gahooa.com/?p=87</guid>
		<description><![CDATA[I&#8217;ve been involved in an ongoing project to build RPMs for all of the &#8220;custom&#8221; software installs we use on RedHat Enterprise Linux 5 (RHEL5) at AppCove. By default (on RHEL), source RPMs are installed to /usr/src/redhat. This is nice, except that I don&#8217;t want to be running as root when building software. rpm -i [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.gahooa.com&blog=6218261&post=87&subd=gahooa&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve been involved in an ongoing project to build <a href="http://www.rpm.org">RPMs</a> for all of the &#8220;custom&#8221; software installs we use on <a href="http://www.redhat.com/rhel/">RedHat Enterprise Linux 5</a> (RHEL5) at <a href="http://appcove.com">AppCove</a>.</p>
<p>By default (on RHEL), source RPMs are installed to /usr/src/redhat.  This is nice, except that I don&#8217;t want to be running as root when building software.</p>
<pre>rpm -i --relocate /usr/src/redhat=/home/build/RPMBUILD setuptools-0.6c9-1.src.rpm</pre>
<p>The previous command will install the specified source rpm to a local directory under the &#8220;build&#8221; user.  That makes it easy to tweak the .spec file, and then build the desired RPM.</p>
<br /> Tagged: Bloglet, RedHat, RHEL, RPM, SRPM <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/gahooa.wordpress.com/87/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/gahooa.wordpress.com/87/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/gahooa.wordpress.com/87/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/gahooa.wordpress.com/87/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/gahooa.wordpress.com/87/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/gahooa.wordpress.com/87/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/gahooa.wordpress.com/87/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/gahooa.wordpress.com/87/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/gahooa.wordpress.com/87/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/gahooa.wordpress.com/87/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.gahooa.com&blog=6218261&post=87&subd=gahooa&ref=&feed=1" />]]></content:encoded>
			<wfw:commentRss>http://blog.gahooa.com/2009/03/01/installing-source-rpms-to-your-home-directory/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="" medium="image">
			<media:title type="html">gahooa</media:title>
		</media:content>
	</item>
		<item>
		<title>Update [1] on Fedora vs Redhat Enterprise Linux</title>
		<link>http://blog.gahooa.com/2009/02/08/update-on-fedora-vs-redhat-enterprise-linux/</link>
		<comments>http://blog.gahooa.com/2009/02/08/update-on-fedora-vs-redhat-enterprise-linux/#comments</comments>
		<pubDate>Mon, 09 Feb 2009 01:48:03 +0000</pubDate>
		<dc:creator>Jason Garber</dc:creator>
				<category><![CDATA[AppCove]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[reSearch]]></category>
		<category><![CDATA[EPEL]]></category>
		<category><![CDATA[RPM]]></category>
		<category><![CDATA[YUM]]></category>

		<guid isPermaLink="false">http://blog.gahooa.com/?p=66</guid>
		<description><![CDATA[This is in reference to http://blog.gahooa.com/2009/01/18/fedora-or-redhat-enterprise-linux-in-a-production-environment/. After the excellent comment by Sergio Olivo, I did some heavy looking into the Extra Packages for Enterprise Linux project (EPEL for short).  On a brand-spanking-new RHEL 5 box, I installed the YUM repository for EPEL, and quite immediately had access to tons of extra packages.  Erlang is there.  [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.gahooa.com&blog=6218261&post=66&subd=gahooa&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<p><strong>This is in reference to <a href="http://blog.gahooa.com/2009/01/18/fedora-or-redhat-enterprise-linux-in-a-production-environment/">http://blog.gahooa.com/2009/01/18/fedora-or-redhat-enterprise-linux-in-a-production-environment/</a>.</strong></p>
<p>After the excellent <a href="http://blog.gahooa.com/2009/01/18/fedora-or-redhat-enterprise-linux-in-a-production-environment/#comment-2">comment</a> by Sergio Olivo, I did some heavy looking into the <a href="http://fedoraproject.org/wiki/EPEL">Extra Packages for Enterprise Linux project</a> (EPEL for short).  On a brand-spanking-new RHEL 5 box, I installed the YUM repository for EPEL, and quite immediately had access to tons of extra packages.  Erlang is there.  Git is there.  Memcached is there.  Sweet!</p>
<p>However, EPEL <a href="http://fedoraproject.org/wiki/EPEL/FAQ#Does_EPEL_replace_packages_provided_within_Red_Hat_Enterprise_Linux_or_layered_products.3F">does not update or replace</a> the version of any packages provided by RHEL.</p>
<p>So the problem of having out of date versions of PHP and Python still remain.  Next I looked into using a third party RPM repository (provided by <a href="http://www.rackspace.com">RackSpace</a>).  They provide updated versions of PHP and a number of PHP modules.  But alas, this created incompatibilities with the EPEL packages for PHP.  This is because EPEL packages are targeted for RHEL versions. Bla&#8230;</p>
<p>So here is what I decided to do (haven&#8217;t done it yet, but will soon).  We will build and package our own custom set of RPMs for RHEL 5, and publish them in an RPM repository.  Then we will simply point each server to that repository in addition to the main RHEL repository, and poof, problem solved.  We may also use EPEL for things like Erlang and git.  Or we may compile from source.  Not sure.</p>
<p>For those of you who are not familiar with YUM RPM repositories, they can be as simple as a specail directory structure served by a webserver.</p>
<p>There are a few items remaining to be concluded, but they should fall into place fairly quickly.</p>
<br /> Tagged: EPEL, Linux, RPM, YUM <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/gahooa.wordpress.com/66/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/gahooa.wordpress.com/66/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/gahooa.wordpress.com/66/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/gahooa.wordpress.com/66/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/gahooa.wordpress.com/66/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/gahooa.wordpress.com/66/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/gahooa.wordpress.com/66/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/gahooa.wordpress.com/66/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/gahooa.wordpress.com/66/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/gahooa.wordpress.com/66/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.gahooa.com&blog=6218261&post=66&subd=gahooa&ref=&feed=1" />]]></content:encoded>
			<wfw:commentRss>http://blog.gahooa.com/2009/02/08/update-on-fedora-vs-redhat-enterprise-linux/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="" medium="image">
			<media:title type="html">gahooa</media:title>
		</media:content>
	</item>
	</channel>
</rss>