Ok I thought I'd try installing the latest and greatest LAMP stack on my test server in preparation for using it in production. I decided to go with Ubuntu server 12.04, Apache (2.4.2), MySQL 5.5.24 and PHP 5.4.2 and use PHP-FPM/fast-cgi. I was then writing down the steps required into an epic list so I could replicate them easily when the time came to move to my production VPS.
- Ubuntu server installed no problems.
- I got Apache installed from source ok and it loaded the test page.
- MySQL compiled from source and installed
fine. But then failed to run and I couldn't fix the mysql.sock error so I gave up. Then I just did an
apt-get install mysql-server
which got me version 5.5.22 which is a few versions out of date but
it runs properly so that's ok I suppose.
- So next comes PHP, that compiles, tests and installs fine. Now the
final step: linking it in with Apache. And you can guess that it
failed. It didn't compile with the necessary libphp5.so module so now that won't work. 'Cannot load /usr/local/apache2/modules/libphp5.so
into server: /usr/local/apache2/modules/libphp5.so: cannot open
shared object file: No such file or directory'.
Have google'd all these errors and tried fixing but getting nowhere. So have given up on the manual install for now as it's wasted two evenings so far.
- Is there any decent LAMP stack that can be used in production?
- Should you use one in production or should you really be installing everything manually? How does everyone get around this issue?
- I know there's lots of LAMP stacks out there like XAMPP etc but they're never updated frequently and always a few versions behind. Why do they never keep them up to date?
- Even when it's in production, how do you keep the installs up to date?
Also I suppose I could do apt-get to install everything. I love the one liner install but even those versions that get downloaded are way behind. Apache 2.4 would be nice for the speed improvements and I'm assuming it's best practice to keep up to date with PHP so you get the security enhancements.