Big delay on any posting going on here for some time! As you all are most likely aware by now; 2 months ago I accepted the role of Lead Developer at a new start up company. Anyone who has joined a start up venture at such an early stage will corroborate this, it is blummin’ hard work! My job description ranges from sys admin, programmer, front end developer, customer services, stock taker and anything else that needs doing! One of my biggest achievements and tasks was getting a production ready environment set up and migrate a live site in 5 days. Good news is, I did it! I still have a million and one things to do to get everything exactly how I want it, but here’s how I configured the environment and migrated in such a short time so other people can hopefully save some tears and frustrations…..
It all began when I became painfully aware that the set up the site was living on before the migration was unlikely to cope with the traffic we were expecting after a major marketing campaign and so the journey began.
What Magento needed:
- PHP 5.2.13+ (but not 5.3 as Magento Professional is not stable with it, let alone untested with third party plugins) with GD, Curl, MCrypt, simplexml, MySQL/PDO and mhash plugins
- Apache 1.x or 2.x
- MySQL 5.0.x
- Sendmail or similar
What comes with Redhat Enterprise 5 (RHEL 5):
- PHP 5.1.6 “yikes”
- Apache 2.0 “yea ok”
- MySQL 5.0.77 “yup fine”
- Linux – well that’s what RHEL is so…..
- Postfix “cool”
Magento would not work with PHP 5.1.6 so naturally I thought: “Oh this won’t be difficult, I’ll just use yum install to upgrade it!”. WRONG! Rhel5 only supports software it has specifically tested on the operating system and therefore will only have that software in its repository. Nightmare. I used Fedora about 5 years ago so was semi familiar with yum and rpms therefore only semi panicking at this. My first step was to contact a friend of mine who is a sysadmin and pick his brains about how I was going to get PHP 5.2.14 on my system. He gave me a source where php would update – but disaster, it updated to the latest which was PHP 5.3.3! Noooo!!!
Next step, I attempted compiling PHP 5.2.14 from source. That is not much fun and very time consuming unless you know exactly what you’re doing and I hadn’t done it for quite some time. Needless to say, I was soon back to square one with an install of PHP that didn’t quite work properly and had to start all over again….
After some days of fiddling around with servers (as well as doing other jobs that needed to be done) I came across this site: http://www.atoomnet.net/centos_updated_php.php and since CentOS is so similar to rhel5, I got the correct version of PHP on to my system relatively easily and quickly using rpm -Uvh for each (in case you were wondering what the command is).
Needless to say, what a simple fix! When you know how…….