<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>The Website Owner&#039;s Manual &#187; red hat</title>
	<atom:link href="http://www.nurelm.com/themanual/tag/red-hat/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.nurelm.com/themanual</link>
	<description>Tips and tricks from the trenches. Written by people who like the Web so much that they decided to turn obsessive surfing habits into career choices.</description>
	<lastBuildDate>Thu, 02 Sep 2010 12:55:48 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>Upgrading PHP and MySQL on Red Hat Enterprise Linux 4</title>
		<link>http://www.nurelm.com/themanual/2009/07/24/upgrading-php-and-mysql-on-red-hat-enterprise-linux-4/</link>
		<comments>http://www.nurelm.com/themanual/2009/07/24/upgrading-php-and-mysql-on-red-hat-enterprise-linux-4/#comments</comments>
		<pubDate>Fri, 24 Jul 2009 14:11:16 +0000</pubDate>
		<dc:creator>sam</dc:creator>
				<category><![CDATA[Develop]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[mysql]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[plesk]]></category>
		<category><![CDATA[red hat]]></category>

		<guid isPermaLink="false">http://www.nurelm.com/themanual/?p=221</guid>
		<description><![CDATA[If you didn&#8217;t guess from the title, this is a fairly nerdy topic that will only interest a select audience.  But hopefully it&#8217;ll make that select handful of IT-friendly people very happy by turning what can be a huge pain in the posterior into a smaller pain in the posterior. The issue:  You&#8217;ve got a [...]]]></description>
			<content:encoded><![CDATA[<p>If you didn&#8217;t guess from the title, this is a fairly nerdy topic that will only interest a select audience.  But hopefully it&#8217;ll make that select handful of IT-friendly people very happy by turning what can be a huge pain in the posterior into a smaller pain in the posterior.</p>
<p>The issue:  You&#8217;ve got a nice web server that is serving the needs of lots of clients and everything&#8217;s great.  Except that you made what turned out to be an ill-fated decision to choose Red Hat Enterprise Linux 4 as your Linux distro, and now you&#8217;re stuck with prehistoric versions of PHP and MySQL that Red Hat&#8217;s updater won&#8217;t update.</p>
<p>Now you can&#8217;t install a whole raft of newer apps, your clients are mad that you can&#8217;t provide the latest version of [insert one of a number of Web apps that require PHP5 here], the thought of moving everybody off of your perfectly good server just to get updated software makes your stomach hurt, and the thought of manually updating PHP and MySQL makes it hurt even worse.</p>
<p>Fear not, there&#8217;s hope &#8230;<span id="more-221"></span></p>
<p>Don&#8217;t get me wrong, RHEL4 is great stuff, and the up2date tool that comes with it does a fine job of keeping any security issues patched up.  However, Red Hat does not provide RPMs for versions of PHP or MySQL beyond either tool&#8217;s 4.x releases, leaving you in a box when it comes to installing Good New Stuff such as Magento (our new  favorite eCommerce tool, sorry X-Cart).  We recently had just this same beef and would like to relieve you of a little pain and suffering by sharing how we got around it, so here goes:</p>
<ol>
<li><strong>Back up everything you can think of</strong>.   Databases, files, everything.  I know, backing up is boring, but do it anyway. Hopefully you already have all that backed nightly &#8230; if so, just make sure the backups are all good.</li>
<li><strong>Upgrade Plesk (and anything else that depends on older versions of PHP)</strong>.  If you&#8217;re using a version of Plesk that&#8217;s lower than 8.3, upgrade that old beast, because it won&#8217;t work with newer versions of PHP.  You should be able to upgrade from within Plesk to the latest stable version.  Tip: Do the update after hours, because it results in some web server downtime while it&#8217;s working.</li>
<li><strong>Setup some nice new yum repositories</strong>.  Huh?  Yum?  I thought RHEL4 used up2date?  Well, it does, but yum is a newer package management tool (you can learn more on how they differ by googling <a href="http://www.google.com/search?source=ig&amp;hl=en&amp;rlz=&amp;=&amp;q=yum+vs+up2date&amp;btnG=Google+Search">yum vs up2date</a>), and it&#8217;s what the amazing folks at <a href="http://www.atomicrocketturtle.com/">AtomicRocketTurtle</a> use for &#8230; get ready for it &#8230; their repository of updated PHP and MySQL RPMs for RHEL4!  Here&#8217;s how to get setup (don&#8217;t worry, this won&#8217;t actually do any scary stuff, but will just set up new yum repositories &#8230; the scary part is next step). Fire up a command prompt, log in as root, and:
<pre>wget -q -O - http://www.atomicorp.com/installers/atomic | sh</pre>
</li>
<li><strong>Upgrade!</strong> Ok, this is the scary part I mentioned earlier where you may wish to close your eyes while hitting the enter key.  We&#8217;re  going to tell yum to upgrade everything on the system that it can find updates for in the repository we just setup.  You might want to play around with yum for a bit, look at the man page, list updates it has available for the things you&#8217;ll be updating (yum list available php*) and so on.  You know, just to make you feel good before taking the plunge. When you&#8217;re ready, take a deep breath, perhaps indulge in a refreshing beverage and:
<pre>yum update</pre>
<p>Once it works out all the things that it&#8217;ll update and the corresponding dependencies, you&#8217;ll be prompted to approve the list of changes above to be made.  Do that, and you&#8217;ll be off and running, no longer slave to the arcane ways of software releases that have been around longer than your favorite websites.</li>
</ol>
<p>Of course no server administration challenge would be complete without a slew of gotchas that go well beyond the &#8220;here&#8217;s all you have to do&#8221; instructions you started with.  I&#8217;m sure you&#8217;ll find your own speed bumps, but hopefully our review of what slowed us down will eliminate most of them:</p>
<ul>
<li><strong>php-domxml</strong>: I don&#8217;t know what this is, but I do know that gets in the way of upgrading things.  So we told yum to exclude that nasty thing (yum &#8211;exclude php-domxml upgrade) and never looked back (you can find some discussion on the topic <a href="http://www.webhostingtalk.com/showthread.php?t=571452">here</a>).</li>
<li><strong>PHP extension_dir</strong>:  PHP was looking in the wrong place for extensions, which caused lots of things to not work (we first noticed with a WordPress install, but I&#8217;m sure most PHP apps would complain).  It was looking in /usr/lib/php4, which is the old directory.  So, we just changed the &#8220;extension_dir&#8221; line in /etc/php.ini to &#8220;extension_dir=/usr/lib/php/modules/&#8221; and restarted httpd.</li>
<li><strong>Update MySQL tables</strong>: We upgraded tables in a way that is probably done better by following <a href="http://dev.mysql.com/doc/refman/5.0/en/mysql-upgrade.html">these instructions</a>.</li>
<li><strong>Plesk / Horde</strong>:  Once we upgraded, the webmail options disappeared from Plesk.  Despite Plesk showing the psa-horde package as being installed, it also said that no webmail client software was available for use. We ended up manually uninstalling the Horde package (yum remove psa-horde) then reinstalling it from within Plesk&#8217;s upgrade screen. The install said there was one error, but it ended up working anyway and providing us with the Horde option inside Plesk again.  Well, it *almost* ended up working &#8230;</li>
<li><strong>Horde, Part II: </strong>Upon logging into a webmail account, we got an ugly error that looked like this:
<pre>A fatal error has occuredDB</pre>
<pre>Error: connect failed</pre>
<pre>Details have been logged for the administrator.</pre>
<p>Turns out this is a common problem, so we followed <a href="http://knowledgelayer.softlayer.com/questions/378/Common+Problems+with+Horde+Webmail+using+Plesk">these instructions</a>. But, it turned out that everything was in perfect order according to the instructions.  After much hair pulling, cursing, and ghetto debugging with echo statements in Horde&#8217;s PHP files, we found that Horde was simply looking for a password file in the wrong place, and the following command took care of everything:</p>
<pre>cp .webmail.shadow webmail/horde/.horde.shadow</pre>
</li>
</ul>
<p>And there you have it.  Hopefully our trials and tribulations will eliminate some trials and add a few tribulations on your end.  Please speak up if we missed anything or let us know if this article helped you out.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.nurelm.com/themanual/2009/07/24/upgrading-php-and-mysql-on-red-hat-enterprise-linux-4/feed/</wfw:commentRss>
		<slash:comments>8</slash:comments>
		</item>
	</channel>
</rss>
