<?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:media="http://search.yahoo.com/mrss/"
	>

<channel>
	<title>DesignDivine Project Blog &#187; VPS</title>
	<atom:link href="http://blog.designdivine.com/tag/vps/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.designdivine.com</link>
	<description>Current Projects, News, Thoughts on Design &#38; Development</description>
	<lastBuildDate>Thu, 12 Jan 2012 17:22:52 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Install PHP5 on an Uncooperative VPS</title>
		<link>http://blog.designdivine.com/2010/06/install-php5-on-an-uncooperative-vps/</link>
		<comments>http://blog.designdivine.com/2010/06/install-php5-on-an-uncooperative-vps/#comments</comments>
		<pubDate>Mon, 28 Jun 2010 18:56:33 +0000</pubDate>
		<dc:creator>taavo</dc:creator>
				<category><![CDATA[Server Configuration]]></category>
		<category><![CDATA[Web Development]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[php5]]></category>
		<category><![CDATA[server updates]]></category>
		<category><![CDATA[server upgrades]]></category>
		<category><![CDATA[VPS]]></category>

		<guid isPermaLink="false">http://blog.designdivine.com/?p=602</guid>
		<description><![CDATA[A VPS is the standard upgrade when conventional shared hosting won&#8217;t meet your needs. The catch, and most hosts try not to make this clear, is that you&#8217;re then on the hook for all configuration, upgrades, and maintenance. And as an added bonus, many hosts offer default VPS installs configured as though they&#8217;re deliberately trying [...]]]></description>
			<content:encoded><![CDATA[<p>A VPS is the standard upgrade when conventional shared hosting won&#8217;t meet your needs. The catch, and most hosts try not to make this clear, is that you&#8217;re then on the hook for all configuration, upgrades, and maintenance. And as an added bonus, many hosts offer default VPS installs configured as though they&#8217;re deliberately trying to make administration difficult.</p>
<p>For a recent project hosted on one of our VPSes, I was planning to use <a href="http://kohanaframework.org/">Kohana</a>, which requires PHP5. Despite the fact that <a href="http://en.wikipedia.org/wiki/PHP">PHP5 was released in 2004</a>, it wasn&#8217;t installed on the VPS in question. As the VPS was running Plesk, any changes to the PHP installation would have to be made carefully so as not to demolish our hosted sites, but research revealed the <a href="http://www.atomicorp.com/wiki/index.php/PHP">Atomic Rocket Turtle Repository</a>, designed exactly for upgrading machines such as mine. Except that yum wasn&#8217;t even installed.</p>
<p>The procedure was as follows:</p>
<p><b>Install yum</b></p>
<p><i>Note: If you&#8217;re following along at home, instead of just copy pasting my terminal commands, you should probably make sure your rpm -Uvh calls are requesting <a href="http://mirror.centos.org/centos/4/os/i386/CentOS/RPMS/">contemporary versions</a></i></p>
<p>First, install a key from the CentOS mirrors so rpm will work:<br />
rpm –import http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-4</p>
<p>Then, try and fail to install yum in order to get a full list of missing dependencies:<br />
rpm -Uvh http://mirror.centos.org/centos/4/os/i386/CentOS/RPMS/yum-2.4.3-3.el4.centos.noarch.rpm</p>
<p>Next, install each listed dependency with a call to rpm -Uvh</p>
<p>Finally, install yum by re-running the rpm command above</p>
<p>(based on instructions <a href="http://dancameron.org/general/installing-yum-on-centos-4">here</a>)</p>
<p><b>Set up the <a href="http://www.atomicorp.com/wiki/index.php/PHP">Atomic Rocket Turtle repository</a></b></p>
<p>wget -q -O &#8211; http://www.atomicorp.com/installers/atomic.sh | sh</p>
<p><b>Upgrade PHP</b></p>
<p>yum upgrade php</p>
<p><b>Reinstall Ioncube Loader</b></p>
<p>(<i>Note: As we weren&#8217;t using the Ioncube Loader, everything worked without this step. Except that we were getting notices in our logs saying it was missing.</i>)</p>
<p>yum install php-ioncube-loader</p>
<p><b>Set up new (default) php.ini</b></p>
<p>mv /etc/php.ini /etc/php.ini.php4<br />
mv /etc/php.ini.rpmnew /etc/php.ini</p>
<p><b>Restart Plesk</b></p>
<p>/etc/init.d/psa stopall<br />
/etc/init.d/psa startall<br />
/etc/init.d/psa restart</p>
<p>Miraculously, Plesk restarted successfully and all my applications were fully functional under the new install of PHP5.</p>
<p>I could&#8217;ve stopped here, but because the VPS had been running for a few years, and yum hadn&#8217;t been installed, I knew that basically everything (if not <i>literally</i> everything) on the server was out of date. Research and testing aside, the above took less than 10 minutes. The below (upgrading <i>everything</i>) took several hours of troubleshooting.</p>
<p><b>Upgrade everything server-wide</b></p>
<p>yum upgrade</p>
<p>(<i>Note: This might take a while. I made sure to archive the output, because when anything goes wrong, the clues will show up here.</i>)</p>
<p><b>Set up new MySQL configuration</b></p>
<p>(<i>Note: At this point, Plesk wouldn&#8217;t restart because MySQL (just upgraded from 4 to 5) was totally broken.</i>)</p>
<p>mv /etc/my.cnf /etc/my.cnf.old<br />
mv /etc/my.cnf.rpmnew /etc/my.cnf</p>
<p><b>Install new Plesk package to support openssl upgrade</b></p>
<p>(<i>Note: Now MySQL worked, but Plesk was still broken.</i>)</p>
<p>If you update from an old vesion of openssl, you&#8217;re probably going to run into a bug, the quick solution to which you can find <a href="http://kb.parallels.com/8338">here</a>.</p>
<p><b>Update MySQL databases</b></p>
<p>(<i>Note: Plesk would restart, but I couldn&#8217;t log in.</i>)</p>
<p>mysqlcheck &#8211;check-upgrade &#8211;all-databases &#8211;auto-repair -uadmin -pyouradminpassword</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.designdivine.com/2010/06/install-php5-on-an-uncooperative-vps/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	<enclosure url="" type="image/jpeg" />

	</item>
	</channel>
</rss>

