<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/atom10full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><feed xmlns="http://www.w3.org/2005/Atom" xmlns:thr="http://purl.org/syndication/thread/1.0" xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" xml:lang="en" xml:base="http://ihopesolution.com/wp-atom.php">
	<title type="text">I Hope Solution</title>
	<subtitle type="text">IT tips, tricks and rants from the trenches</subtitle>

	<updated>2009-11-06T14:44:03Z</updated>
	<generator uri="http://wordpress.org/" version="2.8.4">WordPress</generator>

	<link rel="alternate" type="text/html" href="http://ihopesolution.com" />
	<id>http://ihopesolution.com/feed/atom/</id>
	

			<atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/atom+xml" href="http://feeds.feedburner.com/IHopeSolution" /><feedburner:info uri="ihopesolution" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" /><entry>
		<author>
			<name>pfhawkins</name>
						<uri>http://pfhawkins.com</uri>
					</author>
		<title type="html"><![CDATA[Book Review: Time Management for Systems Administrators]]></title>
		<link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/IHopeSolution/~3/YpQYY2Tg-NU/" />
		<id>http://ihopesolution.com/?p=79</id>
		<updated>2009-11-06T14:44:03Z</updated>
		<published>2009-11-06T12:41:55Z</published>
		<category scheme="http://ihopesolution.com" term="Administration" /><category scheme="http://ihopesolution.com" term="Book Reviews" /><category scheme="http://ihopesolution.com" term="gtd" /><category scheme="http://ihopesolution.com" term="softskills" /><category scheme="http://ihopesolution.com" term="systems administration" /><category scheme="http://ihopesolution.com" term="time management" />		<summary type="html"><![CDATA[Recently I took on a new position at work. Instead of just banging out help desk tickets and incoming phone calls, I&#8217;m assisting customers on longer-term projects. It&#8217;s an entirely different workflow, and it&#8217;s helpimg me appreciate this book even more. I&#8217;m glad I procrastinated writing this post, as it helped clarify my thoughts to [...]]]></summary>
		<content type="html" xml:base="http://ihopesolution.com/2009/11/book-review-time-management-for-systems-administrators/">&lt;p&gt;Recently I took on a new position at work. Instead of just banging out help desk tickets and incoming phone calls, I&amp;#8217;m assisting customers on longer-term projects. It&amp;#8217;s an entirely different workflow, and it&amp;#8217;s helpimg me appreciate this book even more. I&amp;#8217;m glad I procrastinated writing this post, as it helped clarify my thoughts to simmer with the information contained within. I can confidently give this book a rating of&lt;/p&gt;
&lt;h3&gt;&lt;a href="http://www.amazon.com/gp/product/0596007833?ie=UTF8&amp;#038;tag=phawkcom-20&amp;#038;linkCode=as2&amp;#038;camp=1789&amp;#038;creative=390957&amp;#038;creativeASIN=0596007833"&gt;Multiple Thumbs Up&lt;/a&gt;&lt;br /&gt;
&lt;/h3&gt;
&lt;p&gt;although it&amp;#8217;s not without it&amp;#8217;s flaws.&lt;/p&gt;
&lt;h3&gt;Pros:&lt;/h3&gt;
&lt;p&gt;This book is what it says it is on the tin: a time-management system specifically geared to the workflows of systems administrators.&lt;/p&gt;
&lt;p&gt;It&amp;#8217;s a shorter book, yet covers the topic more than adequately.&lt;/p&gt;
&lt;p&gt;Both the tips and the overall system are chock-full of utility.&lt;/p&gt;
&lt;h3&gt;Cons:&lt;/h3&gt;
&lt;p&gt;The folksy style is off-putting, for myself at least. Geeks drink Mountain Dew! And it&amp;#8217;s funny! *rolls eyes*&lt;/p&gt;
&lt;p&gt;This book can be repetitive. I recognize that repetition is a hallmark of pedagogy, but the eighth time I heard the filling-the-gas-tank example I very nearly endangered the material well-being of my copy. (But now I know and use the point of that example often. So, it worked while it annoyed.)&lt;/p&gt;
&lt;p&gt;The last con I see is more subtle; you might consider it a con as such.&lt;/p&gt;
&lt;p&gt;Books in the time management genre (e.g. &lt;a href="http://www.amazon.com/gp/product/0142000280?ie=UTF8&amp;#038;tag=phawkcom-20&amp;#038;linkCode=as2&amp;#038;camp=1789&amp;#038;creative=390957&amp;#038;creativeASIN=0142000280"&gt;Getting Things Done&lt;/a&gt;&lt;img src="http://www.assoc-amazon.com/e/ir?t=phawkcom-20&amp;#038;l=as2&amp;#038;o=1&amp;#038;a=0142000280" width="1" height="1" border="0" alt="" style="border:none !important; margin:0px !important;" /&gt;&lt;br /&gt;
) tend to espouse a somewhat-eastern zen-like worldview (taking the &amp;#8220;be a systems administrator NINJA!&amp;#8221; metaphor too far, perhaps?). This book, though milder in that respect, does have some (pro-yoga) moments. (I can&amp;#8217;t stand yoga, in part because I am an inflexible jerk.) For me, that&amp;#8217;s a con; it may not be a con for you.But I am the one writing this review, so I call it a con. And not the kind of con that prevented me from enjoying and recommending this book.&lt;/p&gt;
&lt;h4&gt;Disclaimer:&lt;/h4&gt;
&lt;p&gt;Dear FTC: I bought this book. Nobody is compensating me for this review. If I&amp;#8217;m lucky, I&amp;#8217;ll be able to get a latte with the proceeds from the amazon affiliate links I&amp;#8217;ve placed here. The fact that I felt the need to mention any of this makes you jerks. &lt;/p&gt;
&lt;img src="http://feeds.feedburner.com/~r/IHopeSolution/~4/YpQYY2Tg-NU" height="1" width="1"/&gt;</content>
		<link rel="replies" type="text/html" href="http://ihopesolution.com/2009/11/book-review-time-management-for-systems-administrators/#comments" thr:count="2" />
		<link rel="replies" type="application/atom+xml" href="http://ihopesolution.com/2009/11/book-review-time-management-for-systems-administrators/feed/atom/" thr:count="2" />
		<thr:total>2</thr:total>
	<feedburner:origLink>http://ihopesolution.com/2009/11/book-review-time-management-for-systems-administrators/</feedburner:origLink></entry>
		<entry>
		<author>
			<name>pfhawkins</name>
						<uri>http://pfhawkins.com</uri>
					</author>
		<title type="html"><![CDATA[Emacs vs. VI Keybindings]]></title>
		<link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/IHopeSolution/~3/-XMYLSHdq-k/" />
		<id>http://ihopesolution.com/?p=74</id>
		<updated>2009-08-31T13:26:37Z</updated>
		<published>2009-08-31T15:25:14Z</published>
		<category scheme="http://ihopesolution.com" term="Administration" /><category scheme="http://ihopesolution.com" term="emacs" /><category scheme="http://ihopesolution.com" term="softskills" /><category scheme="http://ihopesolution.com" term="vi" />		<summary type="html"><![CDATA[Chances are, if you&#8217;ve spent any significant amount of time with POSIX-compliant systems, you&#8217;ve made an effort to learn either emacs or vi. (Unless crontab -e shunts you to nano, and you&#8217;ve not moved on.) I suspect that those who stick with emacs are generally programmers, while those who stick with vi are generally sysadmins [...]]]></summary>
		<content type="html" xml:base="http://ihopesolution.com/2009/08/emacs-vs-vi-keybindings/">&lt;p&gt;Chances are, if you&amp;#8217;ve spent any significant amount of time with POSIX-compliant systems, you&amp;#8217;ve made an effort to learn either emacs or vi. (Unless &lt;code&gt;crontab -e&lt;/code&gt; shunts you to nano, and you&amp;#8217;ve not moved on.) I suspect that those who stick with emacs are generally programmers, while those who stick with vi are generally sysadmins (although I do recognize that plenty of programmers spend their days in vi &amp;#8211; this is a hasty generalization made for the sake of argument). Since both editors are so different in approach, it makes sense to get deeply involved in one to the exclusion to the other. Being proficient in one is eventually more productive then only half-knowing both.&lt;/p&gt;
&lt;p&gt;That said, I suggest learning both sets of keybindings.&lt;/p&gt;
&lt;p&gt;The reason I suggest this is because many other programs implement &lt;em&gt;either&lt;/em&gt; emacs &lt;em&gt;or&lt;/em&gt; vi keybindings. By default, bash uses some emacs keybindings for moving around the command-line, although it can be configured to us vi-like bindings too. The aforementioned frankeneditor nano also has emacs-like bindings. Pagers such as more, less, and most utilize vi keybindings. As a systems administrator, at some point you&amp;#8217;re going to find yourself on an unfamiliar box, with a less than familiar tool. I guarantee that pulling the old &amp;#8220;I wonder if this tool uses vi commands for navigation&amp;#8221; trick will result in a percentage increase in productivity that, while completely cooked up off the top of my head, is nevertheless real and measurable.&lt;/p&gt;
&lt;p&gt;So. If you&amp;#8217;ve slavishly commited yourself to one editor and one set of keybindings to the exclusion of the other: Be Ye Not So Stupid.&lt;/p&gt;
&lt;img src="http://feeds.feedburner.com/~r/IHopeSolution/~4/-XMYLSHdq-k" height="1" width="1"/&gt;</content>
		<link rel="replies" type="text/html" href="http://ihopesolution.com/2009/08/emacs-vs-vi-keybindings/#comments" thr:count="4" />
		<link rel="replies" type="application/atom+xml" href="http://ihopesolution.com/2009/08/emacs-vs-vi-keybindings/feed/atom/" thr:count="4" />
		<thr:total>4</thr:total>
	<feedburner:origLink>http://ihopesolution.com/2009/08/emacs-vs-vi-keybindings/</feedburner:origLink></entry>
		<entry>
		<author>
			<name>matt</name>
						<uri>http://hoobajoobfaq.org</uri>
					</author>
		<title type="html"><![CDATA[Paid per email and why it won&#8217;t work]]></title>
		<link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/IHopeSolution/~3/xjPQqUtScBc/" />
		<id>http://ihopesolution.com/?p=65</id>
		<updated>2009-08-22T17:55:33Z</updated>
		<published>2009-08-22T18:30:13Z</published>
		<category scheme="http://ihopesolution.com" term="Email" /><category scheme="http://ihopesolution.com" term="Rants" /><category scheme="http://ihopesolution.com" term="Webhosting" /><category scheme="http://ihopesolution.com" term="spam spam bacon eggs and spam" />		<summary type="html"><![CDATA[A while back, people in IT kicked the tires on paying per email sent. Nothing ever came of it but the idea is coming back in the form of Yahoo sponsored CentMail. I initially heard of this thanks to a well written article by MacGregor Campbell over at the New Scientist. According to the article [...]]]></summary>
		<content type="html" xml:base="http://ihopesolution.com/2009/08/paid-per-email-and-why-it-wont-work/">&lt;p&gt;A while back, people in IT kicked the tires on paying per email sent. Nothing ever came of it but the idea is coming back in the form of Yahoo sponsored &lt;a href="http://centmail.net/"&gt;CentMail&lt;/a&gt;. I initially heard of this thanks to a well written article by MacGregor Campbell over at the &lt;a href="http://www.newscientist.com/article/dn17577-payperemail-plan-to-beat-spam-and-help-charity.html"&gt;New Scientist&lt;/a&gt;. According to the article Yahoo is experimenting with Pay per email system, but with the cost of an email be only one US cent ($.01US) and that money going the sender&amp;#8217;s charity of choice. The eliminates the original complaint of Pay per Email; different ISPs charging different rates. It also gets more money into charities which is always a good idea.&lt;/p&gt;
&lt;p&gt;Problem is, it won&amp;#8217;t work.&lt;/p&gt;
&lt;p&gt;Simple Mail Transport Protocol, or SMTP, is the mechanism by which is email is sent. It&amp;#8217;s simple and it works. There really isn&amp;#8217;t a lot to it. You send a plain text stream that contains your message header and the email body to your domain&amp;#8217;s SMTP server and it sends it out to the recipient&amp;#8217;s mail server. I&amp;#8217;m simplifying it a bit, but not by much. And due to its relatively straightforward design, SMTP is subject to abuse. We&amp;#8217;ve all gotten the viagra and porn spam in our inbox. And there are methods to deal with spam like Domain Keys, SPF records, RBLs and server side spam filter software. And that all works, but it adds unnecessary levels of complexity to the email process. The CentMail idea will add just another layer to that.&lt;/p&gt;
&lt;p&gt;I don&amp;#8217;t work with that aspect of email much anymore, but my coworkers who work the phones do. Each of them is helping one of our customers get out of email purgatory. A customer will send some email that one of the ISP doesn&amp;#8217;t like and it&amp;#8217;ll get put on the ISPs blacklist.  The customer then calls us and one of the guys in Support has to fight with the ISP to get the customer&amp;#8217;s Domain removed from the blacklist. The problems lay in that there is no standard on what classifies spam and how to handle it. Each email provider, be it an ISP like Charter or Comcast, or a webmail provider like Google and Yahoo have different requirements and have different levels of pain involved with getting a domain whitelisted.&lt;/p&gt;
&lt;p&gt;And that&amp;#8217;s not including the RBLs, or Remote Blacklists. These RBLs are another level of spam prevention and another level of complexity. They work by keeping a list of spam related IP address and Domains. Your mail client checks each incoming email against each RBL and drops mail that is on the list. Getting off the RBLs can be even more painful, ranging from paying a fee to clearing out an entire C-block of IPs.&lt;/p&gt;
&lt;p&gt;The CentMail website, which is a horrible pun by the way, states &amp;#8220;Anyone you email can automatically verify your donation and confirm you&amp;#8217;re not a spammer. Since spammers send millions of emails every day, it is prohibitively expensive for them to donate even just 1¢ per email.&amp;#8221; That won&amp;#8217;t stop the spammers. I&amp;#8217;m guessing that Yahoo is assuming that there will be checks on both ends of the email sending process. But unless they intentionally modifiy SMTP to be non standard compliant, all a spammer has to do is use an MTA that doesn&amp;#8217;t check for the Cyberstamp to get their mail out.&lt;/p&gt;
&lt;p&gt;From the process described on the New Scientist article, it sounds like there will be an addition to the email&amp;#8217;s header that will contain the Cyberstamp signature, and a link will be embedded that will allow the sender to verify that your did donate that penny to the Humane Society. That&amp;#8217;s great until the Spammers figure out a way to spoof the headers and make that link redirect the user to a phish site. There are enough people out there using unpatched versions of Windows XP that this would be presenting another vector for hackers to compromise new systems.&lt;/p&gt;
&lt;p&gt;On that same vein, what is to prevent a receiver from filtering email that contains a cyberstamp to a charity that they find objectionable? Lets say I send you an email and I donate that penny to AIDS research or Planned Parenthood. Now lets say you work for a conservative company that finds both of objectionable. What is stopping them from just dropping those emails? This adds another layer of potential problems for CentMail.&lt;/p&gt;
&lt;p&gt;And what&amp;#8217;s keeping companies from creating their own systems or not even adopting it? This system would only work if everyone, and I mean &lt;em&gt;everyone&lt;/em&gt; was on board with it. And the disturbing trend of ISPs hijacking DNS indicates that the ISPsa at least have no desire for adopting a standard that someone else created.&lt;/p&gt;
&lt;p&gt;All in all, I don&amp;#8217;t see Cyberstamps stopping the spam problem with the way email is currently setup. The RBLs and the spam filters work well. I&amp;#8217;ve gotten maybe on 1 spam in the past 3 months on one of my email accounts, which is a lot less then what i get in my physical mailbox. In order for Centmail to work, you&amp;#8217;d need a major upheval in the status quo and I don&amp;#8217;t see it happening. Cyberstamps version 2 is doomed to fail even before its released.&lt;/p&gt;
&lt;img src="http://feeds.feedburner.com/~r/IHopeSolution/~4/xjPQqUtScBc" height="1" width="1"/&gt;</content>
		<link rel="replies" type="text/html" href="http://ihopesolution.com/2009/08/paid-per-email-and-why-it-wont-work/#comments" thr:count="2" />
		<link rel="replies" type="application/atom+xml" href="http://ihopesolution.com/2009/08/paid-per-email-and-why-it-wont-work/feed/atom/" thr:count="2" />
		<thr:total>2</thr:total>
	<feedburner:origLink>http://ihopesolution.com/2009/08/paid-per-email-and-why-it-wont-work/</feedburner:origLink></entry>
		<entry>
		<author>
			<name>matt</name>
						<uri>http://hoobajoobfaq.org</uri>
					</author>
		<title type="html"><![CDATA[Accessing remote file systems with sshfs]]></title>
		<link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/IHopeSolution/~3/VYnXG0UQF1o/" />
		<id>http://ihopesolution.com/?p=58</id>
		<updated>2009-08-11T05:44:50Z</updated>
		<published>2009-08-12T16:49:56Z</published>
		<category scheme="http://ihopesolution.com" term="Administration" /><category scheme="http://ihopesolution.com" term="bash" /><category scheme="http://ihopesolution.com" term="production" /><category scheme="http://ihopesolution.com" term="ssh" />		<summary type="html"><![CDATA[Like anyone has data stored accross multiple servers, keeping it organized can be a headache. At my house, I&#8217;m using a server running Samba to store my data for my laptop and desktop. That way, when I edit file X, I know it&#8217;ll be the same on either system.
Samba works great at home. However, opening [...]]]></summary>
		<content type="html" xml:base="http://ihopesolution.com/2009/08/accessing-remote-file-systems-with-sshfs/">&lt;p&gt;Like anyone has data stored accross multiple servers, keeping it organized can be a headache. At my house, I&amp;#8217;m using a server running Samba to store my data for my laptop and desktop. That way, when I edit file X, I know it&amp;#8217;ll be the same on either system.&lt;/p&gt;
&lt;p&gt;Samba works great at home. However, opening a Samba share to entire world is a Bad Idea™.I wanted to be able to access some of my files off of my server at work that was secure and didn&amp;#8217;t require setting up too much extra software. And this is where sshfs comes into play. Sshfs is a Filesystem client based off of the SSH Protocol. I picked sshfs over something like webdav because the server in question doesn&amp;#8217;t have Apache installed and all of the servers I work on run ssh.&lt;/p&gt;
&lt;p&gt;Setting up and using sshfs is pretty straight forward. First, install sshfs on the client. That&amp;#8217;s one of the best part of sshfs; as long as the server has ssh running, you don&amp;#8217;t need have to do anything on the server.  All of my boxes are running a varient of Debian, so I just used aptitude to install sshfs.&lt;/p&gt;
&lt;blockquote&gt;&lt;p&gt;sudo aptitude install sshfs&lt;/p&gt;&lt;/blockquote&gt;
&lt;p&gt;I have not tried installing this on other linux distros, but I&amp;#8217;m going to guess that using their package managers will give you similiar results. If you want to do things the hard way, source can be downloaded &lt;a href="http://fuse.sourceforge.net/sshfs.html"&gt;here&lt;/a&gt;. You&amp;#8217;ll need FUSE2.2 and the latest version of glibc devel installed also. Your package manager of choice should take care of the dependencies for you.&lt;/p&gt;
&lt;p&gt;Once you&amp;#8217;ve got the software installed, you&amp;#8217;ll need to add your normal user to the fuse group so they can mount and unmount the sshfs shares. You can use your GUI of choice, of the following CLI command:&lt;/p&gt;
&lt;blockquote&gt;&lt;p&gt;sudo adduser user fuse&lt;/p&gt;&lt;/blockquote&gt;
&lt;p&gt;That&amp;#8217;s it! That&amp;#8217;s all you need to do to setup sshfs. Like with any file system, make a directory to mount the system to and then run the following command:&lt;/p&gt;
&lt;blockquote&gt;&lt;p&gt;sshfs remoteuser@remotesystem:/path/to/dir localdir&lt;/p&gt;&lt;/blockquote&gt;
&lt;p&gt;You&amp;#8217;ll now be able to access that directory remotely using sshfs. When running that above command, you may get the following error:&lt;/p&gt;
&lt;blockquote&gt;&lt;p&gt;fusermount: failed to open /dev/fuse: Permission denied&lt;/p&gt;&lt;/blockquote&gt;
&lt;p&gt;Try running the command in a fresh shell. Chances are the current shell hasn&amp;#8217;t picked up on the refreshed permissions. To unmount the sshfs directory, run the following command:&lt;/p&gt;
&lt;blockquote&gt;&lt;p&gt;fusermount -u mountpoint&lt;/p&gt;&lt;/blockquote&gt;
&lt;p&gt;Like any filesystem, sshfs shares can be automagically mounted via the server&amp;#8217;s fstab. Please note that if you do want to have the sshfs automount due to fstab, you will need to have SSH keys setup between the client and the server. Below is the syntax you&amp;#8217;d want to use:&lt;/p&gt;
&lt;blockquote&gt;&lt;p&gt;sshfs#USERNAME@REMOTE_HOST:REMOTE_PATH MOUNT_POINT fuse SSHFS_OPTIONS 0 0&lt;/p&gt;&lt;/blockquote&gt;
&lt;p&gt;&lt;!-- 		@page { margin: 0.79in } 		P { margin-bottom: 0.08in } --&gt;&lt;/p&gt;
&lt;p style="margin-bottom: 0in;"&gt;It&amp;#8217;s a pretty straightforward solution to a problem that had been bugging me for a while. I am able to access my remote files on a server with the ease of a samba share without having to install any extra software on the server itself. To me, something like sshfs is more convenient than webdav or sftp, because it allows the remote system to integrate seamlessly into my current system. I hope you find sshfs as useful as I have.&lt;/p&gt;
&lt;img src="http://feeds.feedburner.com/~r/IHopeSolution/~4/VYnXG0UQF1o" height="1" width="1"/&gt;</content>
		<link rel="replies" type="text/html" href="http://ihopesolution.com/2009/08/accessing-remote-file-systems-with-sshfs/#comments" thr:count="0" />
		<link rel="replies" type="application/atom+xml" href="http://ihopesolution.com/2009/08/accessing-remote-file-systems-with-sshfs/feed/atom/" thr:count="0" />
		<thr:total>0</thr:total>
	<feedburner:origLink>http://ihopesolution.com/2009/08/accessing-remote-file-systems-with-sshfs/</feedburner:origLink></entry>
		<entry>
		<author>
			<name>pfhawkins</name>
						<uri>http://pfhawkins.com</uri>
					</author>
		<title type="html"><![CDATA[Naming Variables Sanely]]></title>
		<link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/IHopeSolution/~3/QxY9Bwazoik/" />
		<id>http://ihopesolution.com/?p=54</id>
		<updated>2009-08-01T21:49:46Z</updated>
		<published>2009-08-02T14:30:50Z</published>
		<category scheme="http://ihopesolution.com" term="Configuration" /><category scheme="http://ihopesolution.com" term="Rants" /><category scheme="http://ihopesolution.com" term="ftp" /><category scheme="http://ihopesolution.com" term="naming" /><category scheme="http://ihopesolution.com" term="variables" />		<summary type="html"><![CDATA[I had a simple goal. Well, someone else had a simple goal, but it was my task to fulfill it: raise the maximum number of files that could be listed in a directory in an ftp client. Pure FTP by default limits this to 2000, a reasonable limit in my opinion. But no, them what [...]]]></summary>
		<content type="html" xml:base="http://ihopesolution.com/2009/08/naming-variables-sanely/">&lt;p&gt;I had a simple goal. Well, someone else had a simple goal, but it was my task to fulfill it: raise the maximum number of files that could be listed in a directory in an ftp client. Pure FTP by default limits this to 2000, a reasonable limit in my opinion. But no, them what pays the bills needed it higher.&lt;/p&gt;
&lt;p&gt;It took me fifteen minutes to find the variable that needs to be set in Pure FTP&amp;#8217;s config file (and not because of a deficiency in my google-fu):&lt;/p&gt;
&lt;p&gt;&lt;code&gt;LimitRecursion&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;Oh, the things that I googled! The terms that I grepped! Things like &amp;#8220;max&amp;#8221; and &amp;#8220;num&amp;#8221; and &amp;#8220;files&amp;#8221;. I finally stumbled upon &amp;#8220;limit&amp;#8221; and found the bugger. Yet fifteen minutes! Far too much time for such a simple task.&lt;/p&gt;
&lt;p&gt;Naming that variable &lt;code&gt;LimitRecursion&lt;/code&gt; makes sense when you&amp;#8217;re programming. You&amp;#8217;re writing an ftp server, and suddenly you realize &amp;#8220;hey, this directory with a crapton of files is nomming my resources, thanks to recursion. Let&amp;#8217;s limit the amount of recursion that can occur and keep the server happy in the process. Let&amp;#8217;s see, I&amp;#8217;m trying to limit recursion&amp;#8230; hmm&amp;#8230; what should I name my variable&amp;#8230;&amp;#8221;&lt;/p&gt;
&lt;p&gt;But when you answer &lt;code&gt;LimitRecursion&lt;/code&gt; &lt;strong&gt;you are wrong sir&lt;/strong&gt;. Because this program will be used by people who don&amp;#8217;t give a fig how you keep the server up (limiting recursion) but &lt;em&gt;do&lt;/em&gt; give a fig about the maximum number of files they can display.&lt;/p&gt;
&lt;p&gt;When you name a variable, or create an API, please, for the love of Pete and end users and sysadmins everywhere, NAME IT LIKE YOU&amp;#8217;RE AN END USER. By doing so, you GREATLY lessen your chances of being injured by an end user with a voodoo doll.&lt;/p&gt;
&lt;img src="http://feeds.feedburner.com/~r/IHopeSolution/~4/QxY9Bwazoik" height="1" width="1"/&gt;</content>
		<link rel="replies" type="text/html" href="http://ihopesolution.com/2009/08/naming-variables-sanely/#comments" thr:count="0" />
		<link rel="replies" type="application/atom+xml" href="http://ihopesolution.com/2009/08/naming-variables-sanely/feed/atom/" thr:count="0" />
		<thr:total>0</thr:total>
	<feedburner:origLink>http://ihopesolution.com/2009/08/naming-variables-sanely/</feedburner:origLink></entry>
		<entry>
		<author>
			<name>ardichoke</name>
						<uri>http://stealinurmegahurtz.com</uri>
					</author>
		<title type="html"><![CDATA[Disabling Update Notifier Pop-up in Ubuntu 9.04]]></title>
		<link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/IHopeSolution/~3/m3EuDYHUMEY/" />
		<id>http://ihopesolution.com/?p=50</id>
		<updated>2009-07-30T08:52:21Z</updated>
		<published>2009-07-30T13:00:15Z</published>
		<category scheme="http://ihopesolution.com" term="Configuration" /><category scheme="http://ihopesolution.com" term="9.04" /><category scheme="http://ihopesolution.com" term="Jaunty" /><category scheme="http://ihopesolution.com" term="pop-up" /><category scheme="http://ihopesolution.com" term="Ubuntu" /><category scheme="http://ihopesolution.com" term="Update Notifier" />		<summary type="html"><![CDATA[It seems that some ad-wizard at Canonical decided that the tray icon that notifies you of available updates in Ubuntu was simply too well liked. Thus, in 9.04, they decided to make the update manager automatically pop open any time there are updates found no matter what you are doing. Luckily, for those of us [...]]]></summary>
		<content type="html" xml:base="http://ihopesolution.com/2009/07/disabling-update-notifier-pop-up-in-ubuntu-9-04/">&lt;p&gt;It seems that some ad-wizard at Canonical decided that the tray icon that notifies you of available updates in Ubuntu was simply too well liked. Thus, in 9.04, they decided to make the update manager automatically pop open any time there are updates found no matter what you are doing. Luckily, for those of us that actually enjoy an unobtrusive user interface, restoring the update manager to it&amp;#8217;s original tray icon glory is a single command away. Simply run the following and your web 1.0 auto pop-up annoyances with Update Notifier will decrease a full 100%!&lt;/p&gt;
&lt;p&gt;&lt;code&gt;gconftool -s --type bool /apps/update-notifier/auto_launch false&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;To make the change take effect you will need to restart the Update notifier, or log out and log back in.&lt;/p&gt;
&lt;img src="http://feeds.feedburner.com/~r/IHopeSolution/~4/m3EuDYHUMEY" height="1" width="1"/&gt;</content>
		<link rel="replies" type="text/html" href="http://ihopesolution.com/2009/07/disabling-update-notifier-pop-up-in-ubuntu-9-04/#comments" thr:count="1" />
		<link rel="replies" type="application/atom+xml" href="http://ihopesolution.com/2009/07/disabling-update-notifier-pop-up-in-ubuntu-9-04/feed/atom/" thr:count="1" />
		<thr:total>1</thr:total>
	<feedburner:origLink>http://ihopesolution.com/2009/07/disabling-update-notifier-pop-up-in-ubuntu-9-04/</feedburner:origLink></entry>
		<entry>
		<author>
			<name>matt</name>
						<uri>http://hoobajoobfaq.org</uri>
					</author>
		<title type="html"><![CDATA[Backing up postgreSQL DBs with bash and cron]]></title>
		<link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/IHopeSolution/~3/HLmVPq7rTpk/" />
		<id>http://ihopesolution.com/?p=42</id>
		<updated>2009-07-21T15:59:34Z</updated>
		<published>2009-07-21T21:59:23Z</published>
		<category scheme="http://ihopesolution.com" term="Administration" /><category scheme="http://ihopesolution.com" term="Databases" /><category scheme="http://ihopesolution.com" term="bash" /><category scheme="http://ihopesolution.com" term="development" /><category scheme="http://ihopesolution.com" term="postgresql" /><category scheme="http://ihopesolution.com" term="production" />		<summary type="html"><![CDATA[I&#8217;ve been working with postgres in my free time for a while now. I have been playing with fire, so to speak. I haven&#8217;t had any sort of backup solution on my postgres server. So after a bit of googling and reading postgres docs, I&#8217;ve came up with a very basic backup script.
What it does [...]]]></summary>
		<content type="html" xml:base="http://ihopesolution.com/2009/07/backing-up-postgresql-dbs-with-bash-and-cron/">&lt;p&gt;&lt;img class="aligncenter size-full wp-image-43" title="postgresql" src="http://ihopesolution.com/wp-content/uploads/2009/07/postgresql.png" alt="postgresql" width="268" height="208" /&gt;I&amp;#8217;ve been working with postgres in my free time for a while now. I have been playing with fire, so to speak. I haven&amp;#8217;t had any sort of backup solution on my postgres server. So after a bit of googling and reading postgres docs, I&amp;#8217;ve came up with a very basic backup script.&lt;/p&gt;
&lt;p&gt;What it does is backup each database separately and zips them up in order to save on space. It puts an hour &amp;#8211; minute stamp on the database file and backs the DB up to a directory that is the current date. I&amp;#8217;m going to add more to the script later, like only keeping so many backups, etc. But at this point, I just wanted to get a script running that creates backups just in case the server&amp;#8217;s main drive dies or I botch something.&lt;/p&gt;
&lt;p&gt;So without further ado, here&amp;#8217;s the code of the script. I do have to give credit to the author of &lt;a href="http://archives.postgresql.org/pgsql-admin/2001-03/msg00143.php"&gt;this post&lt;/a&gt;, as I heavily modified that script to do what I needed it to do. The big thing was the sed-awk line, as my sed-fu is quite poor.&lt;/p&gt;
&lt;blockquote&gt;
&lt;pre&gt;#! /bin/bash
# PGSQL backup script

# logfile loc
logfile="/var/log/pgbackup.log"
# backup loc
backup_dir="/backup/pg_backups/"
touch $logfile
timeslot=`date +%H-%M`
monthday=`date +%F`

# mount /backup, create the dir and get a list of dbs
/bin/mount /backup
/bin/mkdir $backup_dir/$monthday
databases=`psql -U postgres -q -c "\l" | sed -n 4,/\eof/p | grep -v rows\) | awk {'print $1'}`

#backup the dbs
for i in $databases; do
        timeinfo=`date '+%T %x'`
        echo "Backup complete at $timeinfo for time slot $timeslot on database: $i " &amp;gt;&amp;gt; $logfile
	/usr/bin/pg_dump -U postgres $i | gzip &amp;gt; "$backup_dir/$monthday/postgre-$i-$timeslot-db.gz"
done

#unmount the backup drive
/bin/umount /backup&lt;/pre&gt;
&lt;/blockquote&gt;
&lt;p&gt;And that&amp;#8217;s that. It&amp;#8217;s a pretty simple script, but it gets the job done. I&amp;#8217;m obviously running the script on the machine that postgres is on and the server I&amp;#8217;m running it on is Ubuntu LTS with a backup drive in the server, so your milage may vary depending on your distro and your setup. You may want to test the script first before setting it as a cron on your DB server. Speaking of the cron, here&amp;#8217;s the line you&amp;#8217;ll want to set in your root crontab.&lt;/p&gt;
&lt;blockquote&gt;
&lt;pre&gt;00 06 * * * /root/bin/pgbackup.sh &amp;gt; /dev/null 2&amp;gt;&amp;amp;1&lt;/pre&gt;
&lt;/blockquote&gt;
&lt;p&gt;I have the cron set to run at 6am since I&amp;#8217;m asleep at 6am, so no one will be accessing the DBs. And now my DBs are safe from me and my postgres nubness.&lt;/p&gt;
&lt;img src="http://feeds.feedburner.com/~r/IHopeSolution/~4/HLmVPq7rTpk" height="1" width="1"/&gt;</content>
		<link rel="replies" type="text/html" href="http://ihopesolution.com/2009/07/backing-up-postgresql-dbs-with-bash-and-cron/#comments" thr:count="1" />
		<link rel="replies" type="application/atom+xml" href="http://ihopesolution.com/2009/07/backing-up-postgresql-dbs-with-bash-and-cron/feed/atom/" thr:count="1" />
		<thr:total>1</thr:total>
	<feedburner:origLink>http://ihopesolution.com/2009/07/backing-up-postgresql-dbs-with-bash-and-cron/</feedburner:origLink></entry>
		<entry>
		<author>
			<name>matt</name>
						<uri>http://hoobajoobfaq.org</uri>
					</author>
		<title type="html"><![CDATA[The importance of documentation]]></title>
		<link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/IHopeSolution/~3/Yuqq_XfcAVo/" />
		<id>http://ihopesolution.com/?p=36</id>
		<updated>2009-07-16T17:43:08Z</updated>
		<published>2009-07-16T17:43:08Z</published>
		<category scheme="http://ihopesolution.com" term="Administration" /><category scheme="http://ihopesolution.com" term="Rants" /><category scheme="http://ihopesolution.com" term="advice" /><category scheme="http://ihopesolution.com" term="development" /><category scheme="http://ihopesolution.com" term="production" />		<summary type="html"><![CDATA[A few jobs ago I was a Work Study in college, and I was the head of IT&#8217;s assistant. He was in charge of the PBX phone system along with the network and workstations.
We had to do some desk juggling and rather than change assignments in the PBX we decided to just move the cables [...]]]></summary>
		<content type="html" xml:base="http://ihopesolution.com/2009/07/the-importance-of-documentation/">&lt;p&gt;A few jobs ago I was a Work Study in college, and I was the head of IT&amp;#8217;s assistant. He was in charge of the PBX phone system along with the network and workstations.&lt;/p&gt;
&lt;p&gt;We had to do some desk juggling and rather than change assignments in the PBX we decided to just move the cables that connected the patch panel from the desk sto the PBX. Easy right? Nope. My boss&amp;#8217;s predecessor when he set up the PBX system, along with all of the other patch panels to labs and offices didn&amp;#8217;t document anything. He also used 15 foot cables when a 1 foot cable would have worked, but that&amp;#8217;s a rant for another day.&lt;/p&gt;
&lt;p&gt;My boss and I spent 20 hours over the course of a weekend documenting which ports on the patch panel matched which port in which office. 40 man-hours wasted because my boss&amp;#8217;s predescor didn&amp;#8217;t take a few minutes to document as he set everything up.&lt;/p&gt;
&lt;p&gt;This kind of behavior is hard for me to wrap my head around. And my PBX example above isn&amp;#8217;t an isolated experience. It seems that non-documentation like this occurs in IT departments across the country. It appears to be a mixture of pure laziness this and a &amp;#8220;If I know everything, I&amp;#8217;m irreplaceable&amp;#8221; mentality.&lt;/p&gt;
&lt;p&gt;SPOILERS: Everyone is replaceable.&lt;/p&gt;
&lt;p&gt;The replacement may not be better, but everyone is replaceable. Case in point, Michael Jordan, the greatest basketball player of all time, retired from the Bulls twice. After both times, the Bulls had to find another guy to start at Shooting Guard. Were either of them as good as Jordan? No, not at all, but they were his replacement.&lt;/p&gt;
&lt;p&gt;My advice is this: You&amp;#8217;re not going to be at your current job forever, so do yourself and everyone else a favor and document &lt;em&gt;everything&lt;/em&gt;. I use a mediawiki install for personal stuff, but even if its just a collection of Word docs in a network share, find something that works for you and run with it.&lt;/p&gt;
&lt;img src="http://feeds.feedburner.com/~r/IHopeSolution/~4/Yuqq_XfcAVo" height="1" width="1"/&gt;</content>
		<link rel="replies" type="text/html" href="http://ihopesolution.com/2009/07/the-importance-of-documentation/#comments" thr:count="0" />
		<link rel="replies" type="application/atom+xml" href="http://ihopesolution.com/2009/07/the-importance-of-documentation/feed/atom/" thr:count="0" />
		<thr:total>0</thr:total>
	<feedburner:origLink>http://ihopesolution.com/2009/07/the-importance-of-documentation/</feedburner:origLink></entry>
		<entry>
		<author>
			<name>pfhawkins</name>
						<uri>http://pfhawkins.com</uri>
					</author>
		<title type="html"><![CDATA[Deleting a Crapton of Small Files from a Directory Using Find]]></title>
		<link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/IHopeSolution/~3/7EJw2LPSwmo/" />
		<id>http://ihopesolution.com/?p=28</id>
		<updated>2009-07-13T12:16:54Z</updated>
		<published>2009-07-14T12:08:02Z</published>
		<category scheme="http://ihopesolution.com" term="Administration" /><category scheme="http://ihopesolution.com" term="Email" /><category scheme="http://ihopesolution.com" term="bash" /><category scheme="http://ihopesolution.com" term="find" />		<summary type="html"><![CDATA[One of the fun situations you find yourself in when administrating people&#8217;s email (at least, I find myself in this situation frequently enough, and I am an uninteresting person, so this is what passes for a fun situation in my world) is the dreaded I-have-magically-hit-my-email-quota problem. The conversation usually runs something like this:
User: HALP I [...]]]></summary>
		<content type="html" xml:base="http://ihopesolution.com/2009/07/deleting-crapton-of-small-files-using-find/">&lt;p&gt;One of the fun situations you find yourself in when administrating people&amp;#8217;s email (at least, I find myself in this situation frequently enough, and I am an uninteresting person, so this is what passes for a fun situation in my world) is the dreaded I-have-magically-hit-my-email-quota problem. The conversation usually runs something like this:&lt;/p&gt;
&lt;p&gt;User: HALP I cannot send any email on this address!&lt;/p&gt;
&lt;p&gt;Me: &lt;em&gt;checks logs&lt;/em&gt; The mail logs are telling me that it can&amp;#8217;t write to file due to quota issues. Looks like you&amp;#8217;ve hit your $BIGNUM quota.&lt;/p&gt;
&lt;p&gt;User: I don&amp;#8217;t know why the system quota is saying I have $BIGNUM of mail when $MAILCLIENT informs me I have $MUCHSMALLERNUM of mail.&lt;/p&gt;
&lt;p&gt;Me: &lt;em&gt;&lt;code&gt;cd&lt;/code&gt;&amp;#8217;s into user&amp;#8217;s maildir directory, starts running &lt;code&gt;ll -ah&lt;/code&gt; like a boss&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;User: I mean, holy crap, I friggin&amp;#8217; hate email, why does the world have to hate me, I have $VERYIMPORTANTATTACHMENT to send to $BIGCLIENT and then this happens. Why don&amp;#8217;t computers run on happiness and unicorn farts?&lt;/p&gt;
&lt;p&gt;Me: Ah, it looks like this email address has $BIGNUM &amp;#8211; $MUCHSMALLERNUM worth of mail in its &lt;code&gt;.spam&lt;/code&gt; directory.&lt;/p&gt;
&lt;p&gt;User: I have a dot spam directory? How come I can&amp;#8217;t see it in $MAILCLIENT?&lt;/p&gt;
&lt;p&gt;Me: You know, I could explain the concept of &lt;a href="http://www.linfo.org/hidden_file.html"&gt;how hidden directories work&lt;/a&gt; in linux, and bemoan the fact that the mailserver uses them and most mail clients don&amp;#8217;t, but in lieu of that, how about I delete all of that spam for you, thereby fixing your quota issue?&lt;/p&gt;
&lt;p&gt;User: &lt;em&gt;in a monotone&lt;/em&gt; Thank you sir may I have another&lt;/p&gt;
&lt;p&gt;Here is the bash one-liner for removing the mails from this directory:&lt;/p&gt;
&lt;blockquote&gt;&lt;p&gt;&lt;code&gt;for file in $(find -type f -maxdepth 1); do rm -fv $file; done&lt;/code&gt;&lt;/p&gt;&lt;/blockquote&gt;
&lt;p&gt;&amp;#8220;But sir! Sir!&amp;#8221; you find yourself saying, &amp;#8220;why on earth are you not using &lt;code&gt;xargs&lt;/code&gt;? Surely piping find&amp;#8217;s output to &lt;code&gt;xargs&lt;/code&gt; is more memory-efficient than a naive &lt;code&gt;for&lt;/code&gt; loop!&amp;#8221;&lt;/p&gt;
&lt;p&gt;While it is true that a for loop is less memory efficient than piping find to xargs, I always use it in this situation. The reason is simple; if a directory is $BIGNUM large, and most of the files in it are measured in tens of kilobytes, your find command will more often than not send too many arguments xarg&amp;#8217;s way. Your time is too precious a commodity to see whether or not this is one of the situations when the stars align and the mail quota is small enough that the directory doesn&amp;#8217;t have too many files for xargs. Just use the for loop. If the server is reasonably fast, it will handle it gracefully.&lt;/p&gt;
&lt;p&gt;Every once in a while you&amp;#8217;ll run into an enlightened user who realizes, just as you&amp;#8217;re about to go and mow through the .spam directory, that hey, there was an important email last week that somehow never got through. They&amp;#8217;d like to be able to poke at the last week&amp;#8217;s .spam emails. Which means you can&amp;#8217;t just delete all the mails willy-nilly. This is why God invented the &lt;code&gt;-mtime&lt;/code&gt; flag.&lt;/p&gt;
&lt;blockquote&gt;&lt;p&gt;&lt;code&gt;for file in $(find -type f -maxdepth 1 -mtime +7); do rm -fv $file; done&lt;/code&gt;&lt;/p&gt;&lt;/blockquote&gt;
&lt;p&gt;That &lt;code&gt;-mtime +7&lt;/code&gt; causes find to snag only the files that haven&amp;#8217;t been modified in the last seven days.&lt;/p&gt;
&lt;p&gt;I really can&amp;#8217;t get over how useful a little command like &lt;code&gt;find&lt;/code&gt; can be. I mean, I&amp;#8217;ve tried to get over it. Brought it into therapy a couple of times. Still can&amp;#8217;t shake how useful it is. I usually refer to &lt;a href="http://www.softpanorama.org/Tools/Find/find_mini_tutorial.shtml"&gt;this find tutorial&lt;/a&gt; when I trip over the syntax.&lt;/p&gt;
&lt;p&gt;One final tip: before you start deleting data with reckless abandon, I &lt;strong&gt;highly&lt;/strong&gt; recommend substituting &amp;#8220;&lt;code&gt;do echo $file;&lt;/code&gt;&amp;#8221; for &lt;code&gt;"do rm -fv $file;"&lt;/code&gt; in the above one-liners. It never hurts to make sure that you&amp;#8217;re actually grabbing the files you think you are before you delete them.&lt;/p&gt;
&lt;img src="http://feeds.feedburner.com/~r/IHopeSolution/~4/7EJw2LPSwmo" height="1" width="1"/&gt;</content>
		<link rel="replies" type="text/html" href="http://ihopesolution.com/2009/07/deleting-crapton-of-small-files-using-find/#comments" thr:count="1" />
		<link rel="replies" type="application/atom+xml" href="http://ihopesolution.com/2009/07/deleting-crapton-of-small-files-using-find/feed/atom/" thr:count="1" />
		<thr:total>1</thr:total>
	<feedburner:origLink>http://ihopesolution.com/2009/07/deleting-crapton-of-small-files-using-find/</feedburner:origLink></entry>
		<entry>
		<author>
			<name>matt</name>
						<uri>http://hoobajoobfaq.org</uri>
					</author>
		<title type="html"><![CDATA[Recompiling Apache to use mpm_worker on a CPanel Server]]></title>
		<link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/IHopeSolution/~3/5DHfq-qvssM/" />
		<id>http://ihopesolution.com/?p=14</id>
		<updated>2009-07-15T18:27:50Z</updated>
		<published>2009-07-11T23:08:13Z</published>
		<category scheme="http://ihopesolution.com" term="Configuration" /><category scheme="http://ihopesolution.com" term="Webhosting" /><category scheme="http://ihopesolution.com" term="apache" /><category scheme="http://ihopesolution.com" term="cpanel" /><category scheme="http://ihopesolution.com" term="production" />		<summary type="html"><![CDATA[Arguably, the most important service that runs on a server is its webserver, and for most of the world this webserver is Apache. One of Apache&#8217;s main selling points, its modularity, is also its biggest drawback if not configured properly. Apache 2.0 and newer can be compiled with Multi Process Modules, or MPMs. The default [...]]]></summary>
		<content type="html" xml:base="http://ihopesolution.com/2009/07/recompiling-apache-to-use-mpm_worker-on-a-cpanel-server/">&lt;p&gt;Arguably, the most important service that runs on a server is its webserver, and for most of the world this webserver is Apache. One of Apache&amp;#8217;s main selling points, its modularity, is also its biggest drawback if not configured properly. Apache 2.0 and newer can be compiled with Multi Process Modules, or MPMs. The default MPM is prefork. Prefork is based off of the aging Apache 1.3 and works fine, but does have its disadvantages: it doesn&amp;#8217;t handle large amounts of traffic gracefully nor is it really designed to handle newer hardware.&lt;/p&gt;
&lt;p&gt;This is where mpm_worker comes in. Worker is a threaded MPM that is designed for newer hardware and handles larger amounts of traffic better. While prefork is the Apache default MPM, Debian based distrubutions run worker by default. Information regarding worker is available at the &lt;a href="http://httpd.apache.org/docs/2.2/mod/worker.html"&gt;Apache Documentation&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;&amp;#8220;But,&amp;#8221; you&amp;#8217;re asking yourself, &amp;#8220;I run a CPanel dedicated server and/or virtual private server at my webhost. Can I use worker?&amp;#8221; Absolutely. CPanel provides the aptly named EasyApache script that allows for recompiles of Apache and PHP using an easy to navigate interface.&lt;/p&gt;
&lt;p&gt;Before I get into the nitty gritty, a few caveats:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;If you&amp;#8217;re in a shared hosting or reseller environment using CPanel, you&amp;#8217;re probably out of luck. Most hosting providers do not allow for software changes in such situations.&lt;/li&gt;
&lt;li&gt;The Webhost Manager does have a web interface for EasyApache. I wouldn&amp;#8217;t use it, because if your browser crashes during the EA, it&amp;#8217;ll Break Everything™.&lt;/li&gt;
&lt;li&gt;Unless you are running a module that requires non threaded Apache, upgrading to worker will not cause any problems. Upgrading to Worker will not affect your PHP code, or your databases or your Google Analytics.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;First thing, You&amp;#8217;ll want to check to see what version of Apache you&amp;#8217;re running, because if you&amp;#8217;re running worker already then you&amp;#8217;re already set. You can figure out the version of Apache by running the following command:&lt;/p&gt;
&lt;blockquote&gt;&lt;p&gt;/usr/local/apache/bin/httpd -V&lt;/p&gt;&lt;/blockquote&gt;
&lt;p&gt;Which will give output like the following:&lt;/p&gt;
&lt;p&gt;&lt;img class="aligncenter size-full wp-image-15" title="version" src="http://ihopesolution.com/wp-content/uploads/2009/07/version.png" alt="version" width="662" height="533" /&gt;&lt;/p&gt;
&lt;p&gt;The line you&amp;#8217;re looking for is the &amp;#8220;APACHE_MPM_DIR&amp;#8221;. As the screen shot shows, this server has Apache running with prefork, so it needs an upgrade. You launch the EasyApache script with the following command.&lt;/p&gt;
&lt;blockquote&gt;&lt;p&gt;/scripts/easyapache&lt;/p&gt;&lt;/blockquote&gt;
&lt;p&gt;If your server is in a virtual environment using Xen, the EasyApache script will require a flag when it is executed. This flag will be provided when the script is ran. The technical reason is because the Xen console doesn&amp;#8217;t support curses, which the EasyApache script uses.&lt;/p&gt;
&lt;p&gt;A warning, I highly recommend running the EasyApache in a screen. As stated earlier, stopping an EA while its doing its thing will Break Everything™.&lt;/p&gt;
&lt;p&gt;You&amp;#8217;ll want to Customize based off of current profile and make sure that your compile Apache 2.0 or 2.2. Unless you&amp;#8217;re upgrading PHP also, the next couple of windows can be skipped. On the Short Options List, pick the Exhaustive Options List. Once you&amp;#8217;re in the exhaustive list, scroll until you hit the MPMs. It&amp;#8217;ll look like this.&lt;/p&gt;
&lt;p&gt;&lt;img class="aligncenter size-full wp-image-16" title="ea1" src="http://ihopesolution.com/wp-content/uploads/2009/07/ea1.png" alt="ea1" width="662" height="533" /&gt;&lt;/p&gt;
&lt;p&gt;Unselect any selected MPMs and select Worker. More often then not, no MPM will be selected, which is fine because Prefork will be installed if nothing will be selected. The screen shot is with Apache 2.2 select, this screen will be different if you&amp;#8217;re compiling Apache 2.0.&lt;/p&gt;
&lt;p&gt;Once you select Worker, the following screen will pop up:&lt;/p&gt;
&lt;p&gt;&lt;img class="aligncenter size-full wp-image-17" title="ea2" src="http://ihopesolution.com/wp-content/uploads/2009/07/ea2.png" alt="ea2" width="662" height="533" /&gt;&lt;/p&gt;
&lt;p&gt;Select OK and hit enter. The warning is there because the non prefork or worker MPMs are experimental will probably not work most of the time. Worker is completely stable, so its safe to ignore this warning.&lt;/p&gt;
&lt;p&gt;After that warning, navigate to the end and click save and build. With that, you have to wait for EasyApache to do its thing. This normally takes about 30 minutes, but can take longer depending on server load and how many modules are selected in EasyApache.&lt;/p&gt;
&lt;p&gt;WARNING: Do not close your shell window until the EasyApache is done, or it will break things in interesting and fun ways. You DID remember to run this in a screen, right?&lt;/p&gt;
&lt;p&gt;Once it&amp;#8217;s done, you&amp;#8217;ll want to check that it finished correctly. I usually do this by restarting Apache. Generally, if the EasyApache failed, Apache will error on restart.  After Apache restarts, you&amp;#8217;ll want to check to make sure that Worker was installed, running the version check command from earlier. If everything went according to plan, you should get something like this:&lt;/p&gt;
&lt;p&gt;&lt;img class="aligncenter size-full wp-image-19" title="final" src="http://ihopesolution.com/wp-content/uploads/2009/07/final.png" alt="final" width="662" height="550" /&gt;&lt;/p&gt;
&lt;p&gt;If you&amp;#8217;ve got something like that, then everything worked correctly. Now we&amp;#8217;ll want to check to make sure Apache has its optimization directives in place. Sometimes EasyApache includes these directives, other times it doesn&amp;#8217;t and I&amp;#8217;m not really sure why. You&amp;#8217;ll want to search for a block of text towards the top of the config at /usr/local/apache/conf/httpd.conf like the following. If its not there, add it. This block of text will be before the vhosts.&lt;/p&gt;
&lt;blockquote&gt;
&lt;pre&gt;Timeout 300
KeepAlive On
MaxKeepAliveRequests 150
KeepAliveTimeout 5
&amp;lt;IfModule worker.c&amp;gt;
ServerLimit 16
StartServers 2
MaxClients 150
MinSpareThreads 25
MaxSpareThreads 75
ThreadsPerChild 25
MaxRequestsPerChild 500
&amp;lt;/IfModule&amp;gt;&lt;/pre&gt;
&lt;/blockquote&gt;
&lt;p&gt;Once you&amp;#8217;ve added these directives, you&amp;#8217;ll want to restart Apache so they can take effect. These directives will probably need to be scaled depending on your server&amp;#8217;s traffic load and how much resources the server has, but they do work well as a starting point.&lt;/p&gt;
&lt;p&gt;And you&amp;#8217;re done! Apache is now running the mpm_worker module. If your server has a high traffic load, the difference should be immediate. Slower traffic servers may not notice it until later.&lt;/p&gt;
&lt;img src="http://feeds.feedburner.com/~r/IHopeSolution/~4/5DHfq-qvssM" height="1" width="1"/&gt;</content>
		<link rel="replies" type="text/html" href="http://ihopesolution.com/2009/07/recompiling-apache-to-use-mpm_worker-on-a-cpanel-server/#comments" thr:count="0" />
		<link rel="replies" type="application/atom+xml" href="http://ihopesolution.com/2009/07/recompiling-apache-to-use-mpm_worker-on-a-cpanel-server/feed/atom/" thr:count="0" />
		<thr:total>0</thr:total>
	<feedburner:origLink>http://ihopesolution.com/2009/07/recompiling-apache-to-use-mpm_worker-on-a-cpanel-server/</feedburner:origLink></entry>
	</feed><!-- Dynamic page generated in 0.724 seconds. --><!-- Cached page generated by WP-Super-Cache on 2010-03-10 16:02:37 -->
